PageTransitionEvent
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
コンストラクター
PageTransitionEvent()
-
新しい
PageTransitionEvent
オブジェクトを生成します。
インスタンスプロパティ
このインターフェイスには、親である Event
から継承したプロパティもあります。
PageTransitionEvent.persisted
読取専用-
キャッシュから読み込んでいる文書であるかどうかを示します。
例
HTML
html
<!doctype html>
<html lang="ja">
<body></body>
</html>
JavaScript
js
window.addEventListener("pageshow", (event) => {
if (event.persisted) {
alert("このページはブラウザーがキャッシュしたものです");
} else {
alert("このページはブラウザーがキャッシュしたものではありません");
}
});
仕様書
Specification |
---|
HTML # the-pagetransitionevent-interface |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
PageTransitionEvent | ||||||||||||
PageTransitionEvent() constructor | ||||||||||||
persisted |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full 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.