XRHitTestSource.cancel()
The cancel()
method of the XRHitTestSource
interface unsubscribes a hit test.
Syntax
cancel()
Parameters
None.
Return value
Returns undefined
.
Examples
Unsubscribe from hit test
The cancel()
method unsubscribes from a hit test source. Since the XRHitTestSource
object will no longer be usable, you can clean up and set it to null
.
hitTestSource.cancel(); hitTestSource = null;
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
cancel |
81 |
81 |
No |
No |
No |
No |
No |
81 |
No |
No |
No |
13.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XRHitTestSource/cancel