WebView.AllowedScriptNotifyUris Eigenschaft

Definition

Hinweis

AllowedScriptNotifyUris wird in Apps, die für Windows 8.1 kompiliert wurden, nicht unterstützt. Aktualisieren Sie stattdessen den Abschnitt ApplicationContentUriRules des App-Manifests. Weitere Informationen finden Sie im Abschnitt Hinweise.

Ruft eine sichere Liste von URIs ab, die ScriptNotify-Ereignisse in dieser WebView auslösen dürfen, oder legt diese fest.

public:
 property IVector<Uri ^> ^ AllowedScriptNotifyUris { IVector<Uri ^> ^ get(); void set(IVector<Uri ^> ^ value); };
/// [get: Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [set: Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
IVector<Uri> AllowedScriptNotifyUris();

void AllowedScriptNotifyUris(IVector<Uri> value);
/// [get: Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
IVector<Uri> AllowedScriptNotifyUris();

void AllowedScriptNotifyUris(IVector<Uri> value);
public IList<System.Uri> AllowedScriptNotifyUris { [Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; [Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] set; }
public IList<System.Uri> AllowedScriptNotifyUris { [Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("AllowedScriptNotifyUris is unavailable for releases beginning with Windows 8.1. Instead, list URIs under ApplicationContentUriRules in the package manifest. For more info, see the AllowedScriptNotifyUris documentation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] set; }
var iVector = webView.allowedScriptNotifyUris;
webView.allowedScriptNotifyUris = iVector;
Public Property AllowedScriptNotifyUris As IList(Of Uri)

Eigenschaftswert

Die sichere Liste der URIs, die ScriptNotify-Ereignisse auslösen dürfen.

Attribute

Hinweise

Windows 8.1

AllowedScriptNotifyUris wird in Apps, die für Windows 8.1 kompiliert wurden, nicht unterstützt. Damit eine externe Webseite beim Aufrufen von window.external.notify das ScriptNotify-Ereignis auslöst, müssen Sie den URI der Seite im Abschnitt ApplicationContentUriRules des App-Manifests einschließen. (Sie können dies in Visual Studio auf der Registerkarte Inhalts-URIs des Package.appxmanifest-Designers tun.) Die URIs in dieser Liste müssen HTTPS verwenden und können Unterdomänenplatzhalter enthalten (z. B. https://.microsoft.com), sie können jedoch keine Domänenplatzhalter enthalten (z. B. https://.com und https://.). Die Manifestanforderung gilt nicht für Inhalte, die aus dem App-Paket stammen, die einen URI vom Typ „ms-local-stream:// URI“ verwenden, oder die mit NavigateToString geladen werden.

Windows 8

Diese Hinweise gelten nur für Apps, die für Windows 8 kompiliert wurden, auch wenn sie unter Windows 8.1 ausgeführt werden.

Damit eine externe Webseite beim Aufrufen von window.external.notify das ScriptNotify-Ereignis auslöst, müssen Sie den URI der Seite in die Liste einschließen, die von der AllowedScriptNotifyUris-Eigenschaft zurückgegeben wird. Legen Sie diese Eigenschaft auf AnyScriptNotifyUri fest, um anzugeben, dass jede Seite ScriptNotify-Ereignisse für dieses WebView-Steuerelement auslösen kann. Diese Anforderung gilt nicht für Inhalte, die mit der NavigateToString-Methode geladen werden.

Gilt für: