-
Notifications
You must be signed in to change notification settings - Fork 497
Javascript bridge window.external.notify #43
New issue
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
Comments
Maybe related to issue 261 on 'feedback' repo: |
@OzBob - see my as yet unfinished project at : https://github.com/shawty/hbbtvbrowserEXPERIMENTAL there's plenty of sample code in there on how to use the message API's |
@shawty thank you.
here: MicrosoftEdge/WebView2Feedback#292 I'm not sure C# to JS strongly typed data objects are a thing I can get behind, since I still need JS versions of those classes to get intellisense working in my JS/TS projects. |
2022 Feb 24 react-native-webview/react-native-webview#1848 (comment) So we are starting the party, again. Just in time for the MAUI release in Build 2022 https://mybuild.microsoft.com/en-US/sessions/599c82b6-0c5a-4add-9961-48b85d9ffde0?source=/speakers/3737608b-5c9a-4422-b90e-ea325115dfb2 (about 20min in) |
Add a sample demonstrating best practice to communicate events between the host and javascript both ways.
An messaging abstraction would benefit the WebView2 spec. There is a supported 'WebMessageReceived' API but is only from Host originated events which await a JS response.
The WebView2_spec says: "WebMessageReceived – Occurs when the content contained in the WebView2 control passes a string to the application by using JavaScipt."
a sample showing how to send messages from JavaScript to the Native application hosting the WebView would be very useful.
"Win32 WebViewControl did not support ObjectForScripting or AddWebAllowedObject", @rjmurillo made a fine example of a necessary workaround to create a Javascript to Natvie notification 'JavaScriptBridge'.
It's basis was :
The browser MDN web docs on Window.external say it is deprecated. What would be the Chrome equivalent?
An iOS Safari webView compatible example:
https://github.com/lovesunstar/WKBridge/blob/fb30c123e68b4dcd4c4a2a8087d7383dbac0afe9/Example/WKBridge/test.html
The text was updated successfully, but these errors were encountered: