PageTransitionEvent: PageTransitionEvent() コンストラクター
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年1月.
PageTransitionEvent() コンストラクターは、新しい PageTransitionEvent オブジェクトを生成します。これは、ページが読み込まれたり、読み込まれなかったりする際に window オブジェクトで発行される pageshow または pagehide イベントで使用します。
構文
js
new PageTransitionEvent(type, options)
引数
type-
イベント名の文字列です。 大文字小文字の区別があり、ブラウザーは
pageshowまたはpagehideに設定します。 options省略可-
オブジェクトで、
Event()で定義されているプロパティに加えて、以下のプロパティがあります。persisted省略可-
論理値で、文書内のキャッシュから読み込んでいるかどうかを示します。
返値
新しい PageTransitionEvent オブジェクトです。
仕様書
| Specification |
|---|
| HTML> # the-pagetransitionevent-interface> |