react-native-promisable-webview1.0.2 • Public • Published
A ReactNative WebView with a Promise-adapter.
This component is based on WKWebView which provides a bridge between
ReactNative context and the WebView context. That adapter allows you to
postMessage() back to
ReactNative. Note that
order to synchronize the ReactNative side needs to wait for some message to
return from the WebView.
This component wraps the WKWebView bridge and allows you to evaluate JS code within the WebView and get a Promise back:
Handling Page Loads
The WebView might unload the page while a Promise is in "pending" state -
evaluates navigates away from the page, or because the web page decides to
reload or navigate away for some other reason.
In such cases the
PromisableWebView rejects any pending promises with
"WEBVIEW_RELOADED" as the reason.