The spec defines session.inputSources as a XRInputSourceArray, a stripped-down arraylike interface. The polyfill currently exposes it as a regular JS array instead.
I ran into this when trying out Chrome beta's native implementation, where my polyfill-backed code was happily doing inputSources.map(...) which suddenly broke. The polyfill should implement the XRInputSourceArray interface and expose that instead.
The spec defines
session.inputSources
as a XRInputSourceArray, a stripped-down arraylike interface. The polyfill currently exposes it as a regular JS array instead.I ran into this when trying out Chrome beta's native implementation, where my polyfill-backed code was happily doing
inputSources.map(...)
which suddenly broke. The polyfill should implement theXRInputSourceArray
interface and expose that instead.I have a work in progress for this here - I welcome any suggestions or concerns with that approach before I work it up into a PR: https://github.com/lojjic/webxr-polyfill/tree/XRInputSourceArray