We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e88543f commit 059dde3Copy full SHA for 059dde3
src/auto-check-element.ts
@@ -12,6 +12,11 @@ type State = {
12
controller: Controller | null
13
}
14
15
+enum AllowedHttpMethods {
16
+ GET = 'GET',
17
+ POST = 'POST',
18
+}
19
+
20
const states = new WeakMap<AutoCheckElement, State>()
21
22
class AutoCheckEvent extends Event {
@@ -178,7 +183,7 @@ export class AutoCheckElement extends HTMLElement {
178
183
179
184
180
185
get httpMethod(): string {
181
- return this.getAttribute('http-method') || 'POST'
186
+ return AllowedHttpMethods[this.getAttribute('http-method') as keyof typeof AllowedHttpMethods] || 'POST'
182
187
188
189
0 commit comments