Element: fullscreenerror event

The fullscreenerror event is fired when the browser cannot switch to fullscreen mode.

As with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the Element which failed to change modes, and the second is sent to the Document which owns that element.

For some reasons that switching into fullscreen mode might fail, see the guide to the Fullscreen API.

This event is not cancelable.


Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("fullscreenchange", (event) => {});

onfullscreenchange = (event) => {};

Event type

A generic Event.


const requestor = document.querySelector("div");

function handleError(event) {
  console.error("an error occurred changing into fullscreen");

requestor.addEventListener("fullscreenerror", handleError);
// or
requestor.onfullscreenerror = handleError;



Fullscreen API Standard
# handler-document-onfullscreenerror

Browser compatibility

BCD tables only load in the browser

See also