PerformanceObserver.idl 1.1 KB

1234567891011121314151617181920212223242526
  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. // FIXME: [SameObject] static readonly attribute FrozenArray<DOMString> supportedEntryTypes;
  21. [SameObject] static readonly attribute any supportedEntryTypes;
  22. };