PerformanceObserver

PerformanceObserver 用于观察性能事件,并在 Lynx Engine 产生性能事件 (PerformanceEntry) 时收到通知。 它必须通过 lynx.performance.createObserver() 创建,并在创建时绑定一个回调函数用于处理接收到的性能事件。

实例方法

PerformanceObserver.observe()

指定要观察的性能事件类型集合并开始观察。

PerformanceObserver.disconnect()

停止接收性能事件。

示例

创建一个 PerformanceObserver

该示例展示了如何创建一个 PerformanceObserver 并监听 metric.fcppipeline 事件。

兼容性

LCD tables only load in the browser

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。