Skip to content

Read a media element's loading attribute after awaiting a stable state - #12970

Open
zcorpan wants to merge 1 commit into
mainfrom
zcorpan/media-lazy-loading-stable-state
Open

zcorpan wants to merge 1 commit into
mainfrom
zcorpan/media-lazy-loading-stable-state

Conversation

@zcorpan

@zcorpan zcorpan commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The parser appends attributes one at a time, so <video src loading=lazy> reached the resource
selection algorithm with loading still absent, was treated as Eager, and delayed the load event
until the video was scrolled into view.

Fixes #12854.

(See WHATWG Working Mode: Changes for more details.)

The parser appends attributes one at a time, so `<video src loading=lazy>` reached the resource
selection algorithm with `loading` still absent, was treated as Eager, and delayed the load event
until the video was scrolled into view.

Fixes #12854.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Sep 22, 2026
For whatwg/html#12970 (fixes whatwg/html#12854).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@zcorpan zcorpan changed the title Read a media element's loading attribute after awaiting a stable state Test that loading=lazy videos don't delay load in either attribute order Sep 22, 2026
@zcorpan zcorpan changed the title Test that loading=lazy videos don't delay load in either attribute order Read a media element's loading attribute after awaiting a stable state Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Resource selection algorithm reads the loading attribute before the parser has appended it

1 participant