Experimental Wearable OnlyReadonly Experimental Wearable OnlycanCheck if there is any back history on the web stack.
Readonly Experimental Wearable OnlycanCheck if there is any forward history on the web stack.
Readonly Experimental Wearable OnlyonThis 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.
ExperimentalReturns the texture's aspect ratio, which is calculated as width / height.
ExperimentalReturns the height of the texture in pixels.
ExperimentalExperimentalReturns the name of this object's type.
Experimental Wearable OnlyGet the current user-agent for the webview.
ExperimentalReturns the width of the texture in pixels.
Experimental Wearable OnlyNavigate back in the web history.
Experimental Wearable OnlyNavigate forward in the web history.
ExperimentalReturns true if the object matches or derives from the passed in type.
ExperimentalReturns true if this object is the same as other. Useful for checking if two references point to the same thing.
Experimental Wearable OnlyRequest a url to be loaded.
Experimental Wearable OnlyRequest the current page to be reloaded.
Experimental Wearable OnlySet 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 Wearable OnlyRequest 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 Wearable OnlyTouch 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.controlproperty. This allows you to call functions such asloadUrl(“https://snap.com”)or to pass input events to.Note: Most functionality will require the
onReadyevent to have been called. Any calls before this event may cause an exception.See
RemoteServiceModule#createWebView
Example