Class WebViewPolicyExperimental

WebViewPolicy allows creators to control what websites are allowed to be loaded in the WebView. This can be helpful to prevent users from navigating away from your desired webpage through external links.

Note: Partial matches are now currently supported but subdomains are. *snap.com is not supported. *.snap.com is supported.

Note: * is not supported for complex patterns but a single * on its own can be used to represent "all".

Note: snap.com would be the same as *.snap.com.

// Create the options 
var resolution = new vec2(512, 512);
var options = RemoteServiceModule.createWebViewOptions(resolution);
optionsp.allow = [ "snap.com", "snapchat.com" ];
options.block = [ "*" ];
const resolution = new vec2(512,512);
const options = RemoteServiceModule.createWebViewOptions(resolution);

Hierarchy (View Summary, Expand)

Constructors

Properties

Methods

Constructors

Properties

allow: string[]

Set an allow list of websites that can be loaded.

Note: Default is to allow any website.

Note: The platform may block websites.

Note: A platform blocked website may not be overridden using this property.

block: string[]

Set a block list of websites that will not be loaded.

Note: Default is to not block any website.

Note: A platform allowed website can be blocked by this property.

Methods

  • Experimental

    Returns the name of this object's type.

    Returns string

  • Experimental

    Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Experimental

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR