feat(jsx): add fetchpriority attribute to img, link, script, and iframe - #6803
Merged
johnjenkins merged 1 commit intoAug 3, 2026
Merged
Conversation
Add the standardized `fetchPriority`/`fetchpriority` attribute (values: 'high' | 'low' | 'auto') to the JSXBase interfaces for IframeHTMLAttributes, ImgHTMLAttributes, LinkHTMLAttributes, and ScriptHTMLAttributes. The `fetchpriority` attribute is now a W3C standard that supersedes the older non-standard `importance` hint. Both camelCase and lowercase variants are added to match Stencil's existing dual-property convention. fixes: stenciljs#6802
johnjenkins
approved these changes
Aug 3, 2026
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.
What is the current behavior?
The JSX type declarations in
stencil-public-runtime.tsdo not include the standardizedfetchpriorityattribute for<img>,<link>,<script>, or<iframe>elements. Using it in a Stencil JSX template produces a TypeScript error.GitHub Issue Number: #6802
What is the new behavior?
Adds
fetchPriority?: 'high' | 'low' | 'auto'andfetchpriority?: 'high' | 'low' | 'auto'to the followingJSXBaseinterfaces:IframeHTMLAttributesImgHTMLAttributesLinkHTMLAttributesScriptHTMLAttributesBoth camelCase and lowercase variants are added to match Stencil's existing dual-property convention (e.g.
crossOrigin/crossorigin,srcSet/srcset).Documentation
No documentation changes required — this is a type declaration update only.
Does this introduce a breaking change?
Testing
The change is a pure type-declaration addition with no runtime behavior. Verified by:
fetchpriority="high"/fetchPriority="high"on the affected elements after the change.Other information
fetchpriorityis now broadly supported across Chrome, Edge, Firefox, and Safari.importanceattribute already present in these interfaces is intentionally left unchanged for backward compatibility.