mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add [Default] toJSON() to performance interfaces
This commit is contained in:
parent
1af15054e7
commit
5695ee94a5
13 changed files with 218 additions and 104 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-window.performance-attribute
|
||||
* https://w3c.github.io/hr-time/#sec-performance
|
||||
*/
|
||||
|
||||
typedef double DOMHighResTimeStamp;
|
||||
|
@ -13,7 +13,7 @@ typedef sequence<PerformanceEntry> PerformanceEntryList;
|
|||
interface Performance : EventTarget {
|
||||
DOMHighResTimeStamp now();
|
||||
readonly attribute DOMHighResTimeStamp timeOrigin;
|
||||
// [Default] object toJSON();
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
// https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
|
||||
|
|
|
@ -12,6 +12,5 @@ interface PerformanceEntry {
|
|||
readonly attribute DOMString entryType;
|
||||
readonly attribute DOMHighResTimeStamp startTime;
|
||||
readonly attribute DOMHighResTimeStamp duration;
|
||||
|
||||
// [Default] object toJSON();
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
|
|
@ -14,5 +14,5 @@ interface PerformanceNavigation {
|
|||
const unsigned short TYPE_RESERVED = 255;
|
||||
readonly attribute unsigned short type;
|
||||
readonly attribute unsigned short redirectCount;
|
||||
// [Default] object toJSON();
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ interface PerformanceNavigationTiming : PerformanceResourceTiming {
|
|||
readonly attribute DOMHighResTimeStamp loadEventEnd;
|
||||
readonly attribute NavigationType type;
|
||||
readonly attribute unsigned short redirectCount;
|
||||
// [Default] object toJSON();
|
||||
[Default] object toJSON();
|
||||
/* Servo-only attribute for measuring when the top-level document (not iframes) is complete. */
|
||||
[Pref="dom.testperf.enabled"]
|
||||
readonly attribute DOMHighResTimeStamp topLevelDomComplete;
|
||||
|
|
|
@ -26,5 +26,5 @@ interface PerformanceResourceTiming : PerformanceEntry {
|
|||
/// readonly attribute unsigned long long transferSize;
|
||||
/// readonly attribute unsigned long long encodedBodySize;
|
||||
/// readonly attribute unsigned long long decodedBodySize;
|
||||
// [Default] object toJSON();
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue