demo ยท v135
Use isSessionSupported
Chrome 135 removes the long-deprecated navigator.xr.supportsSession(). The replacement, isSessionSupported(), returns a real Promise<boolean>. The probe below tries both and shows what your browser supports.
navigator.xr: ?
supportsSession removed?
old: supportsSession()
click probe
new: isSessionSupported()
click probe
the code
// OLD (removed Chrome 135)
// navigator.xr.supportsSession("immersive-vr");
// NEW
const ok = await navigator.xr?.isSessionSupported("immersive-vr");
if (ok) await navigator.xr.requestSession("immersive-vr");
see also
- navigator.xr.supportsSession removed โ feature index
- ChromeStatus entry
- WebXR spec