react-native-webview/windows/WebViewBridgeComponent
Tero Paananen b930e25a8f
feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617)
* Manage to build webview using Visual Studio

* WebView in content of UserControl

* Destructor not needed

* Example app tested

* Add messagingEnabled prop

* WebViewBridge

* Message posting

* Store bridge as instance variable

* Use bridge if messagingEnabled

* Free event delegate

* PostMessage api uses string message

* script.notify() usage removed

* Debug log removed

* Bridge reference added

* Base for web allowed object implemented c++/winrt

* Bribge works

* "Microsoft.Windows.CppWinRT" version="2.0.200729.8"

* Update bridge implementation

* version changes

* Reference fix

* WebView prj builds

* yarn lock update

* Platfrom version update

* NuGet package reference updated

* Messaging test added into example app

* Typo fix

* try_as() to as() calls

* WebView.PostMessage() not supported anymore, use injectJavaScript

* Fix WebView.postMessage to work using injectJavascript

* Eval postMessage fix

* postMessage via injectJavascript

* Example fixed to handle postMessage call
2020-10-26 14:01:40 +01:00
..
PropertySheet.props feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebBridge.cpp feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebBridge.h feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebBridge.idl feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebViewBridgeComponent.def feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebViewBridgeComponent.vcxproj feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
WebViewBridgeComponent.vcxproj.filters feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
packages.config feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
pch.cpp feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
pch.h feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00
readme.txt feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617) 2020-10-26 14:01:40 +01:00

readme.txt

========================================================================
    C++/WinRT WebViewBridgeComponent Project Overview
========================================================================

This project demonstrates how to get started authoring Windows Runtime 
classes directly with standard C++, using the C++/WinRT SDK component 
to generate implementation headers from interface (IDL) files.  The
generated Windows Runtime component binary and WinMD files should then
be bundled with the Universal Windows Platform (UWP) app consuming them.

Steps:
1. Create an interface (IDL) file to define your Windows Runtime class, 
    its default interface, and any other interfaces it implements.
2. Build the project once to generate module.g.cpp, module.h.cpp, and
    implementation templates under the "Generated Files" folder, as 
    well as skeleton class definitions under "Generated Files\sources".  
3. Use the skeleton class definitions for reference to implement your
    Windows Runtime classes.

========================================================================
Learn more about C++/WinRT here:
http://aka.ms/cppwinrt/
========================================================================