WebView.AllowedScriptNotifyUris Свойство

Определение

Примечание

AllowedScriptNotifyUris не поддерживается в приложениях, скомпилированных для Windows 8.1. Вместо этого обновите раздел ApplicationContentUriRules манифеста приложения. Дополнительные сведения см. в разделе Примечания.

Возвращает или задает безопасный список универсальных кодов ресурса (URI), которым разрешено запускать события ScriptNotify в этом веб-представлении.

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)

Значение свойства

Безопасный список URI, которым разрешено запускать события ScriptNotify .

Атрибуты

Комментарии

Windows 8.1

AllowedScriptNotifyUris не поддерживается в приложениях, скомпилированных для Windows 8.1. Чтобы включить внешнюю веб-страницу для запуска события ScriptNotify при вызове window.external.notify, необходимо включить URI страницы в раздел ApplicationContentUriRules манифеста приложения. (Это можно сделать в Visual Studio на вкладке URI содержимого конструктора Package.appxmanifest .) URI в этом списке должны использовать протокол HTTPS и могут содержать подстановочные знаки поддоменов (например, https://.microsoft.com), но они не могут содержать подстановочные знаки домена (например, https://.com и https://.). Требования манифеста не применяются к содержимому, которое поступает из пакета приложения, использует URI ms-local-stream:// или загружается с помощью метода NavigateToString.

Windows 8

Эти замечания относятся только к приложениям, скомпилированным для Windows 8, даже если они работают на Windows 8.1.

Чтобы включить внешнюю веб-страницу для запуска события ScriptNotify при вызове window.external.notify, необходимо включить URI страницы в список, возвращаемый свойством AllowedScriptNotifyUris. Присвойте этому свойству значение AnyScriptNotifyUri , чтобы указать, что любая страница может запускать события ScriptNotify для этого элемента управления WebView . Это требование не применяется к содержимому, загруженному с помощью метода NavigateToString .

Применяется к