1. 開発者向けのウェブ技術
  2. Web API
  3. PerformanceEventTiming
  4. processingStart

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

PerformanceEventTiming: processingStart プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

読み取り専用の processingStart プロパティは、イベント配信が開始された時刻を返します。これは、イベントハンドラーが実行されようとしている時点です。

DOMHighResTimeStamp タイムスタンプです。

processingStart プロパティの使用

processingStart プロパティはイベントタイミング項目 (PerformanceEventTiming) を監視するときに使用することができます。例えば、入力遅延やイベント処理時間を計算する場合などです。

js
const observer = new PerformanceObserver((list) => {
 list.getEntries().forEach((entry) => {
 // 時間全体
 const duration = entry.duration;
 // 入力遅延(イベント処理前)
 const delay = entry.processingStart - entry.startTime;
 // 銅器イベント処理時間
 // (配信の開始から終了まで)
 const time = entry.processingEnd - entry.processingStart;
 });
});
// イベントのオブザーバーを登録
observer.observe({ type: "event", buffered: true });

仕様書

Specification
Event Timing API
# dom-performanceeventtiming-processingstart

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /