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