PerformanceObserver

interface

interface PerformanceObserver

Observes performance measurement events and is notified of new PerformanceEntry objects as they are recorded in the performance timeline.

variable

var PerformanceObserver: { … }

Observes performance measurement events and is notified of new PerformanceEntry objects as they are recorded in the performance timeline.

Constructors

constructor

new PerformanceObserver(callback: PerformanceObserverCallback): PerformanceObserver

Properties

prototype

readonly prototype: PerformanceObserver

supportedEntryTypes

readonly supportedEntryTypes: readonly string[]

Methods

disconnect

disconnect(): void

Stops the observer from receiving any further performance entries.

observe

observe(options?: { entryTypes?: string[]; type?: string; buffered?: boolean }): void

Specifies the set of performance entry types to observe.

takeRecords

takeRecords(): PerformanceEntry[]

Returns the current list of buffered performance entries, emptying it.