Performance.idl 1.5 KB

123456789101112131415161718192021222324252627282930
  1. #import <DOM/EventTarget.idl>
  2. #import <HighResolutionTime/DOMHighResTimeStamp.idl>
  3. #import <NavigationTiming/PerformanceTiming.idl>
  4. #import <PerformanceTimeline/PerformanceEntry.idl>
  5. #import <UserTiming/PerformanceMark.idl>
  6. // https://www.w3.org/TR/performance-timeline/#dom-performanceentrylist
  7. typedef sequence<PerformanceEntry> PerformanceEntryList;
  8. // https://w3c.github.io/hr-time/#sec-performance
  9. [Exposed=(Window, Worker), UseNewAKString]
  10. interface Performance : EventTarget {
  11. DOMHighResTimeStamp now();
  12. readonly attribute DOMHighResTimeStamp timeOrigin;
  13. readonly attribute PerformanceTiming timing;
  14. // https://w3c.github.io/user-timing/#extensions-performance-interface
  15. // "User Timing" extensions to the Performance interface
  16. PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions = {});
  17. undefined clearMarks(optional DOMString markName);
  18. // FIXME: PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions = {}, optional DOMString endMark);
  19. // FIXME: undefined clearMeasures(optional DOMString measureName);
  20. // https://www.w3.org/TR/performance-timeline/#extensions-to-the-performance-interface
  21. // "Performance Timeline" extensions to the Performance interface
  22. PerformanceEntryList getEntries();
  23. PerformanceEntryList getEntriesByType(DOMString type);
  24. PerformanceEntryList getEntriesByName(DOMString name, optional DOMString type);
  25. };