XRTransientInputHitTestSource: phương thức cancel()
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Phương thức cancel() của giao diện XRTransientInputHitTestSource hủy đăng ký kiểm tra va chạm đầu vào thoáng qua.
Cú pháp
js
cancel()
Tham số
Không có.
Giá trị trả về
Không có (undefined).
Ví dụ
>Hủy đăng ký kiểm tra va chạm
Phương thức cancel() hủy đăng ký khỏi một nguồn kiểm tra va chạm đầu vào thoáng qua. Vì đối tượng XRTransientInputHitTestSource sẽ không còn dùng được nữa, bạn có thể dọn dẹp và đặt nó thành null.
js
transientHitTestSource.cancel();
transientHitTestSource = null;
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebXR Hit Test Module> # dom-xrtransientinputhittestsource-cancel> |