元素
接口的
onfullscreenerror
property is an event handler for the
fullscreenerror
event which is sent to the element when an error occurs while attempting to transition into or out of full-screen mode.
targetElement.onfullscreenerror = fullscreenErrorHandler;
An error handler for the
fullscreenerror
事件。
This example attempts to switch into full-screen mode from outside a handler for a user-initiated event (such as a
click
or
keypress
event). Since full-screen mode changes are only permitted in response to a user input, this causes an error to occur, which triggers the delivery of the
fullscreenerror
event to the error handler,
let elem = document.querySelector("video")}}
elem.onfullscreenerror = function ( event ) {
displayWarning("Unable to switch into full-screen mode.");
};
//....
elem.requestFullscreen();
| 规范 | 状态 | 注释 |
|---|---|---|
|
全屏 API
The definition of 'onfullscreenerror' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onfullscreenerror
|
Chrome 57 | Edge ≤79 |
Firefox
64
|
IE ? | Opera Yes | Safari ? | WebView Android 57 | Chrome Android 57 |
Firefox Android
64
|
Opera Android Yes | Safari iOS ? | Samsung Internet Android 7.0 |
完整支持
兼容性未知
使用非标名称。
元素
accessKey
属性
childElementCount
children
classList
className
clientHeight
clientLeft
clientTop
clientWidth
currentStyle
firstElementChild
id
innerHTML
lastElementChild
localName
名称
namespaceURI
nextElementSibling
onfullscreenchange
onfullscreenerror
openOrClosedShadowRoot
outerHTML
part
prefix
previousElementSibling
runtimeStyle
scrollHeight
scrollLeft
scrollLeftMax
scrollTop
scrollTopMax
scrollWidth
shadowRoot
slot
tabStop
tagName
after()
animate()
append()
attachShadow()
before()
closest()
computedStyleMap()
createShadowRoot()
getAnimations()
getAttribute()
getAttributeNames()
getAttributeNode()
getAttributeNodeNS()
getAttributeNS()
getBoundingClientRect()
getClientRects()
getElementsByClassName()
getElementsByTagName()
getElementsByTagNameNS()
hasAttribute()
hasAttributeNS()
hasAttributes()
hasPointerCapture()
insertAdjacentElement()
insertAdjacentHTML()
insertAdjacentText()
matches()
msZoomTo()
prepend()
querySelector()
querySelector()
querySelectorAll()
querySelectorAll()
releasePointerCapture()
remove()
removeAttribute()
removeAttributeNode()
removeAttributeNS()
replaceChildren()
replaceWith()
requestFullscreen()
requestPointerLock()
scroll()
scrollBy()
scrollIntoView()
scrollIntoViewIfNeeded()
scrollTo()
setAttribute()
setAttributeNode()
setAttributeNodeNS()
setAttributeNS()
setCapture()
setPointerCapture()
toggleAttribute()
afterscriptexecute
auxclick
blur
click
compositionend
compositionstart
compositionupdate
contextmenu
copy
cut
dblclick
DOMActivate
DOMMouseScroll
error
focus
focusin
focusout
fullscreenchange
fullscreenerror
gesturechange
gestureend
gesturestart
keydown
keypress
keyup
mousedown
mouseenter
mouseleave
mousemove
mouseout
mouseover
mouseup
mousewheel
MozMousePixelScroll
msContentZoom
MSGestureChange
MSGestureEnd
MSGestureHold
MSGestureStart
MSGestureTap
MSInertiaStart
MSManipulationStateChanged
overflow
paste
scroll
select
show
touchcancel
touchend
touchmove
touchstart
underflow
webkitmouseforcechanged
webkitmouseforcedown
webkitmouseforceup
webkitmouseforcewillbegin
wheel