codecamp

微信小程序API 性能·PerformanceObserver对象

PerformanceObserver

基础库 2.11.0 开始支持,低版本需做兼容处理

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

属性

Array supportedEntryTypes

获取当前支持的所有性能指标类型


方法:

PerformanceObserver.disconnect()

基础库 2.11.0 开始支持,低版本需做兼容处理

停止监听




PerformanceObserver.observe(Object options)

基础库 2.11.0 开始支持,低版本需做兼容处理

开始监听

参数

Object options

设置 type 监听单个类型的指标,设置 entryTypes 监听多个类型指标。


微信小程序API 性能·Performance对象
微信小程序API 订阅消息
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定