WebView.AllowedScriptNotifyUris プロパティ

定義

注意

AllowedScriptNotifyUris は、Windows 8.1用にコンパイルされたアプリではサポートされていません。 代わりに、アプリ マニフェストの ApplicationContentUriRules セクションを更新します。 詳細については、「解説」セクションを参照してください。

ScriptNotify イベントをこの WebView に対して実行できる URI のセーフ リストを取得または設定します。

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)

プロパティ値

ScriptNotify イベントの発生が許可されている URI のセーフ リスト。

属性

注釈

Windows 8.1

AllowedScriptNotifyUris は、Windows 8.1用にコンパイルされたアプリではサポートされていません。 window.external.notify を呼び出すときに外部 Web ページで ScriptNotify イベントを発生させるには、アプリ マニフェストの ApplicationContentUriRules セクションにページの URI を含める必要があります。 (これは、Visual Studio の Package.appxmanifest デザイナーの [コンテンツ URI] タブで行うことができます)。この一覧の URI は HTTPS を使用する必要があり、サブドメイン ワイルドカード (https://.microsoft.com など) を含めることができますが、ドメイン ワイルドカード (https://.com や https:// など) を含めることはできません。 マニフェスト要件は、アプリ パッケージから生成されたコンテンツには適用されず、ms-local-stream:// URI を使うか、NavigateToString を使って読み込まれるかのいずれかです。

Windows 8

これらの解説は、Windows 8.1で実行されている場合でも、Windows 8 用にコンパイルされたアプリにのみ適用されます。

window.external.notify を呼び出すときに外部 Web ページで ScriptNotify イベントを発生させるには、AllowedScriptNotifyUris プロパティによって返されるリストにページの URI を含める必要があります。 この WebView コントロールに対して ScriptNotify イベントを発生させるページがあることを示すには、このプロパティを AnyScriptNotifyUri に設定します。 この要件は、 NavigateToString メソッドを使用して読み込まれたコンテンツには適用されません。

適用対象