2020-10-26 15:01:40 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "WebBridge.g.h"
|
|
|
|
|
|
|
|
|
|
|
2021-11-12 10:41:40 -08:00
|
|
|
namespace winrt::ReactNativeWebView::implementation
|
2020-10-26 15:01:40 +02:00
|
|
|
{
|
|
|
|
|
struct WebBridge : WebBridgeT<WebBridge>
|
|
|
|
|
{
|
|
|
|
|
WebBridge() = default;
|
|
|
|
|
|
|
|
|
|
void PostMessage(hstring const& message);
|
|
|
|
|
winrt::event_token MessagePostEvent(Windows::Foundation::EventHandler<hstring> const& handler);
|
|
|
|
|
void MessagePostEvent(winrt::event_token const& token) noexcept;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
winrt::event<Windows::Foundation::EventHandler<winrt::hstring>> m_messageEvent;
|
|
|
|
|
};
|
|
|
|
|
}
|
2021-11-12 10:41:40 -08:00
|
|
|
namespace winrt::ReactNativeWebView::factory_implementation
|
2020-10-26 15:01:40 +02:00
|
|
|
{
|
|
|
|
|
struct WebBridge : WebBridgeT<WebBridge, implementation::WebBridge>
|
|
|
|
|
{
|
|
|
|
|
};
|
|
|
|
|
}
|