@@ -427,12 +427,16 @@ The high resolution millisecond timestamp at which the V8 platform was
427427initialized.
428428
429429
430- ## Class: PerformanceObserver(callback)
430+ ## Class: PerformanceObserver
431+
432+ ### new PerformanceObserver(callback)
431433<!-- YAML
432434added: v8.5.0
433435-->
434436
435- * ` callback ` {Function} A ` PerformanceObserverCallback ` callback function.
437+ * ` callback ` {Function}
438+ * ` list ` {PerformanceObserverEntryList}
439+ * ` observer ` {PerformanceObserver}
436440
437441` PerformanceObserver ` objects provide notifications when new
438442` PerformanceEntry ` instances have been added to the Performance Timeline.
@@ -451,69 +455,16 @@ obs.observe({ entryTypes: ['mark'], buffered: true });
451455
452456performance .mark (' test' );
453457```
454-
455458Because ` PerformanceObserver ` instances introduce their own additional
456459performance overhead, instances should not be left subscribed to notifications
457460indefinitely. Users should disconnect observers as soon as they are no
458461longer needed.
459462
460- ### Callback: PerformanceObserverCallback(list, observer)
461- <!-- YAML
462- added: v8.5.0
463- -->
464-
465- * ` list ` {PerformanceObserverEntryList}
466- * ` observer ` {PerformanceObserver}
467-
468- The ` PerformanceObserverCallback ` is invoked when a ` PerformanceObserver ` is
463+ The ` callback ` is invoked when a ` PerformanceObserver ` is
469464notified about new ` PerformanceEntry ` instances. The callback receives a
470465` PerformanceObserverEntryList ` instance and a reference to the
471466` PerformanceObserver ` .
472467
473- ### Class: PerformanceObserverEntryList
474- <!-- YAML
475- added: v8.5.0
476- -->
477-
478- The ` PerformanceObserverEntryList ` class is used to provide access to the
479- ` PerformanceEntry ` instances passed to a ` PerformanceObserver ` .
480-
481- #### performanceObserverEntryList.getEntries()
482- <!-- YAML
483- added: v8.5.0
484- -->
485-
486- * Returns: {PerformanceEntry[ ] }
487-
488- Returns a list of ` PerformanceEntry ` objects in chronological order
489- with respect to ` performanceEntry.startTime ` .
490-
491- #### performanceObserverEntryList.getEntriesByName(name[ , type] )
492- <!-- YAML
493- added: v8.5.0
494- -->
495-
496- * ` name ` {string}
497- * ` type ` {string}
498- * Returns: {PerformanceEntry[ ] }
499-
500- Returns a list of ` PerformanceEntry ` objects in chronological order
501- with respect to ` performanceEntry.startTime ` whose ` performanceEntry.name ` is
502- equal to ` name ` , and optionally, whose ` performanceEntry.entryType ` is equal to
503- ` type ` .
504-
505- #### performanceObserverEntryList.getEntriesByType(type)
506- <!-- YAML
507- added: v8.5.0
508- -->
509-
510- * ` type ` {string}
511- * Returns: {PerformanceEntry[ ] }
512-
513- Returns a list of ` PerformanceEntry ` objects in chronological order
514- with respect to ` performanceEntry.startTime ` whose ` performanceEntry.entryType `
515- is equal to ` type ` .
516-
517468### performanceObserver.disconnect()
518469<!-- YAML
519470added: v8.5.0
@@ -569,6 +520,51 @@ for (let n = 0; n < 3; n++)
569520 performance .mark (` test${ n} ` );
570521```
571522
523+ ## Class: PerformanceObserverEntryList
524+ <!-- YAML
525+ added: v8.5.0
526+ -->
527+
528+ The ` PerformanceObserverEntryList ` class is used to provide access to the
529+ ` PerformanceEntry ` instances passed to a ` PerformanceObserver ` .
530+
531+ ### performanceObserverEntryList.getEntries()
532+ <!-- YAML
533+ added: v8.5.0
534+ -->
535+
536+ * Returns: {PerformanceEntry[ ] }
537+
538+ Returns a list of ` PerformanceEntry ` objects in chronological order
539+ with respect to ` performanceEntry.startTime ` .
540+
541+ ### performanceObserverEntryList.getEntriesByName(name[ , type] )
542+ <!-- YAML
543+ added: v8.5.0
544+ -->
545+
546+ * ` name ` {string}
547+ * ` type ` {string}
548+ * Returns: {PerformanceEntry[ ] }
549+
550+ Returns a list of ` PerformanceEntry ` objects in chronological order
551+ with respect to ` performanceEntry.startTime ` whose ` performanceEntry.name ` is
552+ equal to ` name ` , and optionally, whose ` performanceEntry.entryType ` is equal to
553+ ` type ` .
554+
555+ ### performanceObserverEntryList.getEntriesByType(type)
556+ <!-- YAML
557+ added: v8.5.0
558+ -->
559+
560+ * ` type ` {string}
561+ * Returns: {PerformanceEntry[ ] }
562+
563+ Returns a list of ` PerformanceEntry ` objects in chronological order
564+ with respect to ` performanceEntry.startTime ` whose ` performanceEntry.entryType `
565+ is equal to ` type ` .
566+
567+
572568## Examples
573569
574570### Measuring the duration of async operations
0 commit comments