pluginScriptsOriginAllowList property

Set<String>? pluginScriptsOriginAllowList
getter/setter pair

A Set of patterns that will be used to match the allowed origins that are able to load all the internal plugin UserScripts used by the plugin itself. Adding '*' as an allowed origin or setting this to null, it means it will allow every origin. Instead, an empty Set will block every origin.

NOTE: If javaScriptBridgeOriginAllowList is not present, this value will affect also the JavaScript Bridge internal plugin. Also, setting or changing this value after the WebView has been created won't have any effect. It should be set when initializing the WebView through PlatformWebViewCreationParams.initialSettings parameter.

NOTE for Android: each origin pattern MUST follow the table rule of PlatformInAppWebViewController.addWebMessageListener.

NOTE for iOS, macOS, Windows: each origin pattern will be used as a Regular Expression Pattern that will be used on JavaScript side using RegExp.

The default value is null and will allow every origin.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Windows WebView2

Implementation

Set<String>? pluginScriptsOriginAllowList;