This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Note: This feature is available in Web Workers.
The disconnect() method of the PerformanceObserver interface is used to stop the performance observer from receiving any performance entry events.
disconnect()
None.
None (undefined).
The following example disconnects the performance observer to disable receiving any more performance entry events.
const observer = new PerformanceObserver((list, obj) => {
list.getEntries().forEach((entry) => {
// Process "measure" events
// …
// Disable additional performance events
observer.disconnect();
});
});
observer.observe({ entryTypes: ["mark", "measure"] });
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
disconnect |
52 | 79 | 57 | 39 | 11 | 52 | 57 | 41 | 11 | 6.0 | 52 | 11 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/disconnect