[This documentation is preliminary and is subject to change.]
Occurs when the content contained in the WebView control passes a string to the application by using JavaScript.
Syntax
<WebView ScriptNotify="eventhandler"/>
Event information
| Delegate | NotifyEventHandler |
|---|
Examples
The following code example demonstrates the use of the ScriptNotify event.
public MyPage() { this.InitializeComponent(); MyWebView.ScriptNotify += MyWebView_ScriptNotify; // Here we have to set the AllowedScriptNotifyUri property because we are // navigating to some site where we don't own the content and we want to // allow window.external.notify() to pass data back to the app. List<Uri> allowedUris = new List<Uri>(); allowedUris.Add(new Uri("http://www.bing.com")); MyWebView.AllowedScriptNotifyUris = allowedUris; } void MyWebView_ScriptNotify(object sender, NotifyEventArgs e) { // Respond to the script notification. }
Requirements
|
Minimum supported client | Windows 8 Release Preview |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 5/22/2012
