通过该对象访问当前页面与性能指标有关的信息。
创建一个 PerformanceObserver
对象,该对象将用于接收 Lynx engine 产生的性能事件。
处理性能事件的回调函数,类型定义为 type PerformanceCallback = (entry: PerformanceEntry) => void
。entry 是 PerformanceEntry 的子类型。
当 PerformanceObserver 接收到性能事件时该回调被触发。
一个 PerformanceObserver
对象。
该示例展示了如何创建一个 PerformanceObserver
并监听 metric.fcp
和 pipeline
事件。
LCD tables only load in the browser