Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crossorigin: undefined behaves non-uniformly on preload tag #293

Closed
Ingramz opened this issue Oct 9, 2024 · 0 comments
Closed

crossorigin: undefined behaves non-uniformly on preload tag #293

Ingramz opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Ingramz
Copy link

Ingramz commented Oct 9, 2024

🐛 The bug

When using crossorigin attribute on script to opt-out of default security feature of crossorigin="anonymous", it is possible to use either crossorigin: false or crossorigin: undefined to do this. However, when using undefined, only the script tag will be stripped of the attribute and not the corresponding preload tag.

When reading the source code for registry scripts, I learned that the "right" way to opt-out currently seems to be using false or null.

return useScript({
  src: 'https://s.kk-resources.com/leadtag.js',
  async: true,
  crossorigin: false,
})

Considering how common it can be that the developers want to opt out from crossorigin="anonymous" default, both values should either work uniformly or the developer should be better informed of the differences between the possible falsy values.

🛠️ To reproduce

See description

🌈 Expected behavior

🌈

ℹ️ Additional context

No response

@Ingramz Ingramz added the bug Something isn't working label Oct 9, 2024
harlan-zw added a commit that referenced this issue Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants