XRHitTestSource: 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 theXRHitTestSource interface unsubscribes a hit test.
In this article
Syntax
js
cancel()Parameters
None.
Return value
None (undefined).
Examples
>Unsubscribe from hit test
Thecancel() method unsubscribes from a hit test source. Since theXRHitTestSource object will no longer be usable, you can clean up and set it tonull.
js
hitTestSource.cancel();hitTestSource = null;Specifications
| Specification |
|---|
| WebXR Hit Test Module> # dom-xrhittestsource-cancel> |