Web APIs
performance.mark()
Creates a PerformanceMark entry. Optional startTime sets an explicit nonnegative timestamp; optional detail supplies associated data.
Formal Syntax & Structure
javascript syntaxjavascript
performance.mark(name, [options])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Mark name. |
| options | PerformanceMarkOptions | Optional timestamp and detail. |
Return Value
PerformanceMark
New mark entry.
Working Example
Example Snippetjavascript
(async () => {const m=performance.mark("v16-start",{startTime:10}); console.log(m.entryType,m.name,m.startTime);performance.clearMarks("v16-start");})()