ContentVisibilityAutoStateChangeEvent: skipped プロパティ
skipped
は ContentVisibilityAutoStateChangeEvent
インターフェイスの読み取り専用プロパティで、ユーザーエージェントが要素のコンテンツをスキップする場合は true
を返し、そうでない場合は false
を返します。
値
論理値です。ユーザーエージェントが要素のコンテンツをスキップした場合は true
を返し、そうでない場合は false
を返します。
例
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);
}
}
// キャンバスの更新を始める必要があるときに呼び出されます。
function startCanvasUpdates(canvas) {
// …
}
// キャンバスの更新を停止する必要がある場合に呼び出されます。
function stopCanvasUpdates(canvas) {
// …
}
仕様書
Specification |
---|
CSS Containment Module Level 2 # dom-contentvisibilityautostatechangeevent-skipped |
ブラウザーの互換性
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.
関連情報
contentvisibilityautostatechange
イベント- CSS 拘束
content-visibility
プロパティcontain
プロパティ