TextTrackCue: enter イベント
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.
enter
イベントは、キューがアクティブになったときに発行されます。字幕やキャプションの場合、メディア上に表示されるタイミングです。
構文
このイベント名を addEventListener()
などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。
js
addEventListener("enter", (event) => {});
onenter = (event) => {};
イベント型
一般的な Event
で、追加のプロパティはありません。
例
以下の例では、cue1
がアクティブキューになったときにコンソールに表示します。
js
cue1.addEventListener("enter", (event) => {
console.log("Cue 1 has displayed");
});
仕様書
Specification |
---|
HTML # event-media-enter |
HTML # handler-texttrackcue-onenter |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
enter event |
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.