-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Introduction
The Container Timing API enables monitoring when annotated sections of the DOM are displayed on screen and have finished their initial paint. A developer will have the ability to mark subsections of the DOM with the containertiming attribute (similar to elementtiming for the Element Timing API) and receive performance entries when that section has been painted for the first time. This API will allow developers to measure the timing of various components in their pages.
Motivation
As developers increasingly organize their applications into components there's becoming a demand to measure performance on subsections of an application or a web page. For instance, a developer may want to know when a subsection of the DOM has been painted, like a table or a widget, so they can mark the paint time and submit it to their analytics.
Current Web APIs don't help with this. Element Timing is limited due to what it can mark so it can't be used for whole sections. "Largest Contentful Paint" has the same limitations due to being built on top of element timing (and thus can't select components or composite structures like a table)
Developers would like to communicate the performance of their own blocks of content in a way that their users or organisation would understand, for example "time to first tweet" for timing when the first tweet component is shown on screen.
Feedback (Choose One)
I welcome feedback in this thread, but encourage you to file bugs against the Explainer.