PerformanceObserver.idl 1.0 KB

12345678910111213141516171819202122232425
  1. #import <PerformanceTimeline/PerformanceObserverEntryList.idl>
  2. // https://w3c.github.io/performance-timeline/#dom-performanceobservercallbackoptions
  3. dictionary PerformanceObserverCallbackOptions {
  4. unsigned long long droppedEntriesCount;
  5. };
  6. callback PerformanceObserverCallback = undefined (PerformanceObserverEntryList entries, PerformanceObserver observer, optional PerformanceObserverCallbackOptions options = {});
  7. // https://w3c.github.io/performance-timeline/#dom-performanceobserverinit
  8. dictionary PerformanceObserverInit {
  9. sequence<DOMString> entryTypes;
  10. DOMString type;
  11. boolean buffered;
  12. };
  13. // https://w3c.github.io/performance-timeline/#dom-performanceobserver
  14. [Exposed=(Window,Worker)]
  15. interface PerformanceObserver {
  16. constructor(PerformanceObserverCallback callback);
  17. undefined observe(optional PerformanceObserverInit options = {});
  18. undefined disconnect();
  19. PerformanceEntryList takeRecords();
  20. //[SameObject] static readonly attribute sequence<DOMString> supportedEntryTypes;
  21. };