説明なし

WebBridge.cpp 514B

1234567891011121314151617181920212223
  1. #include "pch.h"
  2. #include "WebBridge.h"
  3. #include "WebBridge.g.cpp"
  4. namespace winrt::WebViewBridgeComponent::implementation
  5. {
  6. winrt::event_token WebBridge::MessagePostEvent(Windows::Foundation::EventHandler<winrt::hstring> const& handler)
  7. {
  8. return m_messageEvent.add(handler);
  9. }
  10. void WebBridge::MessagePostEvent(winrt::event_token const& token) noexcept
  11. {
  12. m_messageEvent.remove(token);
  13. }
  14. void WebBridge::PostMessage(winrt::hstring message)
  15. {
  16. m_messageEvent(*this, message);
  17. }
  18. }