Document: fullscreenerror event - Web APIs 编辑
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 owns 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');
document.addEventListener('fullscreenerror', (event) => {
console.error('an error occurred changing into fullscreen');
console.log(event);
});
requestor.requestFullscreen();
Specifications
Specification | Status |
---|---|
Fullscreen API | Living Standard |
Browser compatibility
BCD tables only load in the browser
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论