PerformanceObserver

The PerformanceObserver interface is used to observe performance measurement events and be notified of new PerformanceEntry as they are recorded in the browser's performance timeline.

MDN Reference

Constructors

Link copied to clipboard
constructor(callback: PerformanceObserverCallback)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

The disconnect() method of the PerformanceObserver interface is used to stop the performance observer from receiving any PerformanceEntry events.

Link copied to clipboard
fun observe(options: PerformanceObserverInit = definedExternally)

The observe() method of the PerformanceObserver interface is used to specify the set of performance entry types to observe.

Link copied to clipboard

The takeRecords() method of the PerformanceObserver interface returns the current list of PerformanceEntry objects stored in the performance observer, emptying it out.