We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postMessage to WebView can not work on iOS.
postMessage
First, postMessage on react-native
this.refs.webview.postMessage("any thing");
Then receive the message on WebView side, the event is always {"isTrusted": false}
document.addEventListener('message', function (e) { // e.data !== 'any thing' // e == {isTrusted: false} })
The text was updated successfully, but these errors were encountered:
@magicismight - How did you resolve this? I'm seeing the same thing {"isTrusted":false}
{"isTrusted":false}
Sorry, something went wrong.
@rgoldiez Everything goes fine. You can not print the event object directly.
event
document.addEventListener('message', function (e) { console.log(e); // This will print {isTrusted: false} console.log(e.data); // This will work. })
Thank you @magicismight !!
No branches or pull requests
postMessage
to WebView can not work on iOS.First, postMessage on react-native
Then receive the message on WebView side, the event is always {"isTrusted": false}
Additional Information
The text was updated successfully, but these errors were encountered: