WebView.AllowedScriptNotifyUris Proprietà

Definizione

Nota

AllowedScriptNotifyUris non è supportato nelle app compilate per Windows 8.1. Aggiornare invece la sezione ApplicationContentUriRules del manifesto dell'app. Per altre info, vedi la sezione Osservazioni.

Ottiene o imposta un elenco sicuro di URI autorizzati a generare eventi ScriptNotify in questo controllo WebView.

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)

Valore della proprietà

Elenco sicuro di URI autorizzati a generare eventi ScriptNotify .

Attributi

Commenti

Windows 8.1

AllowedScriptNotifyUris non è supportato nelle app compilate per Windows 8.1. Per consentire a una pagina Web esterna di attivare l'evento ScriptNotify quando si chiama window.external.notify, è necessario includere l'URI della pagina nella sezione ApplicationContentUriRules del manifesto dell'app. Questa operazione può essere eseguita in Visual Studio nella scheda URI contenuto della finestra di progettazione Package.appxmanifest. Gli URI in questo elenco devono usare HTTPS e possono contenere caratteri jolly sottodomini (ad esempio, https://.microsoft.com) ma non possono contenere caratteri jolly di dominio(ad esempio, https://.com e https://). Il requisito per il manifesto non si applica al contenuto che proviene dal pacchetto dell'app, usa un URI ms-local-stream:// oppure viene caricato tramite NavigateToString.

Windows 8

Queste osservazioni si applicano solo alle app compilate per Windows 8, anche quando vengono eseguite in Windows 8.1.

Per consentire a una pagina Web esterna di generare l'evento ScriptNotify quando si chiama window.external.notify, è necessario includere l'URI della pagina nell'elenco restituito dalla proprietà AllowedScriptNotifyUris. Impostare questa proprietà su AnyScriptNotifyUri per indicare che qualsiasi pagina può generare eventi ScriptNotify per questo controllo WebView . Questo requisito non si applica al contenuto caricato usando il metodo NavigateToString .

Si applica a