The PerformanceObserver
interface is used to observe performance measurement events and be notified of new performance entries as they are recorded in the browser's performance timeline.
Note: this interface is exposed to Window
and Worker
.
PerformanceObserver()
PerformanceObserver
object.PerformanceObserver.observe()
entry types
to observe. The performance observer's callback function will be invoked when a performance entry
is recorded for one of the specified entryTypes
PerformanceObserver.disconnect()
performance entries
.function perf_observer(list, observer) { // Process the "measure" event } var observer2 = new PerformanceObserver(perf_observer); observer2.observe({entryTypes: ["measure"]});
Specification | Status | Comment |
---|---|---|
Performance Timeline Time Level 2 The definition of 'PerformanceObserver' in that specification. | Editor's Draft | Initial definition of PerformanceObserver interface. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 52 | 57 (57) | No support | 39 | 11 |
Available on workers | 62 | ? | ? | 49 | ? |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | 52 | 57.0 (57) | No support | 39 | No support |
Available on workers | No support | 62 | ? | ? | 49 | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver