Skip to content

Conversation

vishal-rathod-07
Copy link

Update crossOrigin prop description to explicitly state that it's required when using as="fetch".

The documentation lacked clarity in several places about the mandatory nature of crossOrigin when the as prop is set to "fetch". This change:

  • Adds explicit requirement note in prop descriptions
  • Ensures consistent documentation across all relevant files
  • Helps developers avoid common misconfiguration issues

Also closes #6617

Copy link
Member

@sophiebits sophiebits left a comment

Choose a reason for hiding this comment

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

as="fetch" isn't valid for these so this doesn't make sense. If you want to preload a URL that you will fetch then I believe call preload with as="fetch".

@sophiebits sophiebits closed this May 16, 2025
@sophiebits
Copy link
Member

For preloadModule perhaps we could allow setting as to "audioworklet", "paintworklet", "serviceworker", "sharedworker", or "worker" per MDN https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/modulepreload, but still "fetch" wouldn't be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typo]: crossOrigin and as values content

3 participants