Skip to content

Commit d09b20d

Browse files
committed
doc: add PerformanceObserver buffered document
The option `buffered` is not about queueing the `PerformanceEntry`s with loop or not. The current (and the spec) behavior is different with Node.js version <= v16.0.0
1 parent 062f8e3 commit d09b20d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/perf_hooks.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,10 @@ changes:
589589
pr-url: https://github.com/nodejs/node/pull/37136
590590
description: Updated to conform to User Timing Level 3. The
591591
buffered option has been removed.
592+
- version: REPLACEME
593+
pr-url: https://github.com/nodejs/node/pull/39297
594+
description: Updated to conform to Performance Timeline Level 2. The
595+
buffered option has been added back.
592596
-->
593597

594598
* `options` {Object}
@@ -597,6 +601,10 @@ changes:
597601
* `entryTypes` {string[]} An array of strings identifying the types of
598602
{PerformanceEntry} instances the observer is interested in. If not
599603
provided an error will be thrown.
604+
* `buffered` {boolean} If true, the observer callback is called with a
605+
list global `PerformanceEntry` buffered entries. If false, only
606+
`PerformanceEntry`s created after the time point are sent to the
607+
observer callback. **Default:** `false`.
600608

601609
Subscribes the {PerformanceObserver} instance to notifications of new
602610
{PerformanceEntry} instances identified either by `options.entryTypes`

0 commit comments

Comments
 (0)