PerformanceMark
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.
Note: This feature is available inWeb Workers.
PerformanceMark is an interface forPerformanceEntry objects with anentryType of"mark".
Entries of this type are typically created by callingperformance.mark() to add anamedDOMHighResTimeStamp (themark) to the browser's performance timeline. To create a performance mark that isn't added to the browser's performance timeline, use the constructor.
In this article
Constructor
PerformanceMark()Creates a new
PerformanceMarkobject that isn't added to the browser's performance timeline.
Instance properties
PerformanceMark.detailContains arbitrary metadata about the measure.
This interface extends the followingPerformanceEntry properties by qualifying/constraining the properties as follows:
PerformanceEntry.entryTypeRead onlyReturns
"mark".PerformanceEntry.nameRead onlyReturns the name given to the mark when it was created via a call to
performance.mark().PerformanceEntry.startTimeRead onlyReturns the
DOMHighResTimeStampwhenperformance.mark()was called.PerformanceEntry.durationRead onlyReturns
0. (A mark has noduration.)
Instance methods
This interface has no methods.
Example
See the example inUsing the User Timing API.
Chrome DevTools usesperformance.mark() and in particular a structureddetail property as part of its extensibility API that surfaces these in custom tracks in performance traces. See the example inPerformance: mark() method page and theChrome's extensibility API documentation for more information and examples.
Specifications
| Specification |
|---|
| User Timing> # performancemark> |