const requestor = document.querySelector("div");
function handleError(event) {
console.error("an error occurred changing into fullscreen");
console.log(event);
}
document.addEventListener("fullscreenerror", handleError);
// Or (but note that this replaces other event listeners
// added using onfullscreenerror, if any)
document.onfullscreenerror = handleError;
requestor.requestFullscreen();Document: fullscreenerror event / notebook
Document: fullscreenerror event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.