when I post message (window.location) Not getting nativeEvent other data in Android platform both Emulator and hardware devices.
See original GitHub issueBug description: when I post message (window.location) Not getting nativeEvent and other data in Android platform both Emulator and hardware devices.
To Reproduce:
const INJECTED_JAVASCRIPT = (function() { window.ReactNativeWebView.postMessage(JSON.stringify(window.location)); })();
;
<WebView source={{ uri: ‘https://facebook.github.io/react-native’ }} injectedJavaScript={INJECTED_JAVASCRIPT} onMessage={this.onMessage} />
onMessage = (e) => { console.log(e.nativeEvent) }
Expected behavior:
Environment:
- OS:Android
- OS version:8.0
- react-native version:0.59.5
- react-native-webview version:5.12.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
when I post message (window.location) Not getting ... - GitHub
when I post message (window.location) Not getting nativeEvent other data in Android platform both Emulator and hardware devices. #702.
Read more >React Native WebView postMessage does not work
I had the same problem and fixed it by adding the event listener to the document instead of the window. Change: window.
Read more >Race condition in NDK's native event handling causes ANR ...
When generating events from different sources/devices, the app freezes causing an ANR. STEPS TO REPRODUCE: 1. Build native_plasma example. 2. Connect a gamepad ......
Read more >Window management - Android Developers
An app window on different devices. It is important to design layouts that work with different screen sizes. If you follow the Android...
Read more >Unity - Scripting API: - Unity - Manual
Provides access to your remote settings. Rigidbody. Control of an object's position through physics simulation. NavMeshBuildDebugSettings. Specify which of the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I have a similar case. onMessage did not triggering in release mode but worked in debug mode Could someone help me please?
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically