The ContentVisibilityAutoStateChangeEvent()
constructor creates a new ContentVisibilityAutoStateChangeEvent
object instance.
The ContentVisibilityAutoStateChangeEvent()
constructor creates a new ContentVisibilityAutoStateChangeEvent
object instance.
js
new ContentVisibilityAutoStateChangeEvent(type, options)
type
A string representing the type of event. In the case of ContentVisibilityAutoStateChangeEvent
this is always event
.
options
Optional
An object that contains the following properties:
skipped
A boolean, which is set to true
if the user agent skips the element's contents, or false
otherwise.
A developer would not use this constructor manually. A new ContentVisibilityAutoStateChangeEvent
object is constructed when a handler is invoked as a result of the contentvisibilityautostatechange
event firing.
js
canvasElem.addEventListener("contentvisibilityautostatechange", (event) => { // … });
Specification |
---|
CSS Containment Module Level 2 # dom-contentvisibilityautostatechangeevent-contentvisibilityautostatechangeevent |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ContentVisibilityAutoStateChangeEvent |
108 | 108 | 110 | No | 94 | No | 108 | 108 | No | 73 | No | 21.0 |
contentvisibilityautostatechange
eventcontent-visibility
propertycontain
property
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ContentVisibilityAutoStateChangeEvent/ContentVisibilityAutoStateChangeEvent