Window:performance 属性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

Window 接口的 performance 属性返回一个 Performance 对象,该对象可用于收集有关在窗口的作用域内运行的代码的性能信息。

性能条目是特定于上下文的。如果在主线程(或其他 worker)上创建一个标记,那么你无法在 worker 线程中看到它,反之亦然。

一个 Performance 对象,用于获取在窗口的作用域内运行的代码的性能以及与计时相关的信息。

规范

Specification
High Resolution Time
# the-performance-attribute

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
performance
Available in workers

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Has more compatibility info.

参见