Baseline Widely available
Note: This feature is available in Web Workers.
The takeRecords()
method of the PerformanceObserver
interface returns the current list of PerformanceEntry
objects stored in the performance observer, emptying it out.
None.
Return valueA list of PerformanceEntry
objects.
The following example stores the current list of performance entries into records
and empties the performance observer.
const observer = new PerformanceObserver((list, obj) => {
list.getEntries().forEach((entry) => {
// Process "mark" and "measure" events
});
});
observer.observe({ entryTypes: ["mark", "measure"] });
const records = observer.takeRecords();
console.log(records[0].name);
console.log(records[0].startTime);
console.log(records[0].duration);
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3