Make Performance Timeline API work in Workers

This commit is contained in:
Fernando Jiménez Moreno 2017-08-30 17:52:18 +02:00
parent 449ffb23ac
commit fb843c251a
20 changed files with 146 additions and 128 deletions

View file

@ -9,17 +9,19 @@
typedef double DOMHighResTimeStamp;
typedef sequence<PerformanceEntry> PerformanceEntryList;
[Exposed=(Window,Worker)]
[Exposed=(Window, Worker)]
interface Performance {
DOMHighResTimeStamp now();
};
[Exposed=(Window)]
partial interface Performance {
readonly attribute PerformanceTiming timing;
/* readonly attribute PerformanceNavigation navigation; */
};
partial interface Performance {
DOMHighResTimeStamp now();
};
// https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
[Exposed=(Window, Worker)]
partial interface Performance {
PerformanceEntryList getEntries();
PerformanceEntryList getEntriesByType(DOMString type);

View file

@ -6,7 +6,7 @@
* https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-navigation-timing-interface
*/
[Exposed=(Window,Worker)]
[Exposed=(Window)]
interface PerformanceTiming {
readonly attribute unsigned long long navigationStart;
/* readonly attribute unsigned long long unloadEventStart;

View file

@ -98,11 +98,6 @@ interface WindowBase64 {
};
Window implements WindowBase64;
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-window.performance-attribute
partial interface Window {
[Replaceable] readonly attribute Performance performance;
};
// https://html.spec.whatwg.org/multipage/#Window-partial
partial interface Window {
void captureEvents();

View file

@ -26,5 +26,11 @@ interface WindowOrWorkerGlobalScope {
// ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options);
};
// https://w3c.github.io/hr-time/#the-performance-attribute
partial interface WindowOrWorkerGlobalScope {
[Replaceable]
readonly attribute Performance performance;
};
Window implements WindowOrWorkerGlobalScope;
WorkerGlobalScope implements WindowOrWorkerGlobalScope;