Performance.toJSON()
Performance 的 toJSON() 方法是一个标准的串行器:它返回一个由 performance 对象各个属性组成的 JSONSyntax
myPerf = performance.toJSON()
Arguments
无
Return value
- myPerf
-
Performance对象序列化之后转化成的 JSON 对象。
Example
js
var js;
js = window.performance.toJSON();
console.log("json = " + JSON.stringify(js));
Specifications
| Specification |
|---|
| High Resolution Time # dom-performance-tojson |
Browser compatibility
BCD tables only load in the browser