XRInputSourcesChangeEventInit.added

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRInputSourcesChangeEventInit property added specifies a list of input sources, each identified using an XRInputSource object, which the represented inputsourceschange event is to indicate are newly available for use.

Syntax

let inputSourcesEventInit = {
  session: xrSession,
  added: [newDevice1, ..., newDeviceN],
  removed: [removedDevice1, ..., newDeviceN],
};
myInputSourcesChangeEvent = new XRInputSourcesChangeEventInit("inputsourceschange", inputSourcesEventInit);

myInputSourcesChangeEvent = new XRInputSourcesChangeEventInit("inputsourceschange",
                            {
                              session: xrSession,
                              added: addedDeviceList,
                              removed: removedDeviceList
                            });

Value

An Array of zero or more XRInputSource objects, each representing one input device added to the XR system.

Specifications

Specification Status Comment
WebXR Device API
The definition of 'XRInputSourcesChangeEventInit.added' in that specification.
Working Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.XRInputSourcesChangeEventInit.added" (depth: 1) to the MDN compatibility data repository.