@@ -340,12 +340,16 @@ The high resolution millisecond timestamp at which the V8 platform was
340340initialized.
341341
342342
343- ## Class: PerformanceObserver(callback)
343+ ## Class: PerformanceObserver
344+
345+ ### new PerformanceObserver(callback)
344346<!-- YAML
345347added: v8.5.0
346348-->
347349
348- * ` callback ` {Function} A ` PerformanceObserverCallback ` callback function.
350+ * ` callback ` {Function}
351+ * ` list ` {PerformanceObserverEntryList}
352+ * ` observer ` {PerformanceObserver}
349353
350354` PerformanceObserver ` objects provide notifications when new
351355` PerformanceEntry ` instances have been added to the Performance Timeline.
@@ -364,69 +368,16 @@ obs.observe({ entryTypes: ['mark'], buffered: true });
364368
365369performance .mark (' test' );
366370```
367-
368371Because ` PerformanceObserver ` instances introduce their own additional
369372performance overhead, instances should not be left subscribed to notifications
370373indefinitely. Users should disconnect observers as soon as they are no
371374longer needed.
372375
373- ### Callback: PerformanceObserverCallback(list, observer)
374- <!-- YAML
375- added: v8.5.0
376- -->
377-
378- * ` list ` {PerformanceObserverEntryList}
379- * ` observer ` {PerformanceObserver}
380-
381- The ` PerformanceObserverCallback ` is invoked when a ` PerformanceObserver ` is
376+ The ` callback ` is invoked when a ` PerformanceObserver ` is
382377notified about new ` PerformanceEntry ` instances. The callback receives a
383378` PerformanceObserverEntryList ` instance and a reference to the
384379` PerformanceObserver ` .
385380
386- ### Class: PerformanceObserverEntryList
387- <!-- YAML
388- added: v8.5.0
389- -->
390-
391- The ` PerformanceObserverEntryList ` class is used to provide access to the
392- ` PerformanceEntry ` instances passed to a ` PerformanceObserver ` .
393-
394- #### performanceObserverEntryList.getEntries()
395- <!-- YAML
396- added: v8.5.0
397- -->
398-
399- * Returns: {PerformanceEntry[ ] }
400-
401- Returns a list of ` PerformanceEntry ` objects in chronological order
402- with respect to ` performanceEntry.startTime ` .
403-
404- #### performanceObserverEntryList.getEntriesByName(name[ , type] )
405- <!-- YAML
406- added: v8.5.0
407- -->
408-
409- * ` name ` {string}
410- * ` type ` {string}
411- * Returns: {PerformanceEntry[ ] }
412-
413- Returns a list of ` PerformanceEntry ` objects in chronological order
414- with respect to ` performanceEntry.startTime ` whose ` performanceEntry.name ` is
415- equal to ` name ` , and optionally, whose ` performanceEntry.entryType ` is equal to
416- ` type ` .
417-
418- #### performanceObserverEntryList.getEntriesByType(type)
419- <!-- YAML
420- added: v8.5.0
421- -->
422-
423- * ` type ` {string}
424- * Returns: {PerformanceEntry[ ] }
425-
426- Returns a list of ` PerformanceEntry ` objects in chronological order
427- with respect to ` performanceEntry.startTime ` whose ` performanceEntry.entryType `
428- is equal to ` type ` .
429-
430381### performanceObserver.disconnect()
431382<!-- YAML
432383added: v8.5.0
@@ -482,6 +433,51 @@ for (let n = 0; n < 3; n++)
482433 performance .mark (` test${ n} ` );
483434```
484435
436+ ## Class: PerformanceObserverEntryList
437+ <!-- YAML
438+ added: v8.5.0
439+ -->
440+
441+ The ` PerformanceObserverEntryList ` class is used to provide access to the
442+ ` PerformanceEntry ` instances passed to a ` PerformanceObserver ` .
443+
444+ ### performanceObserverEntryList.getEntries()
445+ <!-- YAML
446+ added: v8.5.0
447+ -->
448+
449+ * Returns: {PerformanceEntry[ ] }
450+
451+ Returns a list of ` PerformanceEntry ` objects in chronological order
452+ with respect to ` performanceEntry.startTime ` .
453+
454+ ### performanceObserverEntryList.getEntriesByName(name[ , type] )
455+ <!-- YAML
456+ added: v8.5.0
457+ -->
458+
459+ * ` name ` {string}
460+ * ` type ` {string}
461+ * Returns: {PerformanceEntry[ ] }
462+
463+ Returns a list of ` PerformanceEntry ` objects in chronological order
464+ with respect to ` performanceEntry.startTime ` whose ` performanceEntry.name ` is
465+ equal to ` name ` , and optionally, whose ` performanceEntry.entryType ` is equal to
466+ ` type ` .
467+
468+ ### performanceObserverEntryList.getEntriesByType(type)
469+ <!-- YAML
470+ added: v8.5.0
471+ -->
472+
473+ * ` type ` {string}
474+ * Returns: {PerformanceEntry[ ] }
475+
476+ Returns a list of ` PerformanceEntry ` objects in chronological order
477+ with respect to ` performanceEntry.startTime ` whose ` performanceEntry.entryType `
478+ is equal to ` type ` .
479+
480+
485481## Examples
486482
487483### Measuring the duration of async operations
0 commit comments