You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebView is a great solution for interacting with Web pages. However, WebView's ability to manipulate the DOM of external pages is not always desired.
Describe the solutions you came up with
I have a Web app that performs security related stuff and it turned out that it was trivial breaking it with code like the following:
Additional context
It should be possible constraining WebView through CSP or similar and restoring the built-in postMessage().
There is no need for injecting JavaScript code for returning data to WebView. The following is an extract of a Web page that can be invoked by WebView as well as being IFRAMEd by an ordinary Web application:
// Common API return method.functionreturnData(jsonObject){if(window.ReactNativeWebView){window.ReactNativeWebView.postMessage(JSON.stringify(jsonObject));}else{parent.postMessage(jsonObject,'*');}}
The text was updated successfully, but these errors were encountered:
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
WebView is a great solution for interacting with Web pages. However, WebView's ability to manipulate the DOM of external pages is not always desired.
Describe the solutions you came up with
I have a Web app that performs security related stuff and it turned out that it was trivial breaking it with code like the following:
Additional context
It should be possible constraining WebView through CSP or similar and restoring the built-in
postMessage()
.There is no need for injecting JavaScript code for returning data to WebView. The following is an extract of a Web page that can be invoked by WebView as well as being IFRAMEd by an ordinary Web application:
The text was updated successfully, but these errors were encountered: