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 方法加载的内容。

适用于