Adds a buffered flag to observer.observe() so that PerformanceObserver can receive entries created before the call is executed.
We want to encourage using the PerformanceObserver because polling is more expensive and we have greater control over when PerformanceObserver callbacks occur. However, currently entries that were created before the observer begins observing are not reachable, thus creating a gap between start of page load and observer creation. The buffered flag solves that gap by enabling observers to access entries from before the observer creation. This way, we do not incentivize running a performance-related script very early during page load just so that some information is not missed.
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 77
- Chrome for Android release 77
- Android WebView release 77
Consensus & Standardization
Last updated on 2020-12-21