mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
* Merge web bridge project into webview project * merge in webview sln too * merge in react-native.config.js * fix includes * Bring RN version back to 62.2
20 lines
527 B
C++
20 lines
527 B
C++
#include "pch.h"
|
|
#include "WebBridge.h"
|
|
#include "WebBridge.g.cpp"
|
|
|
|
namespace winrt::ReactNativeWebView::implementation
|
|
{
|
|
void WebBridge::PostMessage(hstring const& message)
|
|
{
|
|
m_messageEvent(*this, message);
|
|
}
|
|
winrt::event_token WebBridge::MessagePostEvent(Windows::Foundation::EventHandler<hstring> const& handler)
|
|
{
|
|
return m_messageEvent.add(handler);
|
|
}
|
|
void WebBridge::MessagePostEvent(winrt::event_token const& token) noexcept
|
|
{
|
|
m_messageEvent.remove(token);
|
|
}
|
|
}
|