ContentVisibilityAutoStateChangeEvent: Eigenschaft skipped
Die schreibgeschützte Eigenschaft skipped
der ContentVisibilityAutoStateChangeEvent
-Schnittstelle gibt true
zurück, wenn der Benutzeragent den Inhalt des Elements überspringt, oder false
, wenn nicht.
Wert
Ein Boolean. Gibt true
zurück, wenn der Benutzeragent den Inhalt des Elements überspringt, oder false
andernfalls.
Beispiele
js
const canvasElem = document.querySelector("canvas");
canvasElem.addEventListener("contentvisibilityautostatechange", stateChanged);
canvasElem.style.contentVisibility = "auto";
function stateChanged(event) {
if (event.skipped) {
stopCanvasUpdates(canvasElem);
} else {
startCanvasUpdates(canvasElem);
}
}
// Call this when the canvas updates need to start.
function startCanvasUpdates(canvas) {
// …
}
// Call this when the canvas updates need to stop.
function stopCanvasUpdates(canvas) {
// …
}
Spezifikationen
Specification |
---|
CSS Containment Module Level 2 # dom-contentvisibilityautostatechangeevent-skipped |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
skipped |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
- Das
contentvisibilityautostatechange
Ereignis - CSS Containment
- Die
content-visibility
Eigenschaft - Die
contain
Eigenschaft