Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The WebXR Device API interface XRInputSourcesChangeEvent is used to represent the inputsourceschange event sent to an XRSession when the set of available WebXR input controllers changes.
Event XRInputSourcesChangeEventCreates and returns a new XRInputSourcesChangeEvent object. The specified type must be inputsourceschange, which is the only event that uses this interface.
An array of zero or more XRInputSource objects, each representing an input device which has been newly connected or enabled for use.
removed Read onlyAn array of zero or more XRInputSource objects representing the input devices newly connected or enabled for use.
session Read onlyThe XRSession to which this input source change event is being directed.
While XRInputSourcesChangeEvent defines no methods of its own, it inherits methods from its parent interface, Event.
Delivered to the XRSession when the set of input devices available to it changes.
The following example shows how to set up an event handler which uses inputsourceschange events to detect newly-available pointing devices and to load their models in preparation to display them in the next animation frame.
You can also add a handler for inputsourceschange events by setting the oninputsourceschange event handler:
| WebXR Device API # xrinputsourceschangeevent-interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 17, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.