const canvas = document.getElementById("canvas");
canvas.addEventListener("contextlost", (event) => {
console.log(event);
});HTMLCanvasElement: contextlost event / notebook
HTMLCanvasElement: contextlost event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const canvas = document.getElementById("canvas");
canvas.addEventListener("contextlost", (event) => {
event.preventDefault();
});