PerformanceMark Class
A named time of the performance timeline of a global object (https://w3c.github.io/user-timing/#performancemark), created by Performance.Mark (which adds it to the timeline) or by its constructor (which does not).
public sealed class PerformanceMark : PerformanceEntry- Inheritance
PerformanceEntryPerformanceMark
Constructors
| Name | Description |
|---|---|
| PerformanceMark(GlobalScope, string, PerformanceMarkOptions?) | Creates a mark of a global object. |
| PerformanceMark(string, PerformanceMarkOptions?) | Creates a mark of the current global object. |
PerformanceMark overloads
PerformanceMark(GlobalScope, string, PerformanceMarkOptions?)
UserTiming.csCreates a mark of a global object.
public PerformanceMark(GlobalScope global, string markName, PerformanceMarkOptions? markOptions = null)Parameters
globalGlobalScope- The global object.
markNamestring- The name of the mark.
markOptionsPerformanceMarkOptions?- The time and the data of the mark.
PerformanceMark(string, PerformanceMarkOptions?)
UserTiming.csCreates a mark of the current global object.
public PerformanceMark(string markName, PerformanceMarkOptions? markOptions = null)Parameters
markNamestring- The name of the mark.
markOptionsPerformanceMarkOptions?- The time and the data of the mark.
Exceptions
TypeErrorException- The start time is negative.
DomException- A
SyntaxErrorwhen the name is the name of an attribute ofPerformanceTiming, in a window; aDataCloneErrorwhen the data cannot be structured-cloned.
See also
Properties
| Name | Description |
|---|---|
| Detail | Gets the data of the mark: the structured clone of the detail of the options, or null. |
Detail
UserTiming.csGets the data of the mark: the structured clone of the detail of the options, or null.
public object? Detail { get; }