const canvasElement = document.querySelector(".output-canvas");
const gl = canvasElement.getContext("webgl");
const xrSession = await navigator.xr.requestSession("immersive-vr");
await gl.makeXRCompatible();
const glBinding = new XRWebGLBinding(xrSession, gl);XRWebGLBinding: XRWebGLBinding() constructor / notebook
XRWebGLBinding: XRWebGLBinding() constructor
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.