XRTransientInputHitTestSource: cancel() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Thecancel() method of theXRTransientInputHitTestSource interface unsubscribes a transient input hit test.
In this article
Syntax
js
cancel()Parameters
None.
Return value
None (undefined).
Examples
>Unsubscribe from hit test
Thecancel() method unsubscribes from a transient input hit test source. Since theXRTransientInputHitTestSource object will no longer be usable, you can clean up and set it tonull.
js
transientHitTestSource.cancel();transientHitTestSource = null;Specifications
| Specification |
|---|
| WebXR Hit Test Module> # dom-xrtransientinputhittestsource-cancel> |