mirror of
https://github.com/status-im/react-native-webview-bridge.git
synced 2026-08-31 13:21:15 +00:00
updated android code to work properly
This commit is contained in:
+2
-2
@@ -79,13 +79,13 @@ public class WebViewBridgeManager extends ReactWebViewManager {
|
||||
+ "(function() {"
|
||||
+ "if (window.WebViewBridge) return;"
|
||||
+ "var customEvent = document.createEvent('Event');"
|
||||
+ "WebViewBridge = {"
|
||||
+ "var WebViewBridge = {"
|
||||
+ "send: function(message) { WebViewBridgeAndroid.send(message); },"
|
||||
+ "onMessage: function() {}"
|
||||
+ "};"
|
||||
+ "window.WebViewBridge = WebViewBridge;"
|
||||
+ "customEvent.initEvent('WebViewBridge', true, true);"
|
||||
+ "document.dispatchEvent(customEvent);"
|
||||
+"}())", null);
|
||||
+"}());", null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user