Add HTML link element attribute values as="{json,script,style}" for modulepreload#29048
Open
KurtCattiSchmidt wants to merge 3 commits intomdn:mainfrom
Open
Add HTML link element attribute values as="{json,script,style}" for modulepreload#29048KurtCattiSchmidt wants to merge 3 commits intomdn:mainfrom
link element attribute values as="{json,script,style}" for modulepreload#29048KurtCattiSchmidt wants to merge 3 commits intomdn:mainfrom
Conversation
Contributor
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
link element attribute values as="{json,script,style}" for modulepreload
caugner
requested changes
Feb 18, 2026
| }, | ||
| "status": { | ||
| "experimental": true, | ||
| "standard_track": true, |
Contributor
There was a problem hiding this comment.
Setting standard_track: true requires providing a spec_url.
In this case, we can to link to https://html.spec.whatwg.org/multipage/links.html#preload-destination for all values.
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.
Summary
This change adds
as="style",as="script", andas="json"to the<link rel="modulepreload">compat data. Chromium is shipping this in 147, so this adds that data as well (see https://chromestatus.com/feature/5202661416763392).Test results and supporting details
as="script"is the default, and support for this goes back to when each browser originally supported<link rel="modulepreload">. Chrome 147 will begin supportingas="style"andas="json", and Safari recently added support foras="json", in version 26.2 (see "Fixed “text/json/json+json” to be considered an invalid JSON MIME type." note in https://developer.apple.com/documentation/safari-release-notes/safari-26_2-release-notes).WPT tests reflecting these results:
For Chrome 147 supporting JSON and style modulepreloads, see Experimental results: https://wpt.fyi/results/preload/modulepreload-as.html?label=master&label=experimental&aligned&q=modulepreload-as.html
For Safari 26 supporting JSON modulepreloads, see https://wpt.fyi/results/preload/modulepreload-as.html?label=stable&label=master&aligned
https://chromestatus.com/feature/5202661416763392
https://developer.apple.com/documentation/safari-release-notes/safari-26_2-release-notes
Related issues