Skip to content

Remove unreachable preload destinations from match-preload-type#12175

Merged
annevk merged 2 commits intowhatwg:mainfrom
KurtCattiSchmidt:preload-extra-types
Mar 6, 2026
Merged

Remove unreachable preload destinations from match-preload-type#12175
annevk merged 2 commits intowhatwg:mainfrom
KurtCattiSchmidt:preload-extra-types

Conversation

@KurtCattiSchmidt
Copy link
Copy Markdown
Contributor

@KurtCattiSchmidt KurtCattiSchmidt commented Feb 18, 2026

This change removes the extra, unreachable types listed for preload links under match-preload-type. They are unreachable because translate a preload destination happens first in the algorithm and does not continue for these extra types.

This change aligns the spec with existing implementations as well as MDN.

  • At least two implementers are interested (and none opposed):
    • N/A - major engines already only support the limited set of preload types
  • Tests are written and can be reviewed and commented upon at:
    • Existing tests cover this under wpt/preload, although the pass rate is low so some tests may need updating
  • Implementation bugs are filed:
    • Chromium: N/A - this spec change matches current behavior
    • Gecko: N/A - this spec change matches current behavior
    • WebKit: N/A - this spec change matches current behavior
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): N/A
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): N/A
  • Corresponding HTML AAM & ARIA in HTML issues & PRs: N/A
  • MDN issue is filed: N/A - MDN already reflects this behavior - https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload
  • The top of this comment includes a clear commit message to use.

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

Addresses #12068


/links.html ( diff )

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the algorithm header, can you replace "a string" with "a preload destination" (including link). That way we have a type assert as well.

@KurtCattiSchmidt
Copy link
Copy Markdown
Contributor Author

In the algorithm header, can you replace "a string" with "a preload destination" (including link). That way we have a type assert as well.

Addressed @annevk

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@annevk annevk merged commit bbaf8a7 into whatwg:main Mar 6, 2026
2 checks passed
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.

3 participants