Web APIs
performance.clearMarks()
Remove stored marks by name or clear all marks when the name is omitted. This does not remove measures. Example console output: 0 1.
Formal Syntax & Structure
javascript syntaxjavascript
performance.clearMarks([name])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Mark name, or omit to clear all marks. |
Return Value
undefined
No result value.
Working Example
Example Snippetjavascript
performance.mark("a"); performance.mark("b"); performance.clearMarks("a"); console.log(performance.getEntriesByName("a").length,performance.getEntriesByName("b").length);