const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
canvas.addEventListener("webglcontextrestored", (e) => {
console.log(e);
});
gl.getExtension("WEBGL_lose_context").restoreContext();WEBGL_lose_context: restoreContext() method / notebook
WEBGL_lose_context: restoreContext() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.