Share via


IWebViewControl.ScriptNotify Event

Definition

Occurs when the content contained in the IWebViewControl passes a string to the application by using JavaScript.

// Register
event_token ScriptNotify(TypedEventHandler<IWebViewControl, WebViewControlScriptNotifyEventArgs const&> const& handler) const;

// Revoke with event_token
void ScriptNotify(event_token const* cookie) const;

// Revoke with event_revoker
IWebViewControl::ScriptNotify_revoker ScriptNotify(auto_revoke_t, TypedEventHandler<IWebViewControl, WebViewControlScriptNotifyEventArgs const&> const& handler) const;
event TypedEventHandler<IWebViewControl,WebViewControlScriptNotifyEventArgs> ScriptNotify;
function onScriptNotify(eventArgs) { /* Your code */ }
iWebViewControl.addEventListener("scriptnotify", onScriptNotify);
iWebViewControl.removeEventListener("scriptnotify", onScriptNotify);
- or -
iWebViewControl.onscriptnotify = onScriptNotify;
Event ScriptNotify As TypedEventHandler(Of IWebViewControl, WebViewControlScriptNotifyEventArgs) 

Event Type

Remarks

A hosted HTML page can fire the ScriptNotify event in your UWP app when the page calls window.external.notify and passes a string parameter.

Applies to