Bagikan melalui


WebView.AllowedScriptNotifyUris Properti

Definisi

Catatan

AllowedScriptNotifyUris tidak didukung dalam aplikasi yang dikompilasi untuk Windows 8.1. Sebagai gantinya, perbarui bagian ApplicationContentUriRules dari manifes aplikasi. Untuk informasi selengkapnya, lihat bagian Keterangan.

Mendapatkan atau menetapkan daftar URI aman yang diizinkan untuk mengaktifkan peristiwa ScriptNotify ke WebView ini.

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)

Nilai Properti

Daftar aman URI yang diizinkan untuk mengaktifkan peristiwa ScriptNotify .

Atribut

Keterangan

Windows 8.1

AllowedScriptNotifyUris tidak didukung dalam aplikasi yang dikompilasi untuk Windows 8.1. Untuk mengaktifkan halaman web eksternal untuk mengaktifkan peristiwa ScriptNotify saat memanggil window.external.notify, Anda harus menyertakan URI halaman di bagian ApplicationContentUriRules dari manifes aplikasi. (Anda dapat melakukan ini di Visual Studio pada tab URI Konten dari perancang Package.appxmanifest .) URI dalam daftar ini harus menggunakan HTTPS, dan mungkin berisi kartubebas subdomain (misalnya, https://.microsoft.com) tetapi tidak boleh berisi kartubebas domain (misalnya, https://.com dan https://.). Persyaratan manifes tidak berlaku untuk konten yang berasal dari paket aplikasi, menggunakan URI ms-local-stream://, atau dimuat menggunakan NavigateToString.

Windows 8

Keterangan ini hanya berlaku untuk aplikasi yang dikompilasi untuk Windows 8, bahkan saat berjalan di Windows 8.1.

Untuk mengaktifkan halaman web eksternal untuk mengaktifkan peristiwa ScriptNotify saat memanggil window.external.notify, Anda harus menyertakan URI halaman dalam daftar yang dikembalikan oleh properti AllowedScriptNotifyUris. Atur properti ini ke AnyScriptNotifyUri untuk menunjukkan bahwa halaman apa pun dapat mengaktifkan peristiwa ScriptNotify untuk kontrol WebView ini. Persyaratan ini tidak berlaku untuk konten yang dimuat menggunakan metode NavigateToString .

Berlaku untuk