Draft This page is not complete.
Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The oninputsourcechange
attribute of the XRSession
object is the event handler for the inputsourcechange
event, which is dispatched when session's list of active XR input sources has changed. The list itself is accessible via XRSession.inputSources
.
Note: The XRInputSource
objects in XRSession.inputSources
array are "live", so values within them are updated in-place. Therefore if you wish to compare input states between frames, you should make a copy of the content of the state in question.
Syntax
XRSession.oninputsourceschange = function(event) { ... }
Example
XRSession.oninputsourceschange = function(event) {
console.log("The list of active XR input sources has changed.")
}
Specifications
Specification | Status | Comment |
---|---|---|
WebXR Device APIThe definition of 'XRSession.oninputsourceschange' in that specification. | Working Draft | Initial definition. |
Browser compatibility
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
oninputsourceschange
|
Chrome
Full support 79 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
No support No |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 79 |
Firefox Android
No support No |
Opera Android
No support No |
Safari iOS
No support No |
Samsung Internet Android
Full support 11.2 |
Legend
- Full support
- Full support
- No support
- No support
See also
XRSession.oninputsourceschange by Mozilla Contributors is licensed under CC-BY-SA 2.5.