doc: add doc for PerformanceObserver.takeRecords()

PR-URL: https://github.com/nodejs/node/pull/55786
Fixes: https://github.com/nodejs/node/issues/55779
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
pull/55988/head
skyclouds2001 2024-11-25 18:02:32 +08:00 committed by GitHub
parent abd95a85c5
commit b17a1fb1ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -1339,6 +1339,14 @@ for (let n = 0; n < 3; n++)
performance.mark(`test${n}`);
```
### `performanceObserver.takeRecords()`
<!-- YAML
added: v16.0.0
-->
* Returns: {PerformanceEntry\[]} Current list of entries stored in the performance observer, emptying it out.
## Class: `PerformanceObserverEntryList`
<!-- YAML