The ContentVisibilityAutoStateChangeEvent() constructor creates a new ContentVisibilityAutoStateChangeEvent object instance.
new ContentVisibilityAutoStateChangeEvent(type, options)typeA string representing the type of event. In the case of ContentVisibilityAutoStateChangeEvent this is always event.
options OptionalAn object that contains the following properties:
skippedA 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.
canvasElem.addEventListener("contentvisibilityautostatechange", (event) => {
// …
});contentvisibilityautostatechange eventcontent-visibility propertycontain property