PerformanceObserver objects provide notifications when new PerformanceEntry instances have been added to the Performance Timeline.

See also:

Static variables

staticread onlysupportedEntryTypes:Array<PerformanceEntryType>

Get supported entry types.

Constructor

new(callback:PerformanceObserverCallback)

Creates a new PerformanceObserver.

The callback is invoked when a PerformanceObserver is notified about new PerformanceEntry instances.

Methods

disconnect():Void

Disconnects the PerformanceObserver instance from all notifications.

observe(options:PerformanceObserverObserveOptions):Void

Subscribes the instance to notifications of new instances identified either by options.entryTypes or options.type.

takeRecords():Array<PerformanceEntry>

Returns the current list of entries stored in the performance observer, emptying it out.