非标准
该特性是非标准的,请尽量不要在生产环境中使用它!
向浏览器的 Performance 或者 Waterfall 工具添加一个标记。这样可以让你将代码中的一个点和其他在时间轴上已记录的事件相关联,例如布局事件和绘制事件等。
你可以选择用一个参数来作为时间戳标签,然后标记旁边就会显示这个标签。
Note: 此特性在 Web Worker 中可用。
Syntax
console.timeStamp(label);
Parameters
label
- Label for the timestamp. Optional.
Browser compatibility
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
?
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 未实现 | (Yes) | (Yes) |
Available in workers | (Yes) | 38.0 (38.0) | (Yes) | (Yes) | (Yes) |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | 10.0 (10.0) | ? | ? | ? |
Available in workers | ? | 38.0 (38.0) | ? | ? | ? |