WebView.AllowedScriptNotifyUrisProperty 屬性

定義

注意

針對 Windows 8.1 編譯的應用程式不支援 AllowedScriptNotifyUrisProperty。 請改為更新應用程式資訊清單的 ApplicationContentUriRules 區段。 如需詳細資訊,請參閱一節。

識別 AllowedScriptNotifyUris 相依性屬性。

public:
 static property DependencyProperty ^ AllowedScriptNotifyUrisProperty { DependencyProperty ^ get(); };
/// [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)]
static DependencyProperty AllowedScriptNotifyUrisProperty();
/// [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")]
static DependencyProperty AllowedScriptNotifyUrisProperty();
public static DependencyProperty AllowedScriptNotifyUrisProperty { [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; }
public static DependencyProperty AllowedScriptNotifyUrisProperty { [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; }
var dependencyProperty = WebView.allowedScriptNotifyUrisProperty;
Public Shared ReadOnly Property AllowedScriptNotifyUrisProperty As DependencyProperty

屬性值

AllowedScriptNotifyUris相依性屬性的識別碼。

屬性

備註

Windows 8.1

針對 Windows 8.1 編譯的應用程式不支援 AllowedScriptNotifyUrisProperty。 若要讓外部網頁在呼叫window.external.notify時引發ScriptNotify事件,您必須在應用程式資訊清單的ApplicationContentUriRules區段中包含頁面的 URI。 (您可以在 Visual Studio 的 Package.appxmanifest designer.) [內容 URI] 索引標籤上執行此動作:此清單中的 URI 必須使用 HTTPS,而且可能包含子域萬用字元 (,例如,HTTPs://.microsoft.com) 但不能包含網域萬用字元 (,例如,HTTPs://.com 和 HTTPs://) 。 資訊清單需求不適用於源自應用程式套件的內容、使用 ms-local-stream:// URI 的內容,或使用 NavigateToString 載入的內容。

Windows 8

這些備註僅適用于針對 Windows 8 編譯的應用程式,即使在Windows 8.1上執行也一致。

若要讓外部網頁在呼叫window.external.notify時引發ScriptNotify事件,您必須在AllowedScriptNotifyUris屬性所傳回的清單中包含頁面的 URI。 將此屬性設定為AnyScriptNotifyUri,表示任何頁面都可以引發此WebView控制項的ScriptNotify事件。 這項需求不適用於使用 NavigateToString 方法載入的內容。

適用於