Performance
Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.
interface Performance extends EventTarget {
readonly eventCounts: EventCounts;
readonly navigation: PerformanceNavigation;
onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
readonly timeOrigin: DOMHighResTimeStamp;
readonly timing: PerformanceTiming;
addEventListener<K extends keyof PerformanceEventMap>(
type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;clearMarks(markName?: string): void;
clearMeasures(measureName?: string): void;
clearResourceTimings(): void;
getEntries(): PerformanceEntryList;
getEntriesByType(type: string): PerformanceEntryList;
measure(
measureName: string,
startOrMeasureOptions?: string | PerformanceMeasureOptions,
endMark?: string,
): PerformanceMeasure;now(): DOMHighResTimeStamp;
removeEventListener<K extends keyof PerformanceEventMap>(
type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;setResourceTimingBufferSize(maxSize: number): void;
toJSON(): any;
}var Performance: {
prototype: Performance;
new (): Performance;
};§Extends
§Properties
§
readonly eventCounts: EventCounts
[src]§
onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null
[src]§
readonly timeOrigin: DOMHighResTimeStamp
[src]§
readonly timing: PerformanceTiming
[src]§Methods
§
addEventListener<K extends keyof PerformanceEventMap>(
[src]type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
getEntries(): PerformanceEntryList
[src]§
getEntriesByType(type: string): PerformanceEntryList
[src]§
measure(
[src]measureName: string,
startOrMeasureOptions?: string | PerformanceMeasureOptions,
endMark?: string,
): PerformanceMeasure§
now(): DOMHighResTimeStamp
[src]§
removeEventListener<K extends keyof PerformanceEventMap>(
[src]type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void