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

fix: disallow invalid attributes for <svelte:window> and <svelte:document> #14228

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 8, 2024

Seems like we missed this validation for these special Svelte elements, but have it on the others.

Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: c50de89

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-svelte-14228-svelte.vercel.app/

this is an automated message

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Playground

pnpm add https://pkg.pr.new/svelte@14228

@dummdidumm
Copy link
Member

According to #10314 we decided to not throw for now, and possibly make these cases work in a minor

@trueadm
Copy link
Contributor Author

trueadm commented Nov 8, 2024

@dummdidumm That's what I originally did, but it felt broken. I think making it work will cause more confusion as I had to pluck out the event handlers at runtime and skip over other attributes, which kind of feels buggy as hell. Warning on the attributes we skip felt too noisy too.

@trueadm trueadm merged commit 7fd3774 into main Nov 14, 2024
11 checks passed
@trueadm trueadm deleted the spread-widnow-doc branch November 14, 2024 20:22
@github-actions github-actions bot mentioned this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants