HTML oncontentvisibilityautostatechange Event Attribute
Description
The oncontentvisibilityautostatechange event attribute runs a script on an element with content-visibility: auto when the browser starts or stops skipping the rendering of its contents, usually because the element scrolls into or out of view.
The event is a ContentVisibilityAutoStateChangeEvent with a single property, skipped: true when the contents are no longer rendered and false when they are rendered again. Pages can use it to pause work that is not visible, such as canvas animations or network polling, and resume it when the element becomes relevant again.
Syntax
<element oncontentvisibilityautostatechange="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML oncontentvisibilityautostatechange event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





