-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
<script context="module">
-> <script module>
#12637
Comments
are we going to reserve more attribute names on script or style tags? preprocessors can technically use them so defining new ones could be a breaking change. |
Good point. Without making any commitment to use any of these in future, we could reserve |
|
another option could be to claim all attributes that are not using an xmlns namespace id to show which third party tool/package they originate from. The only current use that comes to my head is svelte-preprocess using |
@dominikg I'm developing a meta-framework based on Svelte, where <script context="module" pathname="/home">
</script> I hope this will still be possible in Svelte 5 |
Is |
oof, I think I'd rather keep |
The nomodule attribute is already a thing. This one and other one's you guys are suggesting to already reserve might collide with the spec someday... maybe? who knows... |
Technically, the HTML's script and Svelte's top-level scripts are different things with unrelated sets of attributes. So it's not a problem at all. |
Yeah, the only breakage we potentially need to worry about is people using their own attributes, like the |
Could this not be solvable with an additional plugin to convert that before the svelte compiler get's his hands on it? only issue with that would be the language server. |
Also reserve a few attributes, which we may or may not use in the future closes #12637
Describe the problem
We've been meaning to make this change for a while, we should make sure it happens for 5.0
Describe the proposed solution
Deprecate the old syntax, introduce the new, and update the migration script
Importance
nice to have
The text was updated successfully, but these errors were encountered: