Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Element
  4. fullscreenerror

Element: fullscreenerror event

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

As with thefullscreenchange event, twofullscreenerror events are fired; the first is sent to theElement which failed to change modes, and the second is sent to theDocument which owns that element.

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

This event is not cancelable.

Syntax

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

js
addEventListener("fullscreenerror", (event) => { })onfullscreenerror = (event) => { }

Event type

A genericEvent.

Examples

js
const requestor = document.querySelector("div");function handleError(event) {  console.error("an error occurred changing into fullscreen");  console.log(event);}requestor.addEventListener("fullscreenerror", handleError);// orrequestor.onfullscreenerror = handleError;requestor.requestFullscreen();

Specifications

Specification
Fullscreen API
# handler-document-onfullscreenerror

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp