WebViewOptions
ClassWebViewOptions allow you to specify various aspects of the WebView that will be created.
- Available on all platforms
- SnapchatFully supported
- Experimental API; it may change or be removed.
- SPECSFully supported
- Experimental API; it may change or be removed.
- Camera Kit WebFully supported
- Experimental API; it may change or be removed.
- Camera Kit MobileFully supported
- Experimental API; it may change or be removed.
Experimental
WebViewOptions allow you to specify various aspects of the WebView that will be created. These are only used at creation time.
Index
Properties
Methods
Example
// Create the options
var resolution = new vec2(512, 512);
var options = InternetModule.createWebViewOptions(resolution);
options.policy.allow = [ "snap.com", "snapchat.com" ];
options.policy.block = [ "fakesnap.com" ];
const resolution = new vec2(512,512);
const options = InternetModule.createWebViewOptions(resolution);
Extends
Properties
requestPolicy
readonlyrequestPolicy:WebViewPolicy
Experimental
Allows the ability to set various web request policies.
resolution
resolution:
vec2
Experimental
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.
Default Value
(0, 0)
@experimental
Methods
getTypeName()
staticgetTypeName():TypeName<WebViewOptions>
Experimental
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<WebViewOptions>
Overrides
getTypeName()
getTypeName():
string
Experimental
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Experimental
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Experimental
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
See also
InternetModule#createWebViewOptions