安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

XRInputSourcesChangeEventInit property 添加 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.

句法

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
                            });
					

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

规范

规范 状态 注释
WebXR 设备 API
The definition of 'XRInputSourcesChangeEventInit.added' in that specification.
工作草案 初始定义。

浏览器兼容性

No compatibility data found. Please contribute data for "api.XRInputSourcesChangeEventInit.added" (depth: 1) to the MDN 兼容性数据存储库 .

元数据

  • 最后修改: