-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: method
is case insensitive
#13639
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
Conversation
🦋 Changeset detectedLatest commit: 6de560d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -892,7 +892,7 @@ export interface HTMLButtonAttributes extends HTMLAttributes<HTMLButtonElement> | |||
| 'text/plain' | |||
| undefined | |||
| null; | |||
formmethod?: 'dialog' | 'get' | 'post' | undefined | null; | |||
formmethod?: 'dialog' | 'get' | 'post' | 'DIALOG' | 'GET' | 'POST' | undefined | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also include capitalized variations? I believe they are also valid?
formmethod?: 'dialog' | 'get' | 'post' | 'DIALOG' | 'GET' | 'POST' | undefined | null; | |
formmethod?: 'dialog' | 'get' | 'post' | 'DIALOG' | 'GET' | 'POST' | 'Dialog' | 'Get' | 'Post' | undefined | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they that common though? Searching through github and it seems to only be lowercase or all uppercase that I can find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually do we really want this? I've just checked the spec and a whole bunch of attributes are actually case-insensitive https://html.spec.whatwg.org/#case-sensitivity-of-selectors We clearly don't want case-insensitivity in general, this would make auto-completion a nightmare. For consistency I think lowercase only would be better. But HTTP verbs are commonly written in uppercase also so an exception can make sense... |
Agree that if at all we should only do this for these as they are the only ones somewhat commonly being uppercased |
closes #13634
Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint