PerformanceObserverInit buffered flag

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.

Documentation

Specification

Editor's draft

Status in Chromium

Blink>PerformanceAPIs


Enabled by default (tracking bug) in:

  • Chrome for desktop release 77
  • Chrome for Android release 77
  • Android WebView release 77

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2019-08-09