← Back to release summary

type in PerformanceObserver's observe() dictionary

Category
Performance
Type
New or changed feature
Status
Enabled by default (Chrome 74)
Intent stage
None

Summary

The addition of the 'type' member will allow passing in parameters specific to one entry type when calling observe() within PerformanceObserver. Right now, 'entryTypes' is used to specify potentially multiple entry types to be observed at the same time. An observer can only use 'entryTypes' or 'type'. An observer can only specify additional parameters when using 'type'. An observer can still observe multiple entry types by calling observe() with 'type' multiple times.

Standards & signals

Samples: See Example 2 in https://w3c.github.io/performance-timeline/#introduction

View on chromestatus.com