PerformanceMark
は entryType
の "mark
" を持つPerformanceEntry
オブジェクトの抽象インターフェイスです。
このタイプのエントリは、performance.mark()
を呼び出して、ブラウザのパフォーマンスタイムラインに名前付き DOMHighResTimeStamp
(mark) を追加することによって作成されます。
<div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveAspectRatio="xMinYMin meet"><a xlink:href="https://developer.mozilla.org/ja/docs/Web/API/PerformanceEntry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">PerformanceEntry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#D4DDE4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#D4DDE4"/><a xlink:href="https://developer.mozilla.org/ja/docs/Web/API/PerformanceMark" target="_top"><rect x="201" y="1" width="150" height="50" fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="276" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">PerformanceMark</text></a></svg></div>
a:hover text { fill: #0095DD; pointer-events: all;}
プロパティ
このインターフェイスはプロパティを持ちませんが、以下のようにプロパティを修飾/制約することで以下の PerformanceEntry
プロパティを拡張します。
PerformanceEntry.entryType
- "
mark
" を返します。 PerformanceEntry.name
- マークが
performance.mark()
を呼び出して作成されたときに付けられた名前を返します。 PerformanceEntry.startTime
performance.mark()
が呼び出されたときにDOMHighResTimeStamp
を返します。PerformanceEntry.duration
- "
0
" を返します (マークには期間がありません)
メソッド
このインターフェイスにはメソッドがありません。
例
ユーザータイミング API の使用の例を参照してください。
仕様
仕様書 | ステータス | コメント |
---|---|---|
User Timing Level 2 PerformanceMark の定義 |
草案 | |
User Timing PerformanceMark の定義 |
勧告 | 基本的な定義 |
ブラウザの互換性
BCD tables only load in the browser
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.