Skip to main content
Version: 3.x

PerformanceObserver

PerformanceObserver 对象,用于监听性能相关事件

支持情况:

参考文档

方法​

参数类型说明
supportedEntryTypesPerformanceEntry[]获取当前支持的所有性能指标类型

disconnect​

停止监听

支持情况:

参考文档

() => void

observe​

开始监听

支持情况:

参考文档

(option: Option) => void
参数类型
optionOption

参数​

observe​

Option​

参数类型说明
typekeyof EntryType指标类型。不能和 entryTypes 同时使用
entryTypes(keyof EntryType)[]指标类型列表。不能和 type 同时使用。

EntryType​

参数说明
navigation路由
render渲染
script脚本

API 支持度​

API微信小程序H5React NativeHarmonyASCF元服务
PerformanceObserver✔️
PerformanceObserver.disconnect✔️
PerformanceObserver.observe✔️