Repository navigation
Update CLS explanation and example to use session windows - #131
Open
adityareddy-dev wants to merge 1 commit into
Open
adityareddy-dev wants to merge 1 commit into
adityareddy-dev wants to merge 1 commit into
Conversation
adityareddy-dev
marked this pull request as ready for review
November 5, 2026 04:08
adityareddy-dev
force-pushed
the
cls-session-windows
branch
from
November 6, 2026 18:47
6b4c263 to
56d0f6e
Compare
adityareddy-dev
force-pushed
the
cls-session-windows
branch
from
November 10, 2026 08:42
56d0f6e to
4e3e1a9
Compare
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLS section still adds up every layout shift over the page lifetime, which isn't how CLS is defined anymore. This updates the non-normative explanation and the usage example to keep the largest session-window score, matching the current CLS definition.
The example computes DCLS for the observed document, cause an observer doesn't get entries from child frames, and keeps window state across observer callbacks. It also had a
returnon a shift with recent input that dropped the rest of the batch, that's acontinuenow. The text explains how descendant frames feed into CLS on one timeline. Same format as the INP calculation section in Event Timing.Preview | Diff