demo · v135
One-shot rewrite to the modern API
navigator.xr.supportsSession() was deprecated in 2019 after TAG feedback — the replacement is isSessionSupported(), which fixes a returns-boolean-vs-resolves-with-undefined ambiguity. Paste any code below; the tool rewrites every reference and shows you what the diff would look like.
isSessionSupported: ?
your code
before
after (modern API)
the rewrite
// old
const ok = await navigator.xr.supportsSession("immersive-vr");
if (ok) startVR();
// new
const ok = await navigator.xr.isSessionSupported("immersive-vr");
if (ok) startVR();