diff --git a/include/wx/webview.h b/include/wx/webview.h index 22bcfd8279..24a96045eb 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -296,6 +296,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_ERROR, wxWebViewEve wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_FULLSCREEN_CHANGED, wxWebViewEvent); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, wxWebViewEvent); typedef void (wxEvtHandler::*wxWebViewEventFunction) (wxWebViewEvent&); diff --git a/interface/wx/webview.h b/interface/wx/webview.h index 18581d2c9a..dced7e269a 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -433,6 +433,9 @@ public: the page wants to enter or leave fullscreen. Use GetInt to get the status. Currently only implemented for the edge and WebKit2GTK+ backend and is only available in wxWidgets 3.1.5 or later. + @event{EVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED} + Process a @c wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED event + only available in wxWidgets 3.1.5 or later. @endEventTable @since 2.9.3 diff --git a/src/common/webview.cpp b/src/common/webview.cpp index 3303fc08df..cc845a2b5e 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -49,6 +49,7 @@ wxDEFINE_EVENT( wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); wxDEFINE_EVENT( wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); wxDEFINE_EVENT( wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); wxDEFINE_EVENT( wxEVT_WEBVIEW_FULLSCREEN_CHANGED, wxWebViewEvent); +wxDEFINE_EVENT( wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, wxWebViewEvent); wxStringWebViewFactoryMap wxWebView::m_factoryMap;