A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/Element/beforexrselect_event below:

Element: beforexrselect event - Web APIs

Element: beforexrselect event

Limited availability

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The beforexrselect event is fired before WebXR select events (select, selectstart, selectend) are dispatched. It can be used to suppress XR world input events while the user is interacting with a DOM overlay UI.

This event bubbles, is cancelable and is composed.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("beforexrselect", (event) => { })

onbeforexrselect = (event) => { }
Event type Event properties
session Read only

The XRSession to which the event refers.

Event availability

The beforexrselect event is a global event and available to the following interfaces:

Examples

To suppress WebXR select events (select, selectstart, selectend), an application can listen for the beforexrselect event. The event bubbles, so a call to preventDefault() on the DOM overlay element will prevent any WebXR select events within this container allowing interaction with the DOM element and avoiding duplicate event input to the XR world.

document
  .getElementById("xr-overlay")
  .addEventListener("beforexrselect", (ev) => ev.preventDefault());
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4