-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"json" as the fetch destination for json modules is inconsistent with regular json fetches #10231
Comments
That's true for style sheets or scripts too. I think this is working as designed. |
Classic script and module scripts have the Am I missing something? |
You need to compare |
Does this mean to say that JSON modules are somehow semantically a different thing
OK, closing. We still need to support |
It's semantically somewhat distinct yes. With |
What is the issue with the HTML Standard?
Following the discussion in #7233, I understand why JSON modules don't have a
script
destination. However, it's unclear to me why they should have a destination different from regularfetch
(i.e. the empty string, orSec-Fetch-Dest: empty
. Seems like imported json modules are no different from calling(await fetch()).json()
?This means, for example, that you need to preload the same JSON file differently if you use it in a
fetch
vs if you use it in animport
, and that doesn't seem right.@nicolo-ribaudo @annevk
The text was updated successfully, but these errors were encountered: