User Timing API

This commit is contained in:
Fernando Jiménez Moreno 2017-09-05 17:12:16 +02:00
parent f5e23a3a90
commit 8412f5403a
18 changed files with 272 additions and 13 deletions

View file

@ -28,3 +28,14 @@ partial interface Performance {
PerformanceEntryList getEntriesByName(DOMString name,
optional DOMString type);
};
// https://w3c.github.io/user-timing/#extensions-performance-interface
[Exposed=(Window,Worker)]
partial interface Performance {
[Throws]
void mark(DOMString markName);
void clearMarks(optional DOMString markName);
[Throws]
void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
void clearMeasures(optional DOMString measureName);
};

View file

@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://w3c.github.io/user-timing/#performancemark
*/
[Exposed=(Window,Worker)]
interface PerformanceMark : PerformanceEntry {
};

View file

@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://w3c.github.io/user-timing/#performancemeasure
*/
[Exposed=(Window,Worker)]
interface PerformanceMeasure : PerformanceEntry {
};