Interfaces
Platform-Specific Interface (Low-Level Interfaces)
These are the low-level interfaces, which are independent of any business use cases.
state - webview state transition metrics
Use Cases - if webview is loaded or not; if the current page view is active or suspended; display/hide the loader
Method Description active Checks if the WebView session is active or suspended loaded Checks if the WebView page has loaded or not contentLoaded Triggered from the client, when the final page content rendering has been completed.
navigator - navigation defined within webview
Use Cases - back-and-forth page navigations; opening, and closing webview pages
Method Description open Opens the route defined close Closes the current WebView back Navigates back to the previous web route reload Reloads the current WebView page permission - gets native-level permissions for webview
Use Cases - asking native app for permission like microphone, camera, location, screen sharing, etc.
Method Description microphone Gets microphone permission from native camera Gets camera permission from native location Gets location permission from native (i.e. geocode) screenShare Gets screen sharing permission from native storage - gets access to the native cache, web cookie, web session storage, and web local storage.
Method Description getCookie Gets the value from the web cookie setCookie Sets the value to the web cookie (key, value pair is required) removeCookie Deletes the web cookie key with it’s value clearCookie Clear all web cookies getSessionStorageItem Gets the value from the web session storage setSessionStorageItem Sets the value to the web session storage (key, value pair is required) removeSessionStorageItem Deletes the web session storage key with it’s value clearSessionStorage Clears the entire session storage getLocalStorageItem Gets the value from the web local storage setLocalStorageItem Sets the value to the web local storage (key, value pair is required) removeLocalStorageItem Deletes the web local storage key with it’s value clearLocalStorage Clears the entire local storage logger - logs info, warnings, errors, and exception-related console outputs.
Method Description info Logs info/warning related console outputs. error Logs error/exception related console outputs. deviceInfo - Gets access to the native device-specific info e.g. co-ordinates, device-related data, etc.
Method Description getCorrdinates Get realtime geo co-ordinates of the user from native
Data Specific Interface (Overwriteable Interfaces)
These are the interfaces that are dependent on any business use case.
interaction - defines native-level interactions invoked via webview and vice-versa
Use Cases - displaying a native toast message, opening the native bottom sheet, setting the native header component, updating the native cart count
Method Description showToastMessage Opens the native toast component (message is required) openBottomSheet Opens the native bottom sheet component (message is required) allowsBackForwardNavigationGestures Enables backnforth navigation gestures for ios toolbar - setting the native header component, updating the native cart count
Method Description show Shows the navigation bar according to the params passed. hide Hides the navigation bar. set Sets the navigation bar header according to the params passed. analytics, onMessage, postMessage - generic data sharing between native and webview