WebView.AllowedScriptNotifyUris property

Applies to Windows and Windows Phone

[AllowedScriptNotifyUris is not supported in apps compiled for Windows 8.1. Instead, update the ApplicationContentUriRules section of the app manifest. For more info, see the Remarks section.]

Gets or sets a safe list of URIs that are permitted to fire ScriptNotify events to this WebView.

Syntax


public IList<Uri> AllowedScriptNotifyUris { get; set; }

Property value

Type: IVector<Uri> [C++] | System.Collections.Generic.IList<Uri> [.NET]

The safe list of URIs that are permitted to fire ScriptNotify events.

Remarks

Windows 8.1

AllowedScriptNotifyUris is not supported in apps compiled for Windows 8.1. To enable an external web page to fire the ScriptNotify event when calling window.external.notify, you must include the page's URI in the ApplicationContentUriRules section of the app manifest. (You can do this in Visual Studio on the Content URIs tab of the Package.appxmanifest designer.) The URIs in this list must use HTTPS, and may contain subdomain wildcards (for example, https://*.microsoft.com) but they cannot contain domain wildcards (for example, https://*.com and https://*.*). The manifest requirement does not apply to content that originates from the app package, uses an ms-local-stream:// URI, or is loaded using NavigateToString.

Windows 8

These remarks apply only to apps compiled for Windows 8, even when running on Windows 8.1.

To enable an external web page to fire the ScriptNotify event when calling window.external.notify, you must include the page's URI in the list returned by the AllowedScriptNotifyUris property. Set this property to AnyScriptNotifyUri to indicate that any page can fire ScriptNotify events for this WebView control. This requirement does not apply to content loaded using the NavigateToString method.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

End of client support

Windows 8.1

End of server support

Windows Server 2012 R2

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView

 

 

Show:
© 2014 Microsoft