Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-04-12 10:05:03 +08:00
commit 265490b550
18 changed files with 554 additions and 95 deletions

View file

@ -14,7 +14,7 @@ typedef double DOMHighResTimeStamp;
typedef sequence <PerformanceEntry> PerformanceEntryList;
[Exposed=(Window,Worker)]
interface Performance {
interface Performance : EventTarget {
[DependsOn=DeviceState, Affects=Nothing]
DOMHighResTimeStamp now();
@ -44,6 +44,14 @@ partial interface Performance {
entryType);
};
// https://w3c.github.io/user-timing/#extensions-performance-interface
dictionary PerformanceMeasureOptions {
any detail;
(DOMString or DOMHighResTimeStamp) start;
DOMHighResTimeStamp duration;
(DOMString or DOMHighResTimeStamp)end;
};
// http://www.w3.org/TR/resource-timing/#extensions-performance-interface
[Exposed=Window]
partial interface Performance {
@ -64,15 +72,23 @@ partial interface Performance {
};
#endif
// https://w3c.github.io/user-timing/#extensions-performance-interface
dictionary PerformanceMarkOptions {
any detail;
DOMHighResTimeStamp startTime;
};
// http://www.w3.org/TR/user-timing/
[Exposed=(Window,Worker)]
partial interface Performance {
[Func="Performance::IsEnabled", Throws]
void mark(DOMString markName);
PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions);
[Func="Performance::IsEnabled"]
void clearMarks(optional DOMString markName);
[Func="Performance::IsEnabled", Throws]
void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
PerformanceMeasure measure(DOMString measureName,
optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions,
optional DOMString endMark);
[Func="Performance::IsEnabled"]
void clearMeasures(optional DOMString measureName);
};

View file

@ -7,7 +7,8 @@
* http://www.w3.org/TR/user-timing/#performancemark
*/
[Exposed=(Window,Worker)]
[Exposed=(Window,Worker), Constructor(DOMString markName, optional PerformanceMarkOptions markOptions)]
interface PerformanceMark : PerformanceEntry
{
readonly attribute any detail;
};

View file

@ -10,4 +10,5 @@
[Exposed=(Window,Worker)]
interface PerformanceMeasure : PerformanceEntry
{
readonly attribute any detail;
};