Element: fullscreenerror event
The fullscreenerror
event is fired when the browser cannot switch to full-screen mode.
Bubbles | Yes |
---|---|
Cancelable | No |
Interface | Event |
Event handler property | onfullscreenerror |
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 contains that element.
For some reasons that switching into full-screen mode might fail, see the guide to the Fullscreen API.
Examples
const requestor = document.querySelector('div'); requestor.addEventListener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestFullscreen();
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
fullscreenerror_event |
71
18
|
79
12
12-14
|
64
10
|
No |
58
15
12.1-15
|
6 |
71
≤37
|
71
18
|
64
10
|
50
14
12.1-14
|
12
Only available on iPad, not on iPhone.
|
10.0
1.0
|
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Element/fullscreenerror_event