Lens Scripting API

    Class WebViewOptionsExperimental

    WebViewOptions allow you to specify various aspects of the WebView that will be created. These are only used at creation time.

    RemoteServiceModule#createWebViewOptions

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

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    requestPolicy: WebViewPolicy

    Allows the ability to set various web request policies.

    resolution: vec2

    The resolution of the WebView that was requested. Units are in pixels.

    Note: This resolution is unrelated to the device resolution. Note: This does not change the scale or dimensions of the RenderMeshVisual that is used to draw the WebView.

    Tip: For best results choose a resolution that best matches your expected aspect ratio and desired responsive size of web content. This can not be changed later without creating a new WebView instance.

    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