@@ -721,11 +721,12 @@ export type AriaRole =
721
721
export interface HTMLAttributes < T extends EventTarget > extends AriaAttributes , DOMAttributes < T > {
722
722
// Standard HTML Attributes
723
723
accesskey ?: string | undefined | null ;
724
+ autocapitalize ?: 'characters' | 'off' | 'on' | 'none' | 'sentences' | 'words' | undefined | null ;
724
725
autofocus ?: boolean | undefined | null ;
725
726
class ?: string | undefined | null ;
726
727
contenteditable ?: Booleanish | 'inherit' | 'plaintext-only' | undefined | null ;
727
728
contextmenu ?: string | undefined | null ;
728
- dir ?: string | undefined | null ;
729
+ dir ?: 'ltr' | 'rtl' | 'auto' | undefined | null ;
729
730
draggable ?: Booleanish | undefined | null ;
730
731
elementtiming ?: string | undefined | null ;
731
732
enterkeyhint ?:
@@ -751,6 +752,7 @@ export interface HTMLAttributes<T extends EventTarget> extends AriaAttributes, D
751
752
translate ?: 'yes' | 'no' | '' | undefined | null ;
752
753
inert ?: boolean | undefined | null ;
753
754
popover ?: 'auto' | 'manual' | '' | undefined | null ;
755
+ writingsuggestions ?: Booleanish | undefined | null ;
754
756
755
757
// Unknown
756
758
radiogroup ?: string | undefined | null ; // <command>, <menuitem>
@@ -769,8 +771,6 @@ export interface HTMLAttributes<T extends EventTarget> extends AriaAttributes, D
769
771
vocab ?: string | undefined | null ;
770
772
771
773
// Non-standard Attributes
772
- autocapitalize ?: string | undefined | null ;
773
- autocorrect ?: string | undefined | null ;
774
774
autosave ?: string | undefined | null ;
775
775
color ?: string | undefined | null ;
776
776
itemprop ?: string | undefined | null ;
@@ -868,7 +868,7 @@ export interface HTMLAreaAttributes extends HTMLAttributes<HTMLAreaElement> {
868
868
media ?: string | undefined | null ;
869
869
referrerpolicy ?: ReferrerPolicy | undefined | null ;
870
870
rel ?: string | undefined | null ;
871
- shape ?: string | undefined | null ;
871
+ shape ?: 'circle' | 'default' | 'poly' | 'rect' | undefined | null ;
872
872
target ?: string | undefined | null ;
873
873
ping ?: string | undefined | null ;
874
874
}
@@ -886,8 +886,13 @@ export interface HTMLButtonAttributes extends HTMLAttributes<HTMLButtonElement>
886
886
disabled ?: boolean | undefined | null ;
887
887
form ?: string | undefined | null ;
888
888
formaction ?: string | undefined | null ;
889
- formenctype ?: string | undefined | null ;
890
- formmethod ?: string | undefined | null ;
889
+ formenctype ?:
890
+ | 'application/x-www-form-urlencoded'
891
+ | 'multipart/form-data'
892
+ | 'text/plain'
893
+ | undefined
894
+ | null ;
895
+ formmethod ?: 'dialog' | 'get' | 'post' | undefined | null ;
891
896
formnovalidate ?: boolean | undefined | null ;
892
897
formtarget ?: string | undefined | null ;
893
898
name ?: string | undefined | null ;
@@ -952,8 +957,13 @@ export interface HTMLFormAttributes extends HTMLAttributes<HTMLFormElement> {
952
957
acceptcharset ?: string | undefined | null ;
953
958
action ?: string | undefined | null ;
954
959
autocomplete ?: AutoFillBase | undefined | null ;
955
- enctype ?: string | undefined | null ;
956
- method ?: string | undefined | null ;
960
+ enctype ?:
961
+ | 'application/x-www-form-urlencoded'
962
+ | 'multipart/form-data'
963
+ | 'text/plain'
964
+ | undefined
965
+ | null ;
966
+ method ?: 'dialog' | 'get' | 'post' | undefined | null ;
957
967
name ?: string | undefined | null ;
958
968
novalidate ?: boolean | undefined | null ;
959
969
target ?: string | undefined | null ;
@@ -1040,14 +1050,21 @@ export interface HTMLInputAttributes extends HTMLAttributes<HTMLInputElement> {
1040
1050
accept ?: string | undefined | null ;
1041
1051
alt ?: string | undefined | null ;
1042
1052
autocomplete ?: FullAutoFill | undefined | null ;
1053
+ // Safari only https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocorrect
1054
+ autocorrect ?: 'on' | 'off' | '' | undefined | null ;
1043
1055
capture ?: boolean | 'user' | 'environment' | undefined | null ; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
1044
1056
checked ?: boolean | undefined | null ;
1045
1057
dirname ?: string | undefined | null ;
1046
1058
disabled ?: boolean | undefined | null ;
1047
1059
form ?: string | undefined | null ;
1048
1060
formaction ?: string | undefined | null ;
1049
- formenctype ?: string | undefined | null ;
1050
- formmethod ?: string | undefined | null ;
1061
+ formenctype ?:
1062
+ | 'application/x-www-form-urlencoded'
1063
+ | 'multipart/form-data'
1064
+ | 'text/plain'
1065
+ | undefined
1066
+ | null ;
1067
+ formmethod ?: 'dialog' | 'get' | 'post' | undefined | null ;
1051
1068
formnovalidate ?: boolean | undefined | null ;
1052
1069
formtarget ?: string | undefined | null ;
1053
1070
height ?: number | string | undefined | null ;
@@ -1100,7 +1117,33 @@ export interface HTMLLiAttributes extends HTMLAttributes<HTMLLIElement> {
1100
1117
}
1101
1118
1102
1119
export interface HTMLLinkAttributes extends HTMLAttributes < HTMLLinkElement > {
1103
- as ?: string | undefined | null ;
1120
+ as ?:
1121
+ | 'fetch'
1122
+ | 'audio'
1123
+ | 'audioworklet'
1124
+ | 'document'
1125
+ | 'embed'
1126
+ | 'font'
1127
+ | 'frame'
1128
+ | 'iframe'
1129
+ | 'image'
1130
+ | 'json'
1131
+ | 'manifest'
1132
+ | 'object'
1133
+ | 'paintworklet'
1134
+ | 'report'
1135
+ | 'script'
1136
+ | 'serviceworker'
1137
+ | 'sharedworker'
1138
+ | 'style'
1139
+ | 'track'
1140
+ | 'video'
1141
+ | 'webidentity'
1142
+ | 'worker'
1143
+ | 'xslt'
1144
+ | ''
1145
+ | undefined
1146
+ | null ;
1104
1147
crossorigin ?: 'anonymous' | 'use-credentials' | '' | undefined | null ;
1105
1148
href ?: string | undefined | null ;
1106
1149
hreflang ?: string | undefined | null ;
@@ -1143,7 +1186,7 @@ export interface HTMLMediaAttributes<T extends HTMLMediaElement> extends HTMLAtt
1143
1186
mediagroup ?: string | undefined | null ;
1144
1187
muted ?: boolean | undefined | null ;
1145
1188
playsinline ?: boolean | undefined | null ;
1146
- preload ?: string | undefined | null ;
1189
+ preload ?: 'auto' | 'none' | 'metadata' | '' | undefined | null ;
1147
1190
src ?: string | undefined | null ;
1148
1191
/**
1149
1192
* a value between 0 and 1
@@ -1173,7 +1216,14 @@ export interface HTMLMediaAttributes<T extends HTMLMediaElement> extends HTMLAtt
1173
1216
export interface HTMLMetaAttributes extends HTMLAttributes < HTMLMetaElement > {
1174
1217
charset ?: string | undefined | null ;
1175
1218
content ?: string | undefined | null ;
1176
- 'http-equiv' ?: string | undefined | null ;
1219
+ 'http-equiv' ?:
1220
+ | 'content-security-policy'
1221
+ | 'content-type'
1222
+ | 'default-style'
1223
+ | 'refresh'
1224
+ | 'x-ua-compatible'
1225
+ | undefined
1226
+ | null ;
1177
1227
name ?: string | undefined | null ;
1178
1228
media ?: string | undefined | null ;
1179
1229
}
@@ -1329,7 +1379,7 @@ export interface HTMLTdAttributes extends HTMLAttributes<HTMLTableCellElement> {
1329
1379
colspan ?: number | undefined | null ;
1330
1380
headers ?: string | undefined | null ;
1331
1381
rowspan ?: number | undefined | null ;
1332
- scope ?: string | undefined | null ;
1382
+ scope ?: 'col' | 'colgroup' | 'row' | 'rowgroup' | undefined | null ;
1333
1383
abbr ?: string | undefined | null ;
1334
1384
height ?: number | string | undefined | null ;
1335
1385
width ?: number | string | undefined | null ;
@@ -1341,7 +1391,7 @@ export interface HTMLThAttributes extends HTMLAttributes<HTMLTableCellElement> {
1341
1391
colspan ?: number | undefined | null ;
1342
1392
headers ?: string | undefined | null ;
1343
1393
rowspan ?: number | undefined | null ;
1344
- scope ?: string | undefined | null ;
1394
+ scope ?: 'col' | 'colgroup' | 'row' | 'rowgroup' | undefined | null ;
1345
1395
abbr ?: string | undefined | null ;
1346
1396
}
1347
1397
@@ -1351,7 +1401,7 @@ export interface HTMLTimeAttributes extends HTMLAttributes<HTMLTimeElement> {
1351
1401
1352
1402
export interface HTMLTrackAttributes extends HTMLAttributes < HTMLTrackElement > {
1353
1403
default ?: boolean | undefined | null ;
1354
- kind ?: string | undefined | null ;
1404
+ kind ?: 'captions' | 'chapters' | 'descriptions' | 'metadata' | 'subtitles' | undefined | null ;
1355
1405
label ?: string | undefined | null ;
1356
1406
src ?: string | undefined | null ;
1357
1407
srclang ?: string | undefined | null ;
@@ -1453,7 +1503,8 @@ export interface SVGAttributes<T extends EventTarget> extends AriaAttributes, DO
1453
1503
lang ?: string | undefined | null ;
1454
1504
max ?: number | string | undefined | null ;
1455
1505
media ?: string | undefined | null ;
1456
- method ?: string | undefined | null ;
1506
+ // On the `textPath` element
1507
+ method ?: 'align' | 'stretch' | undefined | null ;
1457
1508
min ?: number | string | undefined | null ;
1458
1509
name ?: string | undefined | null ;
1459
1510
style ?: string | undefined | null ;
@@ -1737,6 +1788,10 @@ export interface SVGAttributes<T extends EventTarget> extends AriaAttributes, DO
1737
1788
[ key : `data-${string } `] : any ;
1738
1789
}
1739
1790
1791
+ export interface HTMLTemplateAttributes extends HTMLAttributes < HTMLElement > {
1792
+ shadowrootmode ?: 'open' | 'closed' | undefined | null ;
1793
+ }
1794
+
1740
1795
export interface HTMLWebViewAttributes extends HTMLAttributes < HTMLElement > {
1741
1796
allowfullscreen ?: boolean | undefined | null ;
1742
1797
allowpopups ?: boolean | undefined | null ;
@@ -1750,7 +1805,7 @@ export interface HTMLWebViewAttributes extends HTMLAttributes<HTMLElement> {
1750
1805
nodeintegration ?: boolean | undefined | null ;
1751
1806
partition ?: string | undefined | null ;
1752
1807
plugins ?: boolean | undefined | null ;
1753
- preload ?: string | undefined | null ;
1808
+ preload ?: 'auto' | 'none' | 'metadata' | '' | undefined | null ;
1754
1809
src ?: string | undefined | null ;
1755
1810
useragent ?: string | undefined | null ;
1756
1811
webpreferences ?: string | undefined | null ;
@@ -1861,7 +1916,7 @@ export interface SvelteHTMLElements {
1861
1916
summary : HTMLAttributes < HTMLElement > ;
1862
1917
sup : HTMLAttributes < HTMLElement > ;
1863
1918
table : HTMLTableAttributes ;
1864
- template : HTMLAttributes < HTMLTemplateElement > ;
1919
+ template : HTMLTemplateAttributes ;
1865
1920
tbody : HTMLAttributes < HTMLTableSectionElement > ;
1866
1921
td : HTMLTdAttributes ;
1867
1922
textarea : HTMLTextareaAttributes ;
0 commit comments