Experimental
Wearable Only
Protected
constructorExperimental
Readonly
Experimental
canCheck if there is any back history on the web stack.
Readonly
Experimental
canCheck if there is any forward history on the web stack.
Readonly
Experimental
onThis event signals that the webview is ready for performing actions such as loadUrl
, etc. This also is when the WebView should be visible on the Texture that was originally provided.
Experimental
Returns the texture's aspect ratio, which is calculated as width / height.
Experimental
Returns the height of the texture in pixels.
Experimental
Experimental
Returns the name of this object's type.
Experimental
Get the current user-agent for the webview.
Experimental
Returns the width of the texture in pixels.
Experimental
Navigate back in the web history.
Experimental
Navigate forward in the web history.
Experimental
Returns true if the object matches or derives from the passed in type.
Experimental
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Experimental
Request a url to be loaded.
Experimental
Request the current page to be reloaded.
Experimental
Set a custom user-agent for the webview.
Note: By default all webviews will have the same user-agent set by the platform. This can be used to target Spectacles specific websites.
Experimental
Request the current page loading to stop.
Note: Has no effect if the page is already loaded.
Note: Does not stop scripts on the webpage.
Experimental
Touch will allow the lens creator to pass input events from the Lens to the WebView.
Note: Using the WebView from the Asset Library will have already implemented this logic with SIK and Hand Tracking and Mobile Controller and it is not expected for creators to re-implement this handling unless they wish to provide further customization and options.
WebPageTextureProvider is the associated texture control that can be accessed from the
texture.control
property. This allows you to call functions such asloadUrl(“https://snap.com”)
or to pass input events to.Note: Most functionality will require the
onReady
event to have been called. Any calls before this event may cause an exception.See
RemoteServiceModule#createWebView
Example