lynx: performance readonly object

This object provides access to performance metrics related to the current page.

Instance Methods

createObserver()

Creates a PerformanceObserver object that will be used to receive performance events generated by Lynx engine.

Syntax

createObserver(callback: PerformanceCallback): PerformanceObserver;

Parameters

callback

A callback function that handles performance events, defined as type PerformanceCallback = (entry: PerformanceEntry) => void. The entry is a subclass of PerformanceEntry.

This callback is triggered when the PerformanceObserver receives a performance event.

Return Value

A PerformanceObserver object.

Examples

The following example creates a PerformanceObserver watching for metric.fcp and pipeline entries.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.