console:timeStamp() 静态方法

非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!

向浏览器的 Performance 或者 Waterfall 工具添加一个标记。这样可以让你将代码中的一个点和其他在时间轴上已记录的事件相关联,例如布局事件和绘制事件等。

你可以选择用一个参数来作为时间戳标签,然后标记旁边就会显示这个标签。

备注: 此特性在 Web Worker 中可用。

语法

js
timeStamp(label)

参数

label

Label for the timestamp. Optional.

浏览器兼容性

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
timeStamp() static method
Non-standard

Legend

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

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
User must explicitly enable this feature.

参见