For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-api/performance-api/performance-observer.md.
Lynx
  • English
  • PerformanceObserver BTS

    The PerformanceObserver is used to observe performance events and receive notifications when Lynx Engine generates performance entries. It must be created through lynx.performance.createObserver() and bind with a callback function for handling received performance entries upon creation.

    Instance methods

    PerformanceObserver.observe()

    Specify a set of performance entry types to observe and start observing.

    PerformanceObserver.disconnect()

    Stop receiving performance entries.

    Examples

    Creating a PerformanceObserver

    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.