@manyducks.co/dolla 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +643 -0
- package/build.js +34 -0
- package/index.d.ts +12 -0
- package/jsx-dev-runtime.d.ts +1 -0
- package/jsx-runtime.d.ts +1 -0
- package/lib/app.d.ts +138 -0
- package/lib/classes/CrashCollector.d.ts +30 -0
- package/lib/classes/DebugHub.d.ts +60 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.js +4062 -0
- package/lib/index.js.map +7 -0
- package/lib/jsx/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/jsx-dev-runtime.js +20 -0
- package/lib/jsx/jsx-dev-runtime.js.map +7 -0
- package/lib/jsx/jsx-runtime.d.ts +10 -0
- package/lib/jsx/jsx-runtime.js +22 -0
- package/lib/jsx/jsx-runtime.js.map +7 -0
- package/lib/markup.d.ts +81 -0
- package/lib/nodes/cond.d.ts +28 -0
- package/lib/nodes/html.d.ts +30 -0
- package/lib/nodes/observer.d.ts +33 -0
- package/lib/nodes/outlet.d.ts +26 -0
- package/lib/nodes/portal.d.ts +22 -0
- package/lib/nodes/repeat.d.ts +36 -0
- package/lib/nodes/text.d.ts +20 -0
- package/lib/spring.d.ts +40 -0
- package/lib/state.d.ts +84 -0
- package/lib/store.d.ts +67 -0
- package/lib/stores/dialog.d.ts +30 -0
- package/lib/stores/document.d.ts +10 -0
- package/lib/stores/http.d.ts +60 -0
- package/lib/stores/language.d.ts +39 -0
- package/lib/stores/render.d.ts +18 -0
- package/lib/stores/router.d.ts +118 -0
- package/lib/testing/classes/MockHTTP.d.ts +10 -0
- package/lib/testing/index.d.ts +4 -0
- package/lib/testing/makeMockDOMNode.d.ts +10 -0
- package/lib/testing/makeMockFetch.d.ts +36 -0
- package/lib/testing/makeMockFetch.test.d.ts +1 -0
- package/lib/testing/stores/dialog.d.ts +6 -0
- package/lib/testing/stores/http.d.ts +13 -0
- package/lib/testing/stores/page.d.ts +7 -0
- package/lib/testing/stores/router.d.ts +12 -0
- package/lib/testing/wrapStore.d.ts +8 -0
- package/lib/testing/wrapStore.test.d.ts +1 -0
- package/lib/testing/wrapView.d.ts +0 -0
- package/lib/types.d.ts +3388 -0
- package/lib/utils.d.ts +14 -0
- package/lib/view.d.ts +80 -0
- package/lib/views/fragment.d.ts +2 -0
- package/lib/views/store-scope.d.ts +10 -0
- package/package.json +56 -0
- package/tests/state.test.js +290 -0
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,3388 @@
|
|
|
1
|
+
import type * as CSS from "csstype";
|
|
2
|
+
import { type Markup } from "./markup.js";
|
|
3
|
+
import { type Readable, type Writable } from "./state.js";
|
|
4
|
+
import { type Store } from "./store.js";
|
|
5
|
+
import { type DialogStore } from "./stores/dialog.js";
|
|
6
|
+
import { type DocumentStore } from "./stores/document.js";
|
|
7
|
+
import { type HTTPStore } from "./stores/http.js";
|
|
8
|
+
import { type LanguageStore } from "./stores/language.js";
|
|
9
|
+
import { RenderStore } from "./stores/render.js";
|
|
10
|
+
import { type RouterStore } from "./stores/router.js";
|
|
11
|
+
/**
|
|
12
|
+
* Value will be read by the component.
|
|
13
|
+
*/
|
|
14
|
+
export type Read<T> = T | Readable<T> | Writable<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Value will be both read and written by the component.
|
|
17
|
+
*/
|
|
18
|
+
export type Write<T> = Writable<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Extracts the value from a Read or Write type.
|
|
21
|
+
*/
|
|
22
|
+
export type Value<T> = T extends Read<infer U> ? U : T;
|
|
23
|
+
/**
|
|
24
|
+
* Represents everything that can be handled as a DOM node.
|
|
25
|
+
* These are all the items considered valid to pass as children to any element.
|
|
26
|
+
*/
|
|
27
|
+
export type Renderable = string | number | Markup | false | null | undefined | Readable<any> | (string | number | Markup | false | null | undefined | Readable<any>)[];
|
|
28
|
+
export type StoreExports<T> = T extends Store<any, infer O> ? O : unknown;
|
|
29
|
+
export interface BuiltInStores {
|
|
30
|
+
http: StoreExports<typeof HTTPStore>;
|
|
31
|
+
dialog: StoreExports<typeof DialogStore>;
|
|
32
|
+
language: StoreExports<typeof LanguageStore>;
|
|
33
|
+
document: StoreExports<typeof DocumentStore>;
|
|
34
|
+
router: StoreExports<typeof RouterStore>;
|
|
35
|
+
render: StoreExports<typeof RenderStore>;
|
|
36
|
+
}
|
|
37
|
+
export type Stringable = {
|
|
38
|
+
toString(): string;
|
|
39
|
+
};
|
|
40
|
+
export type MaybeReadable<T> = T | Readable<T> | Readable<T | undefined>;
|
|
41
|
+
type OptionalProperty<T> = T | Readable<T> | Readable<T | undefined>;
|
|
42
|
+
type RequiredProperty<T> = T | Readable<T>;
|
|
43
|
+
type AutocapitalizeValues = "off" | "on" | "none" | "sentences" | "words" | "characters";
|
|
44
|
+
type ContentEditableValues = true | false | "true" | "false" | "plaintext-only" | "inherit";
|
|
45
|
+
type ClassListValues = string | ClassMap | Array<string | ClassMap | (string | ClassMap)[]>;
|
|
46
|
+
type DirValues = "ltr" | "rtl" | "auto";
|
|
47
|
+
type EnterKeyHintValues = "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
48
|
+
type HiddenValues = true | false | "until-found";
|
|
49
|
+
type InputModeValues = "decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url";
|
|
50
|
+
/**
|
|
51
|
+
* Properties common to all Elements.
|
|
52
|
+
*/
|
|
53
|
+
export interface ElementProps {
|
|
54
|
+
/**
|
|
55
|
+
* HTML attributes to assign to the element.
|
|
56
|
+
*/
|
|
57
|
+
attributes?: OptionalProperty<Record<string, any>>;
|
|
58
|
+
/**
|
|
59
|
+
* Object of event listeners.
|
|
60
|
+
*/
|
|
61
|
+
eventListeners?: OptionalProperty<Record<string, EventHandler<Event>>>;
|
|
62
|
+
/**
|
|
63
|
+
* CSS classes to be applied to this element. In addition to the standard space-separated list of class names,
|
|
64
|
+
* this property also supports a class map object with class names as keys and booleans as values.
|
|
65
|
+
* Class names in a class map will be applied to the element while their values are true. Also supports an
|
|
66
|
+
* array of strings and class maps.
|
|
67
|
+
*
|
|
68
|
+
* Alias of `className`.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* <div class="one-class" />
|
|
72
|
+
*
|
|
73
|
+
* <div class={"one-class"} />
|
|
74
|
+
*
|
|
75
|
+
* <div class={["array", "of", "classes"]} />
|
|
76
|
+
*
|
|
77
|
+
* <div class={{ applied: true, notApplied: false }} />
|
|
78
|
+
*
|
|
79
|
+
* <div class={["class", "class2", { "conditional": $value }]} />
|
|
80
|
+
*/
|
|
81
|
+
class?: OptionalProperty<ClassListValues>;
|
|
82
|
+
/**
|
|
83
|
+
* CSS classes to be applied to this element. In addition to the standard space-separated list of class names,
|
|
84
|
+
* this property also supports a class map object with class names as keys and booleans as values.
|
|
85
|
+
* Class names in a class map will be applied to the element while their values are true. Also supports an
|
|
86
|
+
* array of strings and class maps.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* <div className="one-class" />
|
|
90
|
+
*
|
|
91
|
+
* <div className={"one-class"} />
|
|
92
|
+
*
|
|
93
|
+
* <div className={["array", "of", "classes"]} />
|
|
94
|
+
*
|
|
95
|
+
* <div className={{ applied: true, notApplied: false }} />
|
|
96
|
+
*
|
|
97
|
+
* <div className={["class", "class2", { "conditional": $value }]} />
|
|
98
|
+
*/
|
|
99
|
+
className?: OptionalProperty<ClassListValues>;
|
|
100
|
+
/**
|
|
101
|
+
* A unique string to identify this element.
|
|
102
|
+
*/
|
|
103
|
+
id?: OptionalProperty<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Scroll position from the left (on the X axis), if this element is scrollable.
|
|
106
|
+
*/
|
|
107
|
+
scrollLeft?: OptionalProperty<number>;
|
|
108
|
+
/**
|
|
109
|
+
* Scroll position from the top (on the Y axis) if this element is scrollable.
|
|
110
|
+
*/
|
|
111
|
+
scrollTop?: OptionalProperty<number>;
|
|
112
|
+
/**
|
|
113
|
+
* Enables or disables checking for spelling errors in an element's content.
|
|
114
|
+
*
|
|
115
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck
|
|
116
|
+
*/
|
|
117
|
+
spellcheck?: OptionalProperty<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Specifies whether an element's content should be translated when the page is localized.
|
|
120
|
+
*
|
|
121
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate
|
|
122
|
+
*/
|
|
123
|
+
translate?: OptionalProperty<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
|
|
126
|
+
*/
|
|
127
|
+
exportParts?: OptionalProperty<string>;
|
|
128
|
+
/**
|
|
129
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
|
|
130
|
+
*/
|
|
131
|
+
part?: OptionalProperty<string>;
|
|
132
|
+
/**
|
|
133
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot
|
|
134
|
+
*/
|
|
135
|
+
slot?: OptionalProperty<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Inline styles applied to the element. Can be passed as a string or as an object.
|
|
138
|
+
*
|
|
139
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style
|
|
140
|
+
*/
|
|
141
|
+
style?: string | CSSProperties | Readable<string> | Readable<CSSProperties> | Readable<string | CSSProperties> | Readable<string | undefined> | Readable<CSSProperties | undefined> | Readable<string | CSSProperties | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* Fired when a CSS animation unexpectedly aborts.
|
|
144
|
+
*
|
|
145
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationcancel_event
|
|
146
|
+
*/
|
|
147
|
+
onAnimationCancel?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
148
|
+
/**
|
|
149
|
+
* Fired when a CSS animation completes.
|
|
150
|
+
*
|
|
151
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationend_event
|
|
152
|
+
*/
|
|
153
|
+
onAnimationEnd?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
154
|
+
/**
|
|
155
|
+
* Fired when an iteration of a CSS animation completes.
|
|
156
|
+
*
|
|
157
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationiteration_event
|
|
158
|
+
*/
|
|
159
|
+
onAnimationIteration?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
160
|
+
/**
|
|
161
|
+
* Fired when a CSS animation starts.
|
|
162
|
+
*
|
|
163
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationstart_event
|
|
164
|
+
*/
|
|
165
|
+
onAnimationStart?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
166
|
+
/**
|
|
167
|
+
* Fired when a pointing device's non-primary button is pressed and released while the pointer is inside the element.
|
|
168
|
+
* With a mouse, this would typically be any button other than left click.
|
|
169
|
+
*
|
|
170
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
|
|
171
|
+
*/
|
|
172
|
+
onAuxClick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
173
|
+
/**
|
|
174
|
+
* Fired when the element has lost focus. This event does not bubble.
|
|
175
|
+
*
|
|
176
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
177
|
+
*/
|
|
178
|
+
onBlur?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
179
|
+
/**
|
|
180
|
+
* Fired when a pointing device is pressed and released while the pointer is inside the element.
|
|
181
|
+
*
|
|
182
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event
|
|
183
|
+
*/
|
|
184
|
+
onClick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
185
|
+
/**
|
|
186
|
+
* Fired when a pointing device is pressed and released while the pointer is outside the element.
|
|
187
|
+
*
|
|
188
|
+
* NOTE: This is a custom event that isn't supported natively by browsers.
|
|
189
|
+
*/
|
|
190
|
+
onClickOutside?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
191
|
+
/**
|
|
192
|
+
* Fired when a text composition system (such as a Chinese/Japanese IME) completes or cancels the current composition session.
|
|
193
|
+
*
|
|
194
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event
|
|
195
|
+
*/
|
|
196
|
+
onCompositionEnd?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
197
|
+
/**
|
|
198
|
+
* Fired when a text composition system (such as a Chinese/Japanese IME) starts a new composition session.
|
|
199
|
+
*
|
|
200
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event
|
|
201
|
+
*/
|
|
202
|
+
onCompositionStart?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
203
|
+
/**
|
|
204
|
+
* Fired when a new character is received from a session in a text composition system (such as a Chinese/Japanese IME).
|
|
205
|
+
*
|
|
206
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event
|
|
207
|
+
*/
|
|
208
|
+
onCompositionUpdate?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
209
|
+
/**
|
|
210
|
+
* Fired when a pointing device button is rapidly clicked twice while the pointer is inside the element.
|
|
211
|
+
*
|
|
212
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/dblclick_event
|
|
213
|
+
*/
|
|
214
|
+
onDblClick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
215
|
+
/**
|
|
216
|
+
* Fired when the element has received focus. This event does not bubble.
|
|
217
|
+
*
|
|
218
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
|
|
219
|
+
*/
|
|
220
|
+
onFocus?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
221
|
+
/**
|
|
222
|
+
* Fired when an element has received focus. Fired after `onFocus`. Unlike `onFocus`, this event does bubble.
|
|
223
|
+
*
|
|
224
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focusin_event
|
|
225
|
+
*/
|
|
226
|
+
onFocusIn?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
227
|
+
/**
|
|
228
|
+
* Fired when an element has lost focus. Fired after `onBlur`. Unlike `onBlur`, this event does bubble.
|
|
229
|
+
*
|
|
230
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focusout_event
|
|
231
|
+
*/
|
|
232
|
+
onFocusOut?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
233
|
+
/**
|
|
234
|
+
* Fired when an element enters or exits fullscreen mode.
|
|
235
|
+
*
|
|
236
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/fullscreenchange_event
|
|
237
|
+
*/
|
|
238
|
+
onFullscreenChange?: OptionalProperty<EventHandler<Event>>;
|
|
239
|
+
/**
|
|
240
|
+
* Fired when the browser can't switch to fullscreen mode.
|
|
241
|
+
*
|
|
242
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/fullscreenerror_event
|
|
243
|
+
*/
|
|
244
|
+
onFullscreenError?: OptionalProperty<EventHandler<Event>>;
|
|
245
|
+
/**
|
|
246
|
+
* Fired when a key on the keyboard is pressed.
|
|
247
|
+
*
|
|
248
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event
|
|
249
|
+
*/
|
|
250
|
+
onKeyDown?: OptionalProperty<EventHandler<KeyboardEvent>>;
|
|
251
|
+
/**
|
|
252
|
+
* Fired when a key on the keyboard is released.
|
|
253
|
+
*
|
|
254
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/keyup_event
|
|
255
|
+
*/
|
|
256
|
+
onKeyUp?: OptionalProperty<EventHandler<KeyboardEvent>>;
|
|
257
|
+
/**
|
|
258
|
+
* Fired when a pointing device button is pressed while the pointer is inside the element.
|
|
259
|
+
*
|
|
260
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event
|
|
261
|
+
*/
|
|
262
|
+
onMouseDown?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
263
|
+
/**
|
|
264
|
+
* Fired when a pointing device enters the bounds of an element.
|
|
265
|
+
*
|
|
266
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event
|
|
267
|
+
*/
|
|
268
|
+
onMouseEnter?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
269
|
+
/**
|
|
270
|
+
* Fired when a pointing device leaves the bounds of an element. This event does not bubble.
|
|
271
|
+
*
|
|
272
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseleave_event
|
|
273
|
+
*/
|
|
274
|
+
onMouseLeave?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
275
|
+
/**
|
|
276
|
+
* Fired when a pointing device is moved while inside the bounds of an element.
|
|
277
|
+
*
|
|
278
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event
|
|
279
|
+
*/
|
|
280
|
+
onMouseMove?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
281
|
+
/**
|
|
282
|
+
* Fired when a pointing device leaves the bounds of an element or one of its children. Unlike `onMouseLeave`, this event does bubble.
|
|
283
|
+
*
|
|
284
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseout_event
|
|
285
|
+
*/
|
|
286
|
+
onMouseOut?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
287
|
+
/**
|
|
288
|
+
* Fired when a pointing device enters the bounds of an element or one of its children.
|
|
289
|
+
*
|
|
290
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseover_event
|
|
291
|
+
*/
|
|
292
|
+
onMouseOver?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
293
|
+
/**
|
|
294
|
+
* Fired when a pointing device button is released while the pointer is inside the element.
|
|
295
|
+
*
|
|
296
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event
|
|
297
|
+
*/
|
|
298
|
+
onMouseUp?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
299
|
+
/**
|
|
300
|
+
* Fired when the browser determines there are unlikely to be any more pointer events.
|
|
301
|
+
*
|
|
302
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointercancel_event
|
|
303
|
+
*/
|
|
304
|
+
onPointerCancel?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
305
|
+
/**
|
|
306
|
+
* Fired when a pointer becomes active inside the bounds of an element.
|
|
307
|
+
* For a mouse, this is when a button is pressed. For a touchscreen, this is when a finger makes contact.
|
|
308
|
+
*
|
|
309
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerdown_event
|
|
310
|
+
*/
|
|
311
|
+
onPointerDown?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
312
|
+
/**
|
|
313
|
+
* Fired when a pointer is moved into the boundary of an element or one of its children.
|
|
314
|
+
*
|
|
315
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerenter_event
|
|
316
|
+
*/
|
|
317
|
+
onPointerEnter?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
318
|
+
/**
|
|
319
|
+
* Fired when a pointer is moved outside the boundary of an element or one of its children.
|
|
320
|
+
* For a mouse, this is when a button is released. For a touchscreen, this is when a finger leaves the screen.
|
|
321
|
+
*
|
|
322
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerleave_event
|
|
323
|
+
*/
|
|
324
|
+
onPointerLeave?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
325
|
+
/**
|
|
326
|
+
* Fired when a pointer changes coordinates inside the bounds of an element or one of its children.
|
|
327
|
+
*
|
|
328
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointermove_event
|
|
329
|
+
*/
|
|
330
|
+
onPointerMove?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
331
|
+
/**
|
|
332
|
+
* Fired when a pointer is no longer in contact with an element or its children.
|
|
333
|
+
*
|
|
334
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerout_event
|
|
335
|
+
*/
|
|
336
|
+
onPointerOut?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
337
|
+
/**
|
|
338
|
+
* Fired when a pointer is moved into the boundary of an element.
|
|
339
|
+
*
|
|
340
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerover_event
|
|
341
|
+
*/
|
|
342
|
+
onPointerOver?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
343
|
+
/**
|
|
344
|
+
* Fired when a pointer is no longer active.
|
|
345
|
+
*
|
|
346
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerup_event
|
|
347
|
+
*/
|
|
348
|
+
onPointerUp?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
349
|
+
/**
|
|
350
|
+
* Fired when an element has been scrolled.
|
|
351
|
+
*
|
|
352
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event
|
|
353
|
+
*/
|
|
354
|
+
onScroll?: OptionalProperty<EventHandler<Event>>;
|
|
355
|
+
/**
|
|
356
|
+
* Fired when scrolling has completed.
|
|
357
|
+
*
|
|
358
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollend_event
|
|
359
|
+
*/
|
|
360
|
+
onScrollEnd?: OptionalProperty<EventHandler<Event>>;
|
|
361
|
+
/**
|
|
362
|
+
* Fired when one or more touch points have been disrupted.
|
|
363
|
+
*
|
|
364
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchcancel_event
|
|
365
|
+
*/
|
|
366
|
+
onTouchCancel?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
367
|
+
/**
|
|
368
|
+
* Fired when one or more touch points are removed from the touch surface.
|
|
369
|
+
* NOTE: This does not mean all touches are finished in the case of a multitouch gesture.
|
|
370
|
+
*
|
|
371
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchend_event
|
|
372
|
+
*/
|
|
373
|
+
onTouchEnd?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
374
|
+
/**
|
|
375
|
+
* Fired when one or more touch points are moved along the touch surface.
|
|
376
|
+
*
|
|
377
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchmove_event
|
|
378
|
+
*/
|
|
379
|
+
onTouchMove?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
380
|
+
/**
|
|
381
|
+
* Fired when one or more touch points are placed on the touch surface.
|
|
382
|
+
*
|
|
383
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchstart_event
|
|
384
|
+
*/
|
|
385
|
+
onTouchStart?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
386
|
+
/**
|
|
387
|
+
* Fired when a CSS transition is cancelled.
|
|
388
|
+
*
|
|
389
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitioncancel_event
|
|
390
|
+
*/
|
|
391
|
+
onTransitionCancel?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
392
|
+
/**
|
|
393
|
+
* Fired when a CSS transition has completed.
|
|
394
|
+
*
|
|
395
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionend_event
|
|
396
|
+
*/
|
|
397
|
+
onTransitionEnd?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
398
|
+
/**
|
|
399
|
+
* Fired when a CSS transition is first created.
|
|
400
|
+
*
|
|
401
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionrun_event
|
|
402
|
+
*/
|
|
403
|
+
onTransitionRun?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
404
|
+
/**
|
|
405
|
+
* Fired when a CSS transition starts playing (after any `transition-delay` has elapsed).
|
|
406
|
+
*
|
|
407
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionstart_event
|
|
408
|
+
*/
|
|
409
|
+
onTransitionStart?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
410
|
+
/**
|
|
411
|
+
* Fired when a wheel button on a pointing device is rotated.
|
|
412
|
+
*
|
|
413
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
|
|
414
|
+
*/
|
|
415
|
+
onWheel?: OptionalProperty<EventHandler<WheelEvent>>;
|
|
416
|
+
/**
|
|
417
|
+
* Fired when a CSS animation unexpectedly aborts.
|
|
418
|
+
*
|
|
419
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationcancel_event
|
|
420
|
+
*/
|
|
421
|
+
onanimationcancel?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
422
|
+
/**
|
|
423
|
+
* Fired when a CSS animation completes.
|
|
424
|
+
*
|
|
425
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationend_event
|
|
426
|
+
*/
|
|
427
|
+
onanimationend?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
428
|
+
/**
|
|
429
|
+
* Fired when an iteration of a CSS animation completes.
|
|
430
|
+
*
|
|
431
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationiteration_event
|
|
432
|
+
*/
|
|
433
|
+
onanimationiteration?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
434
|
+
/**
|
|
435
|
+
* Fired when a CSS animation starts.
|
|
436
|
+
*
|
|
437
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/animationstart_event
|
|
438
|
+
*/
|
|
439
|
+
onanimationstart?: OptionalProperty<EventHandler<AnimationEvent>>;
|
|
440
|
+
/**
|
|
441
|
+
* Fired when a pointing device's non-primary button is pressed and released while the pointer is inside the element.
|
|
442
|
+
* With a mouse, this would typically be any button other than left click.
|
|
443
|
+
*
|
|
444
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
|
|
445
|
+
*/
|
|
446
|
+
onauxclick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
447
|
+
/**
|
|
448
|
+
* Fired when the element has lost focus. This event does not bubble.
|
|
449
|
+
*
|
|
450
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
451
|
+
*/
|
|
452
|
+
onblur?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
453
|
+
/**
|
|
454
|
+
* Fired when a pointing device is pressed and released while the pointer is inside the element.
|
|
455
|
+
*
|
|
456
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event
|
|
457
|
+
*/
|
|
458
|
+
onclick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
459
|
+
/**
|
|
460
|
+
* Fired when a pointing device is pressed and released while the pointer is outside the element.
|
|
461
|
+
*
|
|
462
|
+
* NOTE: This is a custom event that isn't supported natively by browsers.
|
|
463
|
+
*/
|
|
464
|
+
onclickoutside?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
465
|
+
/**
|
|
466
|
+
* Fired when a text composition system (such as a Chinese/Japanese IME) completes or cancels the current composition session.
|
|
467
|
+
*
|
|
468
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event
|
|
469
|
+
*/
|
|
470
|
+
oncompositionend?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
471
|
+
/**
|
|
472
|
+
* Fired when a text composition system (such as a Chinese/Japanese IME) starts a new composition session.
|
|
473
|
+
*
|
|
474
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event
|
|
475
|
+
*/
|
|
476
|
+
oncompositionstart?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
477
|
+
/**
|
|
478
|
+
* Fired when a new character is received from a session in a text composition system (such as a Chinese/Japanese IME).
|
|
479
|
+
*
|
|
480
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event
|
|
481
|
+
*/
|
|
482
|
+
oncompositionupdate?: OptionalProperty<EventHandler<CompositionEvent>>;
|
|
483
|
+
/**
|
|
484
|
+
* Fired when a pointing device button is rapidly clicked twice while the pointer is inside the element.
|
|
485
|
+
*
|
|
486
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/dblclick_event
|
|
487
|
+
*/
|
|
488
|
+
ondblclick?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
489
|
+
/**
|
|
490
|
+
* Fired when the element has received focus. This event does not bubble.
|
|
491
|
+
*
|
|
492
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
|
|
493
|
+
*/
|
|
494
|
+
onfocus?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
495
|
+
/**
|
|
496
|
+
* Fired when an element has received focus. Fired after `onFocus`. Unlike `onFocus`, this event does bubble.
|
|
497
|
+
*
|
|
498
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focusin_event
|
|
499
|
+
*/
|
|
500
|
+
onfocusin?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
501
|
+
/**
|
|
502
|
+
* Fired when an element has lost focus. Fired after `onBlur`. Unlike `onBlur`, this event does bubble.
|
|
503
|
+
*
|
|
504
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focusout_event
|
|
505
|
+
*/
|
|
506
|
+
onfocusout?: OptionalProperty<EventHandler<FocusEvent>>;
|
|
507
|
+
/**
|
|
508
|
+
* Fired when an element enters or exits fullscreen mode.
|
|
509
|
+
*
|
|
510
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/fullscreenchange_event
|
|
511
|
+
*/
|
|
512
|
+
onfullscreenchange?: OptionalProperty<EventHandler<Event>>;
|
|
513
|
+
/**
|
|
514
|
+
* Fired when the browser can't switch to fullscreen mode.
|
|
515
|
+
*
|
|
516
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/fullscreenerror_event
|
|
517
|
+
*/
|
|
518
|
+
onfullscreenerror?: OptionalProperty<EventHandler<Event>>;
|
|
519
|
+
/**
|
|
520
|
+
* Fired when a key on the keyboard is pressed.
|
|
521
|
+
*
|
|
522
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event
|
|
523
|
+
*/
|
|
524
|
+
onkeydown?: OptionalProperty<EventHandler<KeyboardEvent>>;
|
|
525
|
+
/**
|
|
526
|
+
* Fired when a key on the keyboard is released.
|
|
527
|
+
*
|
|
528
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/keyup_event
|
|
529
|
+
*/
|
|
530
|
+
onkeyup?: OptionalProperty<EventHandler<KeyboardEvent>>;
|
|
531
|
+
/**
|
|
532
|
+
* Fired when a pointing device button is pressed while the pointer is inside the element.
|
|
533
|
+
*
|
|
534
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event
|
|
535
|
+
*/
|
|
536
|
+
onmousedown?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
537
|
+
/**
|
|
538
|
+
* Fired when a pointing device enters the bounds of an element.
|
|
539
|
+
*
|
|
540
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event
|
|
541
|
+
*/
|
|
542
|
+
onmouseenter?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
543
|
+
/**
|
|
544
|
+
* Fired when a pointing device leaves the bounds of an element. This event does not bubble.
|
|
545
|
+
*
|
|
546
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseleave_event
|
|
547
|
+
*/
|
|
548
|
+
onmouseleave?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
549
|
+
/**
|
|
550
|
+
* Fired when a pointing device is moved while inside the bounds of an element.
|
|
551
|
+
*
|
|
552
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event
|
|
553
|
+
*/
|
|
554
|
+
onmousemove?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
555
|
+
/**
|
|
556
|
+
* Fired when a pointing device leaves the bounds of an element or one of its children. Unlike `onMouseLeave`, this event does bubble.
|
|
557
|
+
*
|
|
558
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseout_event
|
|
559
|
+
*/
|
|
560
|
+
onmouseout?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
561
|
+
/**
|
|
562
|
+
* Fired when a pointing device enters the bounds of an element or one of its children.
|
|
563
|
+
*
|
|
564
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseover_event
|
|
565
|
+
*/
|
|
566
|
+
onmouseover?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
567
|
+
/**
|
|
568
|
+
* Fired when a pointing device button is released while the pointer is inside the element.
|
|
569
|
+
*
|
|
570
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event
|
|
571
|
+
*/
|
|
572
|
+
onmouseup?: OptionalProperty<EventHandler<MouseEvent>>;
|
|
573
|
+
/**
|
|
574
|
+
* Fired when the browser determines there are unlikely to be any more pointer events.
|
|
575
|
+
*
|
|
576
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointercancel_event
|
|
577
|
+
*/
|
|
578
|
+
onpointercancel?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
579
|
+
/**
|
|
580
|
+
* Fired when a pointer becomes active inside the bounds of an element.
|
|
581
|
+
* For a mouse, this is when a button is pressed. For a touchscreen, this is when a finger makes contact.
|
|
582
|
+
*
|
|
583
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerdown_event
|
|
584
|
+
*/
|
|
585
|
+
onpointerdown?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
586
|
+
/**
|
|
587
|
+
* Fired when a pointer is moved into the boundary of an element or one of its children.
|
|
588
|
+
*
|
|
589
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerenter_event
|
|
590
|
+
*/
|
|
591
|
+
onpointerenter?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
592
|
+
/**
|
|
593
|
+
* Fired when a pointer is moved outside the boundary of an element or one of its children.
|
|
594
|
+
* For a mouse, this is when a button is released. For a touchscreen, this is when a finger leaves the screen.
|
|
595
|
+
*
|
|
596
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerleave_event
|
|
597
|
+
*/
|
|
598
|
+
onpointerleave?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
599
|
+
/**
|
|
600
|
+
* Fired when a pointer changes coordinates inside the bounds of an element or one of its children.
|
|
601
|
+
*
|
|
602
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointermove_event
|
|
603
|
+
*/
|
|
604
|
+
onpointermove?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
605
|
+
/**
|
|
606
|
+
* Fired when a pointer is no longer in contact with an element or its children.
|
|
607
|
+
*
|
|
608
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerout_event
|
|
609
|
+
*/
|
|
610
|
+
onpointerout?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
611
|
+
/**
|
|
612
|
+
* Fired when a pointer is moved into the boundary of an element.
|
|
613
|
+
*
|
|
614
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerover_event
|
|
615
|
+
*/
|
|
616
|
+
onpointerover?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
617
|
+
/**
|
|
618
|
+
* Fired when a pointer is no longer active.
|
|
619
|
+
*
|
|
620
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerup_event
|
|
621
|
+
*/
|
|
622
|
+
onpointerup?: OptionalProperty<EventHandler<PointerEvent>>;
|
|
623
|
+
/**
|
|
624
|
+
* Fired when an element has been scrolled.
|
|
625
|
+
*
|
|
626
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event
|
|
627
|
+
*/
|
|
628
|
+
onscroll?: OptionalProperty<EventHandler<Event>>;
|
|
629
|
+
/**
|
|
630
|
+
* Fired when scrolling has completed.
|
|
631
|
+
*
|
|
632
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollend_event
|
|
633
|
+
*/
|
|
634
|
+
onscrollend?: OptionalProperty<EventHandler<Event>>;
|
|
635
|
+
/**
|
|
636
|
+
* Fired when one or more touch points have been disrupted.
|
|
637
|
+
*
|
|
638
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchcancel_event
|
|
639
|
+
*/
|
|
640
|
+
ontouchcancel?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
641
|
+
/**
|
|
642
|
+
* Fired when one or more touch points are removed from the touch surface.
|
|
643
|
+
* NOTE: This does not mean all touches are finished in the case of a multitouch gesture.
|
|
644
|
+
*
|
|
645
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchend_event
|
|
646
|
+
*/
|
|
647
|
+
ontouchend?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
648
|
+
/**
|
|
649
|
+
* Fired when one or more touch points are moved along the touch surface.
|
|
650
|
+
*
|
|
651
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchmove_event
|
|
652
|
+
*/
|
|
653
|
+
ontouchmove?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
654
|
+
/**
|
|
655
|
+
* Fired when one or more touch points are placed on the touch surface.
|
|
656
|
+
*
|
|
657
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/touchstart_event
|
|
658
|
+
*/
|
|
659
|
+
ontouchstart?: OptionalProperty<EventHandler<TouchEvent>>;
|
|
660
|
+
/**
|
|
661
|
+
* Fired when a CSS transition is cancelled.
|
|
662
|
+
*
|
|
663
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitioncancel_event
|
|
664
|
+
*/
|
|
665
|
+
ontransitioncancel?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
666
|
+
/**
|
|
667
|
+
* Fired when a CSS transition has completed.
|
|
668
|
+
*
|
|
669
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionend_event
|
|
670
|
+
*/
|
|
671
|
+
ontransitionend?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
672
|
+
/**
|
|
673
|
+
* Fired when a CSS transition is first created.
|
|
674
|
+
*
|
|
675
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionrun_event
|
|
676
|
+
*/
|
|
677
|
+
ontransitionrun?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
678
|
+
/**
|
|
679
|
+
* Fired when a CSS transition starts playing (after any `transition-delay` has elapsed).
|
|
680
|
+
*
|
|
681
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionstart_event
|
|
682
|
+
*/
|
|
683
|
+
ontransitionstart?: OptionalProperty<EventHandler<TransitionEvent>>;
|
|
684
|
+
/**
|
|
685
|
+
* Fired when a wheel button on a pointing device is rotated.
|
|
686
|
+
*
|
|
687
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
|
|
688
|
+
*/
|
|
689
|
+
onwheel?: OptionalProperty<EventHandler<WheelEvent>>;
|
|
690
|
+
}
|
|
691
|
+
export interface HTMLElementProps extends ElementProps {
|
|
692
|
+
/**
|
|
693
|
+
* Sets the key a user can press to jump to this element.
|
|
694
|
+
*
|
|
695
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/accessKey
|
|
696
|
+
*/
|
|
697
|
+
accessKey?: OptionalProperty<string>;
|
|
698
|
+
/**
|
|
699
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize
|
|
700
|
+
*/
|
|
701
|
+
autocapitalize?: OptionalProperty<AutocapitalizeValues>;
|
|
702
|
+
/**
|
|
703
|
+
* Indicates that this element should be focused as soon as it is connected to the DOM.
|
|
704
|
+
*
|
|
705
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
706
|
+
*/
|
|
707
|
+
autofocus?: OptionalProperty<boolean>;
|
|
708
|
+
/**
|
|
709
|
+
* Makes the element's content editable by the user. This is commonly used as the basis for web-based text editors.
|
|
710
|
+
*
|
|
711
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable
|
|
712
|
+
*/
|
|
713
|
+
contentEditable?: OptionalProperty<ContentEditableValues>;
|
|
714
|
+
/**
|
|
715
|
+
* Specifies text directionality of the content of this element. Some languages, such as Arabic, are written from right to left (specified here as "rtl").
|
|
716
|
+
*
|
|
717
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dir
|
|
718
|
+
*/
|
|
719
|
+
dir?: OptionalProperty<DirValues>;
|
|
720
|
+
/**
|
|
721
|
+
* Indicates that this element is draggable, that is, that the user can initiate a drag and drop operation with it.
|
|
722
|
+
*
|
|
723
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
724
|
+
*/
|
|
725
|
+
draggable?: OptionalProperty<boolean>;
|
|
726
|
+
/**
|
|
727
|
+
* Provides a hint for on-screen keyboards about what will happen when the Enter key is pressed.
|
|
728
|
+
*
|
|
729
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/enterKeyHint
|
|
730
|
+
*/
|
|
731
|
+
enterKeyHint?: OptionalProperty<EnterKeyHintValues>;
|
|
732
|
+
/**
|
|
733
|
+
* Indicates that the browser should not render this content. Maps to the `hidden` attribute.
|
|
734
|
+
*
|
|
735
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden
|
|
736
|
+
*/
|
|
737
|
+
hidden?: OptionalProperty<HiddenValues>;
|
|
738
|
+
/**
|
|
739
|
+
* Indicates that this element is completely non-interactive. Elements receive no user input events while inert.
|
|
740
|
+
*
|
|
741
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
|
|
742
|
+
*/
|
|
743
|
+
inert?: OptionalProperty<boolean>;
|
|
744
|
+
/**
|
|
745
|
+
* Provides a hint about the type of data that might be entered while editing the element.
|
|
746
|
+
* Can affect the display of virtual keyboards.
|
|
747
|
+
*
|
|
748
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inputMode
|
|
749
|
+
*/
|
|
750
|
+
inputMode?: OptionalProperty<InputModeValues>;
|
|
751
|
+
/**
|
|
752
|
+
* The base language of the element's attributes and text content.
|
|
753
|
+
*
|
|
754
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/lang
|
|
755
|
+
*/
|
|
756
|
+
lang?: OptionalProperty<string>;
|
|
757
|
+
/**
|
|
758
|
+
* TODO: Add support. Currently experimental.
|
|
759
|
+
*/
|
|
760
|
+
/**
|
|
761
|
+
* This element's position in the tab order, or the order this element will be focused as the user cycles through elements with the tab key.
|
|
762
|
+
*
|
|
763
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex
|
|
764
|
+
*/
|
|
765
|
+
tabIndex?: OptionalProperty<number>;
|
|
766
|
+
/**
|
|
767
|
+
* The title of the element, which is typically displayed in a tooltip when the user hovers the mouse over the element.
|
|
768
|
+
*
|
|
769
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/title
|
|
770
|
+
*/
|
|
771
|
+
title?: OptionalProperty<string>;
|
|
772
|
+
/**
|
|
773
|
+
* Fired when the value of an `<input>` or `<textarea>` element (or any element with `contentEditable` enabled) is about to be modified.
|
|
774
|
+
*
|
|
775
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event
|
|
776
|
+
*/
|
|
777
|
+
onBeforeInput?: OptionalProperty<EventHandler<InputEvent>>;
|
|
778
|
+
/**
|
|
779
|
+
* Fired when the user modifies the value of an `<input>`, `<textarea>` or `<select>` element.
|
|
780
|
+
*
|
|
781
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
782
|
+
*/
|
|
783
|
+
onChange?: OptionalProperty<EventHandler<Event>>;
|
|
784
|
+
/**
|
|
785
|
+
* Fired when the user copies some content to the clipboard.
|
|
786
|
+
*
|
|
787
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/copy_event
|
|
788
|
+
*/
|
|
789
|
+
onCopy?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
790
|
+
/**
|
|
791
|
+
* Fired when the user cuts some content to the clipboard.
|
|
792
|
+
*
|
|
793
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/cut_event
|
|
794
|
+
*/
|
|
795
|
+
onCut?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
796
|
+
/**
|
|
797
|
+
* Fired periodically as the user is dragging in the context of a drag and drop operation.
|
|
798
|
+
*
|
|
799
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drag_event
|
|
800
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
801
|
+
*/
|
|
802
|
+
onDrag?: OptionalProperty<EventHandler<DragEvent>>;
|
|
803
|
+
/**
|
|
804
|
+
* Fired when a drag operation ends.
|
|
805
|
+
*
|
|
806
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragend_event
|
|
807
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
808
|
+
*/
|
|
809
|
+
onDragEnd?: OptionalProperty<EventHandler<DragEvent>>;
|
|
810
|
+
/**
|
|
811
|
+
* Fired when a dragged element or content enters a drop target.
|
|
812
|
+
*
|
|
813
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragenter_event
|
|
814
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
815
|
+
*/
|
|
816
|
+
onDragEnter?: OptionalProperty<EventHandler<DragEvent>>;
|
|
817
|
+
/**
|
|
818
|
+
* Fired when a dragged element or content leaves a drop target.
|
|
819
|
+
*
|
|
820
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragleave_event
|
|
821
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
822
|
+
*/
|
|
823
|
+
onDragLeave?: OptionalProperty<EventHandler<DragEvent>>;
|
|
824
|
+
/**
|
|
825
|
+
* Fired periodically as the user is dragging an element or content over a drop target.
|
|
826
|
+
*
|
|
827
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragover_event
|
|
828
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
829
|
+
*/
|
|
830
|
+
onDragOver?: OptionalProperty<EventHandler<DragEvent>>;
|
|
831
|
+
/**
|
|
832
|
+
* Fired when a user begins dragging an element or content.
|
|
833
|
+
*
|
|
834
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragstart_event
|
|
835
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
836
|
+
*/
|
|
837
|
+
onDragStart?: OptionalProperty<EventHandler<DragEvent>>;
|
|
838
|
+
/**
|
|
839
|
+
* Fired when a dragged element or content is dropped onto a drop target.
|
|
840
|
+
*
|
|
841
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event
|
|
842
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
843
|
+
*/
|
|
844
|
+
onDrop?: OptionalProperty<EventHandler<DragEvent>>;
|
|
845
|
+
/**
|
|
846
|
+
* Fired when a resource failed to load, for example, if the `src` can't be resolved on an `<image>` element. This event does not bubble.
|
|
847
|
+
*
|
|
848
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/error_event
|
|
849
|
+
*/
|
|
850
|
+
onError?: OptionalProperty<EventHandler<UIEvent | Event>>;
|
|
851
|
+
/**
|
|
852
|
+
* Fired when a resource failed to load, for example, if the `src` can't be resolved on an `<image>` element. This event does not bubble.
|
|
853
|
+
*
|
|
854
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
|
|
855
|
+
*/
|
|
856
|
+
onInput?: OptionalProperty<EventHandler<Event>>;
|
|
857
|
+
/**
|
|
858
|
+
* Fired when a resource was successfully loaded, for example, when the `src` is loaded for an `<image>` element. This event does not bubble.
|
|
859
|
+
*
|
|
860
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event
|
|
861
|
+
*/
|
|
862
|
+
onLoad?: OptionalProperty<EventHandler<Event>>;
|
|
863
|
+
/**
|
|
864
|
+
* Fired when the user pastes some content from the clipboard.
|
|
865
|
+
*
|
|
866
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/paste_event
|
|
867
|
+
*/
|
|
868
|
+
onPaste?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
869
|
+
/**
|
|
870
|
+
* Fired when the value of an `<input>` or `<textarea>` element (or any element with `contentEditable` enabled) is about to be modified.
|
|
871
|
+
*
|
|
872
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event
|
|
873
|
+
*/
|
|
874
|
+
onbeforeinput?: OptionalProperty<EventHandler<InputEvent>>;
|
|
875
|
+
/**
|
|
876
|
+
* Fired when the user modifies the value of an `<input>`, `<textarea>` or `<select>` element.
|
|
877
|
+
*
|
|
878
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
879
|
+
*/
|
|
880
|
+
onchange?: OptionalProperty<EventHandler<Event>>;
|
|
881
|
+
/**
|
|
882
|
+
* Fired when the user copies some content to the clipboard.
|
|
883
|
+
*
|
|
884
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/copy_event
|
|
885
|
+
*/
|
|
886
|
+
oncopy?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
887
|
+
/**
|
|
888
|
+
* Fired when the user cuts some content to the clipboard.
|
|
889
|
+
*
|
|
890
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/cut_event
|
|
891
|
+
*/
|
|
892
|
+
oncut?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
893
|
+
/**
|
|
894
|
+
* Fired periodically as the user is dragging in the context of a drag and drop operation.
|
|
895
|
+
*
|
|
896
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drag_event
|
|
897
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
898
|
+
*/
|
|
899
|
+
ondrag?: OptionalProperty<EventHandler<DragEvent>>;
|
|
900
|
+
/**
|
|
901
|
+
* Fired when a drag operation ends.
|
|
902
|
+
*
|
|
903
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragend_event
|
|
904
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
905
|
+
*/
|
|
906
|
+
ondragend?: OptionalProperty<EventHandler<DragEvent>>;
|
|
907
|
+
/**
|
|
908
|
+
* Fired when a dragged element or content enters a drop target.
|
|
909
|
+
*
|
|
910
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragenter_event
|
|
911
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
912
|
+
*/
|
|
913
|
+
ondragenter?: OptionalProperty<EventHandler<DragEvent>>;
|
|
914
|
+
/**
|
|
915
|
+
* Fired when a dragged element or content leaves a drop target.
|
|
916
|
+
*
|
|
917
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragleave_event
|
|
918
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
919
|
+
*/
|
|
920
|
+
ondragleave?: OptionalProperty<EventHandler<DragEvent>>;
|
|
921
|
+
/**
|
|
922
|
+
* Fired periodically as the user is dragging an element or content over a drop target.
|
|
923
|
+
*
|
|
924
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragover_event
|
|
925
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
926
|
+
*/
|
|
927
|
+
ondragover?: OptionalProperty<EventHandler<DragEvent>>;
|
|
928
|
+
/**
|
|
929
|
+
* Fired when a user begins dragging an element or content.
|
|
930
|
+
*
|
|
931
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragstart_event
|
|
932
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
933
|
+
*/
|
|
934
|
+
ondragstart?: OptionalProperty<EventHandler<DragEvent>>;
|
|
935
|
+
/**
|
|
936
|
+
* Fired when a dragged element or content is dropped onto a drop target.
|
|
937
|
+
*
|
|
938
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event
|
|
939
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
|
|
940
|
+
*/
|
|
941
|
+
ondrop?: OptionalProperty<EventHandler<DragEvent>>;
|
|
942
|
+
/**
|
|
943
|
+
* Fired when a resource failed to load, for example, if the `src` can't be resolved on an `<image>` element. This event does not bubble.
|
|
944
|
+
*
|
|
945
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/error_event
|
|
946
|
+
*/
|
|
947
|
+
onerror?: OptionalProperty<EventHandler<UIEvent | Event>>;
|
|
948
|
+
/**
|
|
949
|
+
* Fired when a resource failed to load, for example, if the `src` can't be resolved on an `<image>` element. This event does not bubble.
|
|
950
|
+
*
|
|
951
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
|
|
952
|
+
*/
|
|
953
|
+
oninput?: OptionalProperty<EventHandler<Event>>;
|
|
954
|
+
/**
|
|
955
|
+
* Fired when a resource was successfully loaded, for example, when the `src` is loaded for an `<image>` element. This event does not bubble.
|
|
956
|
+
*
|
|
957
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event
|
|
958
|
+
*/
|
|
959
|
+
onload?: OptionalProperty<EventHandler<Event>>;
|
|
960
|
+
/**
|
|
961
|
+
* Fired when the user pastes some content from the clipboard.
|
|
962
|
+
*
|
|
963
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/paste_event
|
|
964
|
+
*/
|
|
965
|
+
onpaste?: OptionalProperty<EventHandler<ClipboardEvent>>;
|
|
966
|
+
}
|
|
967
|
+
export interface SVGElementProps extends ElementProps {
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Mapping of event props to event names.
|
|
971
|
+
*/
|
|
972
|
+
export declare const eventPropsToEventNames: {
|
|
973
|
+
onAnimationCancel: string;
|
|
974
|
+
onAnimationEnd: string;
|
|
975
|
+
onAnimationIteration: string;
|
|
976
|
+
onAnimationStart: string;
|
|
977
|
+
onAuxClick: string;
|
|
978
|
+
onBlur: string;
|
|
979
|
+
onClick: string;
|
|
980
|
+
onCompositionEnd: string;
|
|
981
|
+
onCompositionStart: string;
|
|
982
|
+
onCompositionUpdate: string;
|
|
983
|
+
onDoubleClick: string;
|
|
984
|
+
onFocus: string;
|
|
985
|
+
onFocusIn: string;
|
|
986
|
+
onFocusOut: string;
|
|
987
|
+
onFullscreenChange: string;
|
|
988
|
+
onFullscreenError: string;
|
|
989
|
+
onKeyDown: string;
|
|
990
|
+
onKeyUp: string;
|
|
991
|
+
onMouseDown: string;
|
|
992
|
+
onMouseEnter: string;
|
|
993
|
+
onMouseLeave: string;
|
|
994
|
+
onMouseMove: string;
|
|
995
|
+
onMouseOut: string;
|
|
996
|
+
onMouseOver: string;
|
|
997
|
+
onMouseUp: string;
|
|
998
|
+
onPointerCancel: string;
|
|
999
|
+
onPointerDown: string;
|
|
1000
|
+
onPointerEnter: string;
|
|
1001
|
+
onPointerLeave: string;
|
|
1002
|
+
onPointerMove: string;
|
|
1003
|
+
onPointerOut: string;
|
|
1004
|
+
onPointerOver: string;
|
|
1005
|
+
onPointerUp: string;
|
|
1006
|
+
onScroll: string;
|
|
1007
|
+
onScrollEnd: string;
|
|
1008
|
+
onTouchCancel: string;
|
|
1009
|
+
onTouchEnd: string;
|
|
1010
|
+
onTouchMove: string;
|
|
1011
|
+
onTouchStart: string;
|
|
1012
|
+
onTransitionCancel: string;
|
|
1013
|
+
onTransitionEnd: string;
|
|
1014
|
+
onTransitionRun: string;
|
|
1015
|
+
onTransitionStart: string;
|
|
1016
|
+
onWheel: string;
|
|
1017
|
+
onBeforeInput: string;
|
|
1018
|
+
onChange: string;
|
|
1019
|
+
onCopy: string;
|
|
1020
|
+
onCut: string;
|
|
1021
|
+
onDrag: string;
|
|
1022
|
+
onDragEnd: string;
|
|
1023
|
+
onDragEnter: string;
|
|
1024
|
+
onDragLeave: string;
|
|
1025
|
+
onDragOver: string;
|
|
1026
|
+
onDragStart: string;
|
|
1027
|
+
onDrop: string;
|
|
1028
|
+
onError: string;
|
|
1029
|
+
onInput: string;
|
|
1030
|
+
onLoad: string;
|
|
1031
|
+
onPaste: string;
|
|
1032
|
+
onAbort: string;
|
|
1033
|
+
onCanPlay: string;
|
|
1034
|
+
onCanPlayThrough: string;
|
|
1035
|
+
onDurationChange: string;
|
|
1036
|
+
onEmptied: string;
|
|
1037
|
+
onEncrypted: string;
|
|
1038
|
+
onEnded: string;
|
|
1039
|
+
onLoadedData: string;
|
|
1040
|
+
onLoadedMetadata: string;
|
|
1041
|
+
onLoadStart: string;
|
|
1042
|
+
onPause: string;
|
|
1043
|
+
onPlay: string;
|
|
1044
|
+
onPlaying: string;
|
|
1045
|
+
onProgress: string;
|
|
1046
|
+
onRateChange: string;
|
|
1047
|
+
onSeeked: string;
|
|
1048
|
+
onSeeking: string;
|
|
1049
|
+
onStalled: string;
|
|
1050
|
+
onSuspend: string;
|
|
1051
|
+
onTimeUpdate: string;
|
|
1052
|
+
onVolumeChange: string;
|
|
1053
|
+
onWaiting: string;
|
|
1054
|
+
onFormData: string;
|
|
1055
|
+
onReset: string;
|
|
1056
|
+
onSubmit: string;
|
|
1057
|
+
onInvalid: string;
|
|
1058
|
+
onSelect: string;
|
|
1059
|
+
};
|
|
1060
|
+
/**
|
|
1061
|
+
* The set of HTML attributes supported by all HTML elements.
|
|
1062
|
+
*/
|
|
1063
|
+
export interface HTMLGlobalAttributes {
|
|
1064
|
+
/**
|
|
1065
|
+
* The accesskey global attribute provides a hint for generating a keyboard shortcut
|
|
1066
|
+
* for the current element. The attribute value must consist of a single printable character
|
|
1067
|
+
* (which includes accented and other characters that can be generated by the keyboard).
|
|
1068
|
+
*
|
|
1069
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey
|
|
1070
|
+
*/
|
|
1071
|
+
accesskey: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* The autocapitalize global attribute is an enumerated attribute that controls whether and
|
|
1074
|
+
* how text input is automatically capitalized as it is entered/edited by the user.
|
|
1075
|
+
*
|
|
1076
|
+
* The attribute must take one of the following values:
|
|
1077
|
+
* - `off` or `none`: No autocapitalization is applied (all letters default to lowercase)
|
|
1078
|
+
* - `on` or `sentences`: The first letter of each sentence defaults to a capital letter; all other letters default to lowercase
|
|
1079
|
+
* - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
|
|
1080
|
+
* - `characters`: All letters should default to uppercase
|
|
1081
|
+
*
|
|
1082
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize
|
|
1083
|
+
*/
|
|
1084
|
+
autocapitalize: "off" | "on" | "none" | "sentences" | "words" | "characters";
|
|
1085
|
+
/**
|
|
1086
|
+
* The `autofocus` attribute allows the author to indicate that an element
|
|
1087
|
+
* is to be focused as soon as the page is loaded or as soon as the dialog within
|
|
1088
|
+
* which it finds itself is shown, allowing the user to just start typing without
|
|
1089
|
+
* having to manually focus the main element.
|
|
1090
|
+
*
|
|
1091
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
1092
|
+
*/
|
|
1093
|
+
autofocus: boolean;
|
|
1094
|
+
/**
|
|
1095
|
+
* CSS classes to be applied to this element. In addition to the standard space-separated list of class names,
|
|
1096
|
+
* this attribute is expanded in Dolla to also support a class map object with class names as keys and booleans as values.
|
|
1097
|
+
* Class names in a class map will be applied to the element while their values are true. Also supports an
|
|
1098
|
+
* array of strings and class maps.
|
|
1099
|
+
*
|
|
1100
|
+
* @example
|
|
1101
|
+
* <div class="one-class" />
|
|
1102
|
+
*
|
|
1103
|
+
* <div class={["array", "of", "classes"]} />
|
|
1104
|
+
*
|
|
1105
|
+
* <div class={{ applied: true, notApplied: false }} />
|
|
1106
|
+
*
|
|
1107
|
+
* <div class={["class", "class2", { "conditional": $value }]} />
|
|
1108
|
+
*/
|
|
1109
|
+
class: string | ClassMap | Array<string | ClassMap | (string | ClassMap)[]>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Specifies whether the element's content can be edited.
|
|
1112
|
+
*
|
|
1113
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#attr-contenteditable
|
|
1114
|
+
*/
|
|
1115
|
+
contenteditable: "" | "true" | "false";
|
|
1116
|
+
/**
|
|
1117
|
+
* Specifies the element's text directionality.
|
|
1118
|
+
*
|
|
1119
|
+
* @see https://html.spec.whatwg.org/multipage/dom.html#attr-dir
|
|
1120
|
+
*/
|
|
1121
|
+
dir: "ltr" | "rtl" | "auto";
|
|
1122
|
+
/**
|
|
1123
|
+
* Specifies whether the element is draggable for use with the [HTML Drag and Drop API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API).
|
|
1124
|
+
*
|
|
1125
|
+
* @see https://html.spec.whatwg.org/multipage/dnd.html#attr-draggable
|
|
1126
|
+
*/
|
|
1127
|
+
draggable: "true" | "false";
|
|
1128
|
+
/**
|
|
1129
|
+
* The `enterkeyhint` attribute defines what action label (or icon) to present for the enter key on virtual keyboards.
|
|
1130
|
+
* This allows authors to customize the presentation of the enter key in order to make it more helpful for users.
|
|
1131
|
+
*
|
|
1132
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#attr-enterkeyhint
|
|
1133
|
+
*/
|
|
1134
|
+
enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1135
|
+
/**
|
|
1136
|
+
* The `hidden` global attribute is a Boolean attribute indicating that the element is not yet,
|
|
1137
|
+
* or is no longer, relevant. For example, it can be used to hide elements of the page that can't
|
|
1138
|
+
* be used until the login process has been completed. Browsers won't render elements with the `hidden` attribute set.
|
|
1139
|
+
*
|
|
1140
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#attr-hidden
|
|
1141
|
+
*/
|
|
1142
|
+
hidden: boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* The `id` defines an identifier (ID) which must be unique in the whole document. Its purpose is
|
|
1145
|
+
* to identify the element when linking, scripting, or styling with CSS.
|
|
1146
|
+
*
|
|
1147
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
1148
|
+
*/
|
|
1149
|
+
id: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#the-inert-attribute
|
|
1152
|
+
*/
|
|
1153
|
+
inert: unknown;
|
|
1154
|
+
/**
|
|
1155
|
+
* The `inputmode` content attribute is an enumerated attribute that specifies what kind of input mechanism would be most helpful for users entering content.
|
|
1156
|
+
*/
|
|
1157
|
+
inputmode: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
1158
|
+
/**
|
|
1159
|
+
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
|
|
1160
|
+
*/
|
|
1161
|
+
is: string;
|
|
1162
|
+
/**
|
|
1163
|
+
* @see https://html.spec.whatwg.org/multipage/microdata.html#encoding-microdata
|
|
1164
|
+
*/
|
|
1165
|
+
itemid: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* @see https://html.spec.whatwg.org/multipage/microdata.html#encoding-microdata
|
|
1168
|
+
*/
|
|
1169
|
+
itemprop: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* @see https://html.spec.whatwg.org/multipage/microdata.html#encoding-microdata
|
|
1172
|
+
*/
|
|
1173
|
+
itemref: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* @see https://html.spec.whatwg.org/multipage/microdata.html#encoding-microdata
|
|
1176
|
+
*/
|
|
1177
|
+
itemscope: boolean;
|
|
1178
|
+
/**
|
|
1179
|
+
* @see https://html.spec.whatwg.org/multipage/microdata.html#encoding-microdata
|
|
1180
|
+
*/
|
|
1181
|
+
itemtype: string;
|
|
1182
|
+
/**
|
|
1183
|
+
* The `lang` global attribute helps define the language of an element: the language that non-editable elements are written in,
|
|
1184
|
+
* or the language that the editable elements should be written in by the user. The attribute contains a single "language tag"
|
|
1185
|
+
* in the format defined in [RFC 5646: Tags for Identifying Languages (also known as BCP 47)](https://datatracker.ietf.org/doc/html/rfc5646).
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* ```html
|
|
1189
|
+
* <span lang="ja">おはようございます</span>
|
|
1190
|
+
* ```
|
|
1191
|
+
*
|
|
1192
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
|
|
1193
|
+
*/
|
|
1194
|
+
lang: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#attr-nonce
|
|
1197
|
+
*/
|
|
1198
|
+
nonce: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* Specifies if the element is to have its spelling and grammar checked.
|
|
1201
|
+
*
|
|
1202
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#attr-spellcheck
|
|
1203
|
+
*/
|
|
1204
|
+
spellcheck: "" | "true" | "false";
|
|
1205
|
+
/**
|
|
1206
|
+
* Inline CSS styles.
|
|
1207
|
+
*/
|
|
1208
|
+
style: CSSProperties;
|
|
1209
|
+
/**
|
|
1210
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex
|
|
1211
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
1212
|
+
*/
|
|
1213
|
+
tabindex: number;
|
|
1214
|
+
/**
|
|
1215
|
+
* The `title` attribute represents advisory information for the element, such as would be appropriate for a tooltip.
|
|
1216
|
+
* On a link, this could be the title or a description of the target resource; on an image, it could be the image credit
|
|
1217
|
+
* or a description of the image; on a paragraph, it could be a footnote or commentary on the text; on a citation,
|
|
1218
|
+
* it could be further information about the source; on interactive content, it could be a label for, or instructions for,
|
|
1219
|
+
* use of the element; and so forth.
|
|
1220
|
+
*
|
|
1221
|
+
* @see https://html.spec.whatwg.org/multipage/dom.html#attr-title
|
|
1222
|
+
*/
|
|
1223
|
+
title: string;
|
|
1224
|
+
/**
|
|
1225
|
+
* The `translate` global attribute is an enumerated attribute that is used to specify whether an element's _translatable attribute_
|
|
1226
|
+
* values and its `Text` node children should be translated when the page is localized, or whether to leave them unchanged.
|
|
1227
|
+
*
|
|
1228
|
+
* @see https://html.spec.whatwg.org/multipage/dom.html#attr-translate
|
|
1229
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate
|
|
1230
|
+
*/
|
|
1231
|
+
translate: "" | "yes" | "no";
|
|
1232
|
+
}
|
|
1233
|
+
export interface Styles extends CSS.Properties, CSS.PropertiesHyphen {
|
|
1234
|
+
[key: string]: any;
|
|
1235
|
+
}
|
|
1236
|
+
export type CSSProperties = {
|
|
1237
|
+
[K in keyof Styles]: OptionalProperty<Styles[K]>;
|
|
1238
|
+
};
|
|
1239
|
+
export interface ClassMap {
|
|
1240
|
+
[className: string]: MaybeReadable<any>;
|
|
1241
|
+
}
|
|
1242
|
+
export type EventHandler<E> = (event: E) => void;
|
|
1243
|
+
export interface PropertiesOf<E extends HTMLElement> extends HTMLElementProps {
|
|
1244
|
+
/**
|
|
1245
|
+
* For TypeScript support; child elements passed through JSX.
|
|
1246
|
+
*/
|
|
1247
|
+
children?: any;
|
|
1248
|
+
/**
|
|
1249
|
+
* A Ref object or function that receives the DOM node when rendered.
|
|
1250
|
+
*/
|
|
1251
|
+
ref?: Writable<E> | Writable<HTMLElement> | Writable<Element> | Writable<E | undefined> | Writable<HTMLElement | undefined> | Writable<Element | undefined>;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* The following elements are defined based on the WHATWG HTML spec:
|
|
1255
|
+
* https://html.spec.whatwg.org/multipage/#toc-semantics
|
|
1256
|
+
**/
|
|
1257
|
+
export interface IntrinsicElements {
|
|
1258
|
+
/**
|
|
1259
|
+
* The `article` element represents a complete, or self-contained, composition in a document, page, application,
|
|
1260
|
+
* or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post,
|
|
1261
|
+
* a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget,
|
|
1262
|
+
* or any other independent item of content.
|
|
1263
|
+
*
|
|
1264
|
+
* When `article` elements are nested, the inner `article` elements represent articles that are in principle
|
|
1265
|
+
* related to the contents of the outer article. For instance, a blog entry on a site that accepts user-submitted
|
|
1266
|
+
* comments could represent the comments as `article` elements nested within the `article` element for the blog entry.
|
|
1267
|
+
*
|
|
1268
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-article-element
|
|
1269
|
+
*/
|
|
1270
|
+
article: PropertiesOf<HTMLElement>;
|
|
1271
|
+
/**
|
|
1272
|
+
* The `section` element represents a generic section of a document or application. A section, in this context,
|
|
1273
|
+
* is a thematic grouping of content, typically with a heading.
|
|
1274
|
+
*
|
|
1275
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-section-element
|
|
1276
|
+
*/
|
|
1277
|
+
section: PropertiesOf<HTMLElement>;
|
|
1278
|
+
/**
|
|
1279
|
+
* The `nav` element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.
|
|
1280
|
+
*
|
|
1281
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-nav-element
|
|
1282
|
+
*/
|
|
1283
|
+
nav: PropertiesOf<HTMLElement>;
|
|
1284
|
+
/**
|
|
1285
|
+
* The `aside` element represents a section of a page that consists of content that is tangentially related
|
|
1286
|
+
* to the content around the `aside` element, and which could be considered separate from that content.
|
|
1287
|
+
* Such sections are often represented as sidebars in printed typography.
|
|
1288
|
+
*
|
|
1289
|
+
* The element can be used for typographical effects like pull quotes or sidebars, for advertising,
|
|
1290
|
+
* for groups of nav elements, and for other content that is considered separate from the main content of the page.
|
|
1291
|
+
*
|
|
1292
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-aside-element
|
|
1293
|
+
*/
|
|
1294
|
+
aside: PropertiesOf<HTMLElement>;
|
|
1295
|
+
/**
|
|
1296
|
+
* A heading for a top-level section.
|
|
1297
|
+
*
|
|
1298
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1299
|
+
*/
|
|
1300
|
+
h1: PropertiesOf<HTMLHeadingElement>;
|
|
1301
|
+
/**
|
|
1302
|
+
* A heading for a subsection.
|
|
1303
|
+
*
|
|
1304
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1305
|
+
*/
|
|
1306
|
+
h2: PropertiesOf<HTMLHeadingElement>;
|
|
1307
|
+
/**
|
|
1308
|
+
* A heading for a sub-subsection.
|
|
1309
|
+
*
|
|
1310
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1311
|
+
*/
|
|
1312
|
+
h3: PropertiesOf<HTMLHeadingElement>;
|
|
1313
|
+
/**
|
|
1314
|
+
* A heading for a sub-sub-subsection.
|
|
1315
|
+
*
|
|
1316
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1317
|
+
*/
|
|
1318
|
+
h4: PropertiesOf<HTMLHeadingElement>;
|
|
1319
|
+
/**
|
|
1320
|
+
* A heading for a sub-sub-sub-subsection.
|
|
1321
|
+
*
|
|
1322
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1323
|
+
*/
|
|
1324
|
+
h5: PropertiesOf<HTMLHeadingElement>;
|
|
1325
|
+
/**
|
|
1326
|
+
* A heading for a sub-sub-sub-subsection.
|
|
1327
|
+
*
|
|
1328
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
|
|
1329
|
+
*/
|
|
1330
|
+
h6: PropertiesOf<HTMLHeadingElement>;
|
|
1331
|
+
/**
|
|
1332
|
+
* The `hgroup` element represents a heading and related content. The element may be used to group an
|
|
1333
|
+
* `h1`–`h6` element with one or more `p` elements containing content representing a subheading,
|
|
1334
|
+
* alternative title, or tagline.
|
|
1335
|
+
*
|
|
1336
|
+
* @example
|
|
1337
|
+
* ```html
|
|
1338
|
+
* <hgroup>
|
|
1339
|
+
* <h1>Dr. Strangelove</h1>
|
|
1340
|
+
* <p>Or: How I Learned to Stop Worrying and Love the Bomb</p>
|
|
1341
|
+
* </hgroup>
|
|
1342
|
+
* ```
|
|
1343
|
+
*
|
|
1344
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element
|
|
1345
|
+
*/
|
|
1346
|
+
hgroup: PropertiesOf<HTMLElement>;
|
|
1347
|
+
/**
|
|
1348
|
+
* The `header` element represents a group of introductory or navigational aids.
|
|
1349
|
+
*
|
|
1350
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-header-element
|
|
1351
|
+
*/
|
|
1352
|
+
header: PropertiesOf<HTMLElement>;
|
|
1353
|
+
/**
|
|
1354
|
+
* The `footer` element represents a footer for its nearest ancestor `article`, `aside`, `nav`, or `section`,
|
|
1355
|
+
* or for the `body` element if there is no such ancestor. A footer typically contains information about
|
|
1356
|
+
* its section such as who wrote it, links to related documents, copyright data, and the like.
|
|
1357
|
+
*
|
|
1358
|
+
* When the `footer` element contains entire sections, they represent appendices, indices, long colophons,
|
|
1359
|
+
* verbose license agreements, and other such content.
|
|
1360
|
+
*
|
|
1361
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-footer-element
|
|
1362
|
+
*/
|
|
1363
|
+
footer: PropertiesOf<HTMLElement>;
|
|
1364
|
+
/**
|
|
1365
|
+
* The `address` element represents the contact information for its nearest `article` or `body` element ancestor.
|
|
1366
|
+
* If that is the `body` element, then the contact information applies to the document as a whole.
|
|
1367
|
+
*
|
|
1368
|
+
* @see https://html.spec.whatwg.org/multipage/sections.html#the-address-element
|
|
1369
|
+
*/
|
|
1370
|
+
address: PropertiesOf<HTMLElement>;
|
|
1371
|
+
}
|
|
1372
|
+
export interface IntrinsicElements {
|
|
1373
|
+
/**
|
|
1374
|
+
* The `p` element represents a paragraph.
|
|
1375
|
+
*
|
|
1376
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element
|
|
1377
|
+
*/
|
|
1378
|
+
p: PropertiesOf<HTMLParagraphElement>;
|
|
1379
|
+
/**
|
|
1380
|
+
* The `hr` element represents a paragraph-level thematic break, e.g. a scene change in a story,
|
|
1381
|
+
* or a transition to another topic within a section of a reference book.
|
|
1382
|
+
*
|
|
1383
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element
|
|
1384
|
+
*/
|
|
1385
|
+
hr: PropertiesOf<HTMLHRElement>;
|
|
1386
|
+
/**
|
|
1387
|
+
* The `pre` element represents a block of preformatted text, in which structure is represented
|
|
1388
|
+
* by typographic conventions rather than by elements.
|
|
1389
|
+
*
|
|
1390
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element
|
|
1391
|
+
*/
|
|
1392
|
+
pre: PropertiesOf<HTMLPreElement>;
|
|
1393
|
+
/**
|
|
1394
|
+
* The `blockquote` element represents a section that is quoted from another source.
|
|
1395
|
+
*
|
|
1396
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element
|
|
1397
|
+
*/
|
|
1398
|
+
blockquote: HTMLQuoteElementProps;
|
|
1399
|
+
/**
|
|
1400
|
+
* The `ol` element represents a list of items, where the items have been intentionally ordered,
|
|
1401
|
+
* such that changing the order would change the meaning of the document.
|
|
1402
|
+
*
|
|
1403
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element
|
|
1404
|
+
*/
|
|
1405
|
+
ol: HTMLOListElementProps;
|
|
1406
|
+
/**
|
|
1407
|
+
* The `ul` element represents a list of items, where the order of the items is not important —
|
|
1408
|
+
* that is, where changing the order would not materially change the meaning of the document.
|
|
1409
|
+
*
|
|
1410
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element
|
|
1411
|
+
*/
|
|
1412
|
+
ul: PropertiesOf<HTMLUListElement>;
|
|
1413
|
+
/**
|
|
1414
|
+
* The `menu` element represents a toolbar consisting of its contents, in the form of
|
|
1415
|
+
* an unordered list of items (represented by `li` elements), each of which represents
|
|
1416
|
+
* a command that the user can perform or activate.
|
|
1417
|
+
*
|
|
1418
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element
|
|
1419
|
+
*/
|
|
1420
|
+
menu: PropertiesOf<HTMLMenuElement>;
|
|
1421
|
+
/**
|
|
1422
|
+
* The `li` element represents a list item. If its parent element is an `ol`, `ul`, or `menu` element,
|
|
1423
|
+
* then the element is an item of the parent element's list.
|
|
1424
|
+
*
|
|
1425
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element
|
|
1426
|
+
*/
|
|
1427
|
+
li: PropertiesOf<HTMLLIElement>;
|
|
1428
|
+
/**
|
|
1429
|
+
* The `dl` element represents an association list consisting of zero or more name-value groups
|
|
1430
|
+
* (a description list). Name-value groups may be terms and definitions, metadata topics and values,
|
|
1431
|
+
* questions and answers, or any other groups of name-value data.
|
|
1432
|
+
*
|
|
1433
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
|
|
1434
|
+
*/
|
|
1435
|
+
dl: PropertiesOf<HTMLDListElement>;
|
|
1436
|
+
/**
|
|
1437
|
+
* The `dt` element represents the term, or name, part of a term-description group in a description list (`dl` element).
|
|
1438
|
+
*
|
|
1439
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-dt-element
|
|
1440
|
+
*/
|
|
1441
|
+
dt: PropertiesOf<HTMLElement>;
|
|
1442
|
+
/**
|
|
1443
|
+
* The `dd` element represents the description, definition, or value, part of a term-description group in a description list (`dl` element).
|
|
1444
|
+
*
|
|
1445
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element
|
|
1446
|
+
*/
|
|
1447
|
+
dd: PropertiesOf<HTMLElement>;
|
|
1448
|
+
/**
|
|
1449
|
+
* The `figure` element represents some [flow content](https://html.spec.whatwg.org/multipage/dom.html#flow-content-2),
|
|
1450
|
+
* optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as
|
|
1451
|
+
* a single unit from the main flow of the document.
|
|
1452
|
+
*
|
|
1453
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element
|
|
1454
|
+
*/
|
|
1455
|
+
figure: PropertiesOf<HTMLElement>;
|
|
1456
|
+
/**
|
|
1457
|
+
* The `figcaption` element represents a caption or legend for the rest of the contents of the
|
|
1458
|
+
* `figcaption` element's parent `figure` element, if any.
|
|
1459
|
+
*
|
|
1460
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-figcaption-element
|
|
1461
|
+
*/
|
|
1462
|
+
figcaption: PropertiesOf<HTMLElement>;
|
|
1463
|
+
/**
|
|
1464
|
+
* The `main` element represents the dominant contents of the document. A document must not
|
|
1465
|
+
* have more than one `main` element that does not have the `hidden` attribute specified.
|
|
1466
|
+
*
|
|
1467
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element
|
|
1468
|
+
*/
|
|
1469
|
+
main: PropertiesOf<HTMLElement>;
|
|
1470
|
+
/**
|
|
1471
|
+
* The `div` element has no special meaning at all. It represents its children.
|
|
1472
|
+
*
|
|
1473
|
+
* Authors are strongly encouraged to window the `div` element as an element of last resort,
|
|
1474
|
+
* for when no other element is suitable. Use of more appropriate elements instead of the `div`
|
|
1475
|
+
* element leads to better accessibility for readers and easier maintainability for authors.
|
|
1476
|
+
*
|
|
1477
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#the-div-element
|
|
1478
|
+
*/
|
|
1479
|
+
div: PropertiesOf<HTMLDivElement>;
|
|
1480
|
+
}
|
|
1481
|
+
interface HTMLQuoteElementProps extends PropertiesOf<HTMLQuoteElement> {
|
|
1482
|
+
/**
|
|
1483
|
+
* Link to the source of the quotation. Must be a valid URL potentially surrounded by spaces.
|
|
1484
|
+
*
|
|
1485
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#attr-blockquote-cite
|
|
1486
|
+
*/
|
|
1487
|
+
cite?: OptionalProperty<string>;
|
|
1488
|
+
}
|
|
1489
|
+
interface HTMLOListElementProps extends PropertiesOf<HTMLOListElement> {
|
|
1490
|
+
/**
|
|
1491
|
+
* Indicates that the list is a descending list (..., 3, 2, 1).
|
|
1492
|
+
* If the attribute is omitted, the list is an ascending list (1, 2, 3, ...).
|
|
1493
|
+
*
|
|
1494
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-reversed
|
|
1495
|
+
*/
|
|
1496
|
+
reversed?: OptionalProperty<boolean>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Starting value of the list.
|
|
1499
|
+
*
|
|
1500
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-start
|
|
1501
|
+
*/
|
|
1502
|
+
start?: OptionalProperty<number>;
|
|
1503
|
+
/**
|
|
1504
|
+
* The `type` attribute can be used to specify the kind of marker to use in the list,
|
|
1505
|
+
* in the cases where that matters (e.g. because items are to be referenced by their number/letter).
|
|
1506
|
+
*
|
|
1507
|
+
* @see https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-type
|
|
1508
|
+
*/
|
|
1509
|
+
type?: OptionalProperty<"l" | "a" | "A" | "i" | "I">;
|
|
1510
|
+
}
|
|
1511
|
+
export interface IntrinsicElements {
|
|
1512
|
+
/**
|
|
1513
|
+
* Creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.
|
|
1514
|
+
*
|
|
1515
|
+
* Content within each `<a>` should indicate the link's destination.
|
|
1516
|
+
* If the `href` attribute is present, pressing the enter key while focused on the `<a>` element will activate it.
|
|
1517
|
+
*
|
|
1518
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
|
|
1519
|
+
*/
|
|
1520
|
+
a: HTMLAnchorElementProps;
|
|
1521
|
+
/**
|
|
1522
|
+
* Marks text that has stress emphasis. The `<em>` element can be nested, each level of nesting indicating a greater degree of emphasis.
|
|
1523
|
+
*
|
|
1524
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em
|
|
1525
|
+
*/
|
|
1526
|
+
em: PropertiesOf<HTMLElement>;
|
|
1527
|
+
/**
|
|
1528
|
+
* Indicates that its contents have strong importance, seriousness, or urgency. Browsers typically render the contents in bold type.
|
|
1529
|
+
*
|
|
1530
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong
|
|
1531
|
+
*/
|
|
1532
|
+
strong: PropertiesOf<HTMLElement>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Represents side-comments and small print, like copyright and legal text.
|
|
1535
|
+
* Renders text within it one font-size smaller, such as from `small` to `x-small`.
|
|
1536
|
+
*
|
|
1537
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small
|
|
1538
|
+
*/
|
|
1539
|
+
small: PropertiesOf<HTMLElement>;
|
|
1540
|
+
/**
|
|
1541
|
+
* Renders text with a strikethrough, or a line through it. Use the `<s>` element to represent things that are no longer relevant or no longer accurate.
|
|
1542
|
+
* However, `<s>` is not appropriate when indicating document edits; for that, use the `<del>` and `<ins>` elements.
|
|
1543
|
+
*
|
|
1544
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s
|
|
1545
|
+
*/
|
|
1546
|
+
s: PropertiesOf<HTMLElement>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Used to describe a reference to a cited creative work, and must include the title of that work.
|
|
1549
|
+
*
|
|
1550
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite
|
|
1551
|
+
*/
|
|
1552
|
+
cite: PropertiesOf<HTMLElement>;
|
|
1553
|
+
/**
|
|
1554
|
+
* indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks.
|
|
1555
|
+
* For long quotations with paragraph breaks use the `<blockquote>` element.
|
|
1556
|
+
*
|
|
1557
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
|
|
1558
|
+
*/
|
|
1559
|
+
q: PropertiesOf<HTMLElement>;
|
|
1560
|
+
/**
|
|
1561
|
+
* Used to indicate the term being defined within the context of a definition phrase or sentence.
|
|
1562
|
+
* The `<p>` element, the `<dt>`/`<dd>` pairing, or the `<section>` element which is the nearest ancestor of the `<dfn>` is considered to be the definition of the term.
|
|
1563
|
+
*
|
|
1564
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn
|
|
1565
|
+
*/
|
|
1566
|
+
dfn: PropertiesOf<HTMLElement>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Indicates an abbreviation or acronym. Provide a full expansion of the term in plain text on first use, along with the `<abbr>` to mark up the abbreviation.
|
|
1569
|
+
* This informs the user what the abbreviation or acronym means.
|
|
1570
|
+
*
|
|
1571
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr
|
|
1572
|
+
*/
|
|
1573
|
+
abbr: HTMLAbbrElementProps;
|
|
1574
|
+
/**
|
|
1575
|
+
* Represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters.
|
|
1576
|
+
*
|
|
1577
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby
|
|
1578
|
+
*/
|
|
1579
|
+
ruby: PropertiesOf<HTMLElement>;
|
|
1580
|
+
/**
|
|
1581
|
+
* Specifies the ruby text component of a ruby annotation, which is used to provide pronunciation, translation,
|
|
1582
|
+
* or transliteration information for East Asian typography. The `<rt>` element must always be contained within a `<ruby>` element.
|
|
1583
|
+
*
|
|
1584
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt
|
|
1585
|
+
*/
|
|
1586
|
+
rt: PropertiesOf<HTMLElement>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Provide a fall-back parentheses for browsers that do not support display of ruby annotations using the `<ruby>` element.
|
|
1589
|
+
* One `<rp>` element should contain the `<rt>` element that contains the annotation's text.
|
|
1590
|
+
*
|
|
1591
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp
|
|
1592
|
+
*/
|
|
1593
|
+
rp: PropertiesOf<HTMLElement>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Wraps a piece of content, providing an additional machine-readable version in a `value` attribute.
|
|
1596
|
+
* For date or time related data, a `<time>` element is preferred.
|
|
1597
|
+
*
|
|
1598
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data
|
|
1599
|
+
*/
|
|
1600
|
+
data: HTMLDataElementProps;
|
|
1601
|
+
/**
|
|
1602
|
+
* Represents a specific period in time. It may include the `datetime` attribute to translate dates into machine-readable format,
|
|
1603
|
+
* allowing for better search engine results or custom features such as reminders.
|
|
1604
|
+
*
|
|
1605
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
|
|
1606
|
+
*/
|
|
1607
|
+
time: HTMLTimeElementProps;
|
|
1608
|
+
/**
|
|
1609
|
+
* Displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.
|
|
1610
|
+
* By default, the content text is displayed using a monospace font.
|
|
1611
|
+
*
|
|
1612
|
+
* You can display larger, multi-line `<code>` snippets by wrapping them with `<pre>` tags to keep the original line breaks.
|
|
1613
|
+
*
|
|
1614
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code
|
|
1615
|
+
*/
|
|
1616
|
+
code: PropertiesOf<HTMLElement>;
|
|
1617
|
+
/**
|
|
1618
|
+
* Represents the name of a variable in a mathematical expression or a programming context.
|
|
1619
|
+
* Represented in italics by default in most browsers.
|
|
1620
|
+
*
|
|
1621
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var
|
|
1622
|
+
*/
|
|
1623
|
+
var: PropertiesOf<HTMLElement>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Represents `<samp>`le output from a computer program. Displayed with a monospace font by default.
|
|
1626
|
+
*
|
|
1627
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp
|
|
1628
|
+
*/
|
|
1629
|
+
samp: PropertiesOf<HTMLElement>;
|
|
1630
|
+
/**
|
|
1631
|
+
* Represents text a user would input with keyboard, voice, or another text entry device.
|
|
1632
|
+
*
|
|
1633
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
|
|
1634
|
+
*/
|
|
1635
|
+
kbd: PropertiesOf<HTMLElement>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Represents a superscript (like the 2 in E=mc2).
|
|
1638
|
+
*
|
|
1639
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup
|
|
1640
|
+
*/
|
|
1641
|
+
sup: PropertiesOf<HTMLElement>;
|
|
1642
|
+
/**
|
|
1643
|
+
* Represents a subscript (like the 2 in H2O).
|
|
1644
|
+
*
|
|
1645
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub
|
|
1646
|
+
*/
|
|
1647
|
+
sub: PropertiesOf<HTMLElement>;
|
|
1648
|
+
/**
|
|
1649
|
+
* The _idiomatic text_ element.
|
|
1650
|
+
*
|
|
1651
|
+
* Represents a range of text that is set off from the normal text for some reason, such as idiomatic text,
|
|
1652
|
+
* technical terms, taxonomical designations, among others. Historically, these have been presented using italicized type,
|
|
1653
|
+
* which is the original source of the `<i>` naming of this element.
|
|
1654
|
+
*
|
|
1655
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i
|
|
1656
|
+
*/
|
|
1657
|
+
i: PropertiesOf<HTMLElement>;
|
|
1658
|
+
/**
|
|
1659
|
+
* The _Bring Attention To_ element.
|
|
1660
|
+
*
|
|
1661
|
+
* Draws the reader's attention to the element's contents, which are not otherwise granted special importance.
|
|
1662
|
+
* This was formerly known as the Boldface element, and most browsers still draw the text in boldface.
|
|
1663
|
+
*
|
|
1664
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
|
|
1665
|
+
*/
|
|
1666
|
+
b: PropertiesOf<HTMLElement>;
|
|
1667
|
+
/**
|
|
1668
|
+
* The _Unarticulated Annotation_ (Underline) element.
|
|
1669
|
+
*
|
|
1670
|
+
* Represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation.
|
|
1671
|
+
* This is rendered by default as a simple solid underline.
|
|
1672
|
+
*
|
|
1673
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u
|
|
1674
|
+
*/
|
|
1675
|
+
u: PropertiesOf<HTMLElement>;
|
|
1676
|
+
/**
|
|
1677
|
+
* The _Mark Text_ element.
|
|
1678
|
+
*
|
|
1679
|
+
* Represents text which is marked or highlighted for reference or notation purposes,
|
|
1680
|
+
* due to the marked passage's relevance or importance in the enclosing context.
|
|
1681
|
+
*
|
|
1682
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark
|
|
1683
|
+
*/
|
|
1684
|
+
mark: PropertiesOf<HTMLElement>;
|
|
1685
|
+
/**
|
|
1686
|
+
* The _Bidirectional Isolate__ element.
|
|
1687
|
+
*
|
|
1688
|
+
* Tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.
|
|
1689
|
+
* It's particularly useful when a website dynamically inserts some text and doesn't know the directionality of the text being inserted.
|
|
1690
|
+
*
|
|
1691
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi
|
|
1692
|
+
*/
|
|
1693
|
+
bdi: PropertiesOf<HTMLElement>;
|
|
1694
|
+
/**
|
|
1695
|
+
* The _Bidirectional Text Override_ element.
|
|
1696
|
+
*
|
|
1697
|
+
* Overrides the current directionality of text, so that the text within is rendered in a different direction.
|
|
1698
|
+
*
|
|
1699
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo
|
|
1700
|
+
*/
|
|
1701
|
+
bdo: PropertiesOf<HTMLElement>;
|
|
1702
|
+
/**
|
|
1703
|
+
* The _Content Span_ element.
|
|
1704
|
+
*
|
|
1705
|
+
* A generic inline container for phrasing content, which does not inherently represent anything.
|
|
1706
|
+
* It can be used to group elements for styling purposes (using the `class` or `id` attributes),
|
|
1707
|
+
* or because they share attribute values, such as `lang`. It should be used only when no other semantic element
|
|
1708
|
+
* is appropriate. `<span>` is very much like a `<div>` element, but `<div>` is a block-level element
|
|
1709
|
+
* whereas `<span>` is an inline element.
|
|
1710
|
+
*
|
|
1711
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span
|
|
1712
|
+
*/
|
|
1713
|
+
span: PropertiesOf<HTMLSpanElement>;
|
|
1714
|
+
/**
|
|
1715
|
+
* The _Line Break_ element.
|
|
1716
|
+
*
|
|
1717
|
+
* Produces a line break (carriage-return) in text. HTML does not preserve line breaks outside a `<pre>` or element
|
|
1718
|
+
* with similar CSS, but they can be explicitly represented with a `<br>` element.
|
|
1719
|
+
*
|
|
1720
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br
|
|
1721
|
+
*/
|
|
1722
|
+
br: PropertiesOf<HTMLBRElement>;
|
|
1723
|
+
/**
|
|
1724
|
+
* The _Line Break Opportunity_ element.
|
|
1725
|
+
*
|
|
1726
|
+
* Represents a word break opportunity—a position within text where the browser may optionally break a line,
|
|
1727
|
+
* though its line-breaking rules would not otherwise create a break at that location.
|
|
1728
|
+
*
|
|
1729
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
|
|
1730
|
+
*/
|
|
1731
|
+
wbr: PropertiesOf<HTMLElement>;
|
|
1732
|
+
}
|
|
1733
|
+
interface HTMLAnchorElementProps extends PropertiesOf<HTMLAnchorElement> {
|
|
1734
|
+
/**
|
|
1735
|
+
* A hyperlink address. Must be a valid URL potentially surrounded by spaces.
|
|
1736
|
+
*
|
|
1737
|
+
* @see https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element
|
|
1738
|
+
*/
|
|
1739
|
+
href?: OptionalProperty<string>;
|
|
1740
|
+
/**
|
|
1741
|
+
* Where to display the linked URL, as the name for a browsing context (a tab, window, or `<iframe>`)
|
|
1742
|
+
*
|
|
1743
|
+
* A common usage is `target: "_blank"` to cause a link to open in a new tab.
|
|
1744
|
+
*
|
|
1745
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target
|
|
1746
|
+
*/
|
|
1747
|
+
target?: OptionalProperty<"_self" | "_blank" | "parent" | "_top">;
|
|
1748
|
+
/**
|
|
1749
|
+
* Causes the browser to treat the linked URL as a download. Can be used with or without a value.
|
|
1750
|
+
*
|
|
1751
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download
|
|
1752
|
+
*/
|
|
1753
|
+
download?: OptionalProperty<string>;
|
|
1754
|
+
/**
|
|
1755
|
+
* A space-separated list of URLs. When the link is followed, the browser will send `POST` requests with the body PING to the URLs.
|
|
1756
|
+
* Typically for tracking.
|
|
1757
|
+
*
|
|
1758
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-ping
|
|
1759
|
+
*/
|
|
1760
|
+
ping?: OptionalProperty<string>;
|
|
1761
|
+
/**
|
|
1762
|
+
* The relationship of the linked URL as space-separated [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
|
|
1763
|
+
*
|
|
1764
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang
|
|
1765
|
+
*/
|
|
1766
|
+
rel?: OptionalProperty<string>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Hints at the human language of the linked URL. No built-in functionality.
|
|
1769
|
+
*
|
|
1770
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang
|
|
1771
|
+
*/
|
|
1772
|
+
hrefLang?: OptionalProperty<string>;
|
|
1773
|
+
/**
|
|
1774
|
+
* Hints at the linked URL's format with a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type). No built-in functionality.
|
|
1775
|
+
*
|
|
1776
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-type
|
|
1777
|
+
*/
|
|
1778
|
+
type?: OptionalProperty<string>;
|
|
1779
|
+
/**
|
|
1780
|
+
* How much of the [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer)
|
|
1781
|
+
* to send when following the link.
|
|
1782
|
+
*
|
|
1783
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy
|
|
1784
|
+
*/
|
|
1785
|
+
referrerPolicy?: OptionalProperty<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
1786
|
+
}
|
|
1787
|
+
interface HTMLAbbrElementProps extends PropertiesOf<HTMLElement> {
|
|
1788
|
+
/**
|
|
1789
|
+
* Provides an expansion for the abbreviation or acronym when a full expansion is not present.
|
|
1790
|
+
* This provides a hint to user agents on how to announce/display the content while informing all users what the abbreviation means.
|
|
1791
|
+
* If present, `title` must contain this full description and nothing else.
|
|
1792
|
+
*
|
|
1793
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr
|
|
1794
|
+
*/
|
|
1795
|
+
title?: OptionalProperty<string>;
|
|
1796
|
+
}
|
|
1797
|
+
interface HTMLDataElementProps extends PropertiesOf<HTMLDataElement> {
|
|
1798
|
+
/**
|
|
1799
|
+
* Specifies the machine-readable translation of the content of the element.
|
|
1800
|
+
*
|
|
1801
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data
|
|
1802
|
+
*/
|
|
1803
|
+
value?: OptionalProperty<string>;
|
|
1804
|
+
}
|
|
1805
|
+
interface HTMLTimeElementProps extends PropertiesOf<HTMLTimeElement> {
|
|
1806
|
+
/**
|
|
1807
|
+
* Indicates the time and/or date of the element. Must be in one of the formats below:
|
|
1808
|
+
*
|
|
1809
|
+
*
|
|
1810
|
+
* a valid year string
|
|
1811
|
+
* ```
|
|
1812
|
+
* 2011
|
|
1813
|
+
* ```
|
|
1814
|
+
*
|
|
1815
|
+
* a valid month string
|
|
1816
|
+
* ```
|
|
1817
|
+
* 2011-11
|
|
1818
|
+
* ```
|
|
1819
|
+
*
|
|
1820
|
+
* a valid date string
|
|
1821
|
+
* ```
|
|
1822
|
+
* 2011-11-18
|
|
1823
|
+
* ```
|
|
1824
|
+
*
|
|
1825
|
+
* a valid yearless date string
|
|
1826
|
+
* ```
|
|
1827
|
+
* 11-18
|
|
1828
|
+
* ```
|
|
1829
|
+
*
|
|
1830
|
+
* a valid week string
|
|
1831
|
+
* ```
|
|
1832
|
+
* 2011-W47
|
|
1833
|
+
* ```
|
|
1834
|
+
*
|
|
1835
|
+
* a valid time string
|
|
1836
|
+
* ```
|
|
1837
|
+
* 14:54
|
|
1838
|
+
* 14:54:39
|
|
1839
|
+
* 14:54:39.929
|
|
1840
|
+
* ```
|
|
1841
|
+
*
|
|
1842
|
+
* a valid local date and time string
|
|
1843
|
+
* ```
|
|
1844
|
+
* 2011-11-18T14:54:39.929
|
|
1845
|
+
* 2011-11-18 14:54:39.929
|
|
1846
|
+
* ```
|
|
1847
|
+
*
|
|
1848
|
+
* a valid global date and time string
|
|
1849
|
+
* ```
|
|
1850
|
+
* 2011-11-18T14:54:39.929Z
|
|
1851
|
+
* 2011-11-18T14:54:39.929-0400
|
|
1852
|
+
* 2011-11-18T14:54:39.929-04:00
|
|
1853
|
+
* 2011-11-18 14:54:39.929Z
|
|
1854
|
+
* 2011-11-18 14:54:39.929-0400
|
|
1855
|
+
* 2011-11-18 14:54:39.929-04:00
|
|
1856
|
+
* ```
|
|
1857
|
+
*
|
|
1858
|
+
* a valid duration string
|
|
1859
|
+
* ```
|
|
1860
|
+
* PT4H18M3S
|
|
1861
|
+
* ```
|
|
1862
|
+
*
|
|
1863
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
|
|
1864
|
+
*/
|
|
1865
|
+
datetime?: OptionalProperty<string>;
|
|
1866
|
+
}
|
|
1867
|
+
export interface IntrinsicElements {
|
|
1868
|
+
/**
|
|
1869
|
+
* The _Inserted Text_ element.
|
|
1870
|
+
*
|
|
1871
|
+
* Represents a range of text that has been added to a document. You can use the `<del>` element to similarly
|
|
1872
|
+
* represent a range of text that has been deleted from the document.
|
|
1873
|
+
*
|
|
1874
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
|
|
1875
|
+
*/
|
|
1876
|
+
ins: ModElementProps;
|
|
1877
|
+
/**
|
|
1878
|
+
* The _Deleted Text_ element.
|
|
1879
|
+
*
|
|
1880
|
+
* Represents a range of text that has been deleted from a document. This can be used when blueprints "track changes"
|
|
1881
|
+
* or source code diff information, for example. The `<ins>` element can be used for the opposite purpose: to indicate
|
|
1882
|
+
* text that has been added to the document.
|
|
1883
|
+
*
|
|
1884
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
|
|
1885
|
+
*/
|
|
1886
|
+
del: ModElementProps;
|
|
1887
|
+
}
|
|
1888
|
+
interface ModElementProps extends PropertiesOf<HTMLModElement> {
|
|
1889
|
+
/**
|
|
1890
|
+
* A URL pointing to content that explains this change.
|
|
1891
|
+
* User agents may allow users to follow such citation links, but they are primarily intended for private use
|
|
1892
|
+
* (e.g., by server-side scripts collecting statistics about a site's edits), not for readers.
|
|
1893
|
+
*/
|
|
1894
|
+
cite?: OptionalProperty<string>;
|
|
1895
|
+
/**
|
|
1896
|
+
* Indicates the time and/or date of the element. Must be in one of the formats below:
|
|
1897
|
+
*
|
|
1898
|
+
*
|
|
1899
|
+
* a valid year string
|
|
1900
|
+
* ```
|
|
1901
|
+
* 2011
|
|
1902
|
+
* ```
|
|
1903
|
+
*
|
|
1904
|
+
* a valid month string
|
|
1905
|
+
* ```
|
|
1906
|
+
* 2011-11
|
|
1907
|
+
* ```
|
|
1908
|
+
*
|
|
1909
|
+
* a valid date string
|
|
1910
|
+
* ```
|
|
1911
|
+
* 2011-11-18
|
|
1912
|
+
* ```
|
|
1913
|
+
*
|
|
1914
|
+
* a valid yearless date string
|
|
1915
|
+
* ```
|
|
1916
|
+
* 11-18
|
|
1917
|
+
* ```
|
|
1918
|
+
*
|
|
1919
|
+
* a valid week string
|
|
1920
|
+
* ```
|
|
1921
|
+
* 2011-W47
|
|
1922
|
+
* ```
|
|
1923
|
+
*
|
|
1924
|
+
* a valid time string
|
|
1925
|
+
* ```
|
|
1926
|
+
* 14:54
|
|
1927
|
+
* 14:54:39
|
|
1928
|
+
* 14:54:39.929
|
|
1929
|
+
* ```
|
|
1930
|
+
*
|
|
1931
|
+
* a valid local date and time string
|
|
1932
|
+
* ```
|
|
1933
|
+
* 2011-11-18T14:54:39.929
|
|
1934
|
+
* 2011-11-18 14:54:39.929
|
|
1935
|
+
* ```
|
|
1936
|
+
*
|
|
1937
|
+
* a valid global date and time string
|
|
1938
|
+
* ```
|
|
1939
|
+
* 2011-11-18T14:54:39.929Z
|
|
1940
|
+
* 2011-11-18T14:54:39.929-0400
|
|
1941
|
+
* 2011-11-18T14:54:39.929-04:00
|
|
1942
|
+
* 2011-11-18 14:54:39.929Z
|
|
1943
|
+
* 2011-11-18 14:54:39.929-0400
|
|
1944
|
+
* 2011-11-18 14:54:39.929-04:00
|
|
1945
|
+
* ```
|
|
1946
|
+
*
|
|
1947
|
+
* a valid duration string
|
|
1948
|
+
* ```
|
|
1949
|
+
* PT4H18M3S
|
|
1950
|
+
* ```
|
|
1951
|
+
*
|
|
1952
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
|
|
1953
|
+
*/
|
|
1954
|
+
datetime?: OptionalProperty<string>;
|
|
1955
|
+
}
|
|
1956
|
+
export interface IntrinsicElements {
|
|
1957
|
+
/**
|
|
1958
|
+
* The _Picture_ element.
|
|
1959
|
+
*
|
|
1960
|
+
* Contains zero or more `<source>` elements and one `<img>` element to offer alternative versions of an image
|
|
1961
|
+
* for different display/device scenarios.
|
|
1962
|
+
*
|
|
1963
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
|
|
1964
|
+
*/
|
|
1965
|
+
picture: PropertiesOf<HTMLPictureElement>;
|
|
1966
|
+
/**
|
|
1967
|
+
* The _Media or Image Source_ element.
|
|
1968
|
+
*
|
|
1969
|
+
* Specifies multiple media resources for a `<picture>`, `<audio>` or `<video>` element. Commonly used to offer
|
|
1970
|
+
* the same media content in multiple file formats in order to provide compatibility with a broad range of browsers.
|
|
1971
|
+
*
|
|
1972
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source
|
|
1973
|
+
*/
|
|
1974
|
+
source: HTMLSourceElementProps;
|
|
1975
|
+
/**
|
|
1976
|
+
* The _Image Embed_ element.
|
|
1977
|
+
*
|
|
1978
|
+
* Embeds an image into the document.
|
|
1979
|
+
*
|
|
1980
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
|
|
1981
|
+
*/
|
|
1982
|
+
img: HTMLImageElementProps;
|
|
1983
|
+
/**
|
|
1984
|
+
* The _Inline Frame_ element.
|
|
1985
|
+
*
|
|
1986
|
+
* Represents a nested [browsing context](https://developer.mozilla.org/en-US/docs/Glossary/Browsing_context),
|
|
1987
|
+
* embedding another HTML page into the current one.
|
|
1988
|
+
*
|
|
1989
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
1990
|
+
*/
|
|
1991
|
+
iframe: HTMLIFrameElementProps;
|
|
1992
|
+
/**
|
|
1993
|
+
* The _Embed External Content_ element.
|
|
1994
|
+
*
|
|
1995
|
+
* Embeds external content at the specified point in the document. This content is provided by an external
|
|
1996
|
+
* application or other source of interactive content such as a browser plug-in.
|
|
1997
|
+
*
|
|
1998
|
+
* Most modern browsers have deprecated and removed support for browser plug-ins, so relying upon `<embed>`
|
|
1999
|
+
* is generally not wise if you want your site to be operable on the average user's browser.
|
|
2000
|
+
*
|
|
2001
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed
|
|
2002
|
+
*/
|
|
2003
|
+
embed: HTMLEmbedElementProps;
|
|
2004
|
+
/**
|
|
2005
|
+
* The _External Object_ element.
|
|
2006
|
+
*
|
|
2007
|
+
* Represents an external resource, which can be treated as an image, a nested browsing context,
|
|
2008
|
+
* or a resource to be handled by a plugin.
|
|
2009
|
+
*
|
|
2010
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
|
|
2011
|
+
*/
|
|
2012
|
+
object: HTMLObjectElementProps;
|
|
2013
|
+
/**
|
|
2014
|
+
* The _Video Embed_ element.
|
|
2015
|
+
*
|
|
2016
|
+
* Embeds a video player. You can use `<video>` for audio content as well,
|
|
2017
|
+
* but the `<audio>` element may provide a more appropriate user experience.
|
|
2018
|
+
*
|
|
2019
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
|
|
2020
|
+
*/
|
|
2021
|
+
video: HTMLVideoElementProps;
|
|
2022
|
+
/**
|
|
2023
|
+
* The _Embed Audio_ element.
|
|
2024
|
+
*
|
|
2025
|
+
* Embeds an audio player. It may contain one or more audio sources, represented using the `src` attribute or the
|
|
2026
|
+
* `<source>` element: the browser will choose the most suitable one.
|
|
2027
|
+
*
|
|
2028
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
|
|
2029
|
+
*/
|
|
2030
|
+
audio: HTMLMediaElementProps<HTMLAudioElement>;
|
|
2031
|
+
/**
|
|
2032
|
+
* The _Embed Text Track_ element.
|
|
2033
|
+
*
|
|
2034
|
+
* Provides subtitles or other time-based data to a parent `<video>` or `<audio>` element.
|
|
2035
|
+
*
|
|
2036
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track
|
|
2037
|
+
*/
|
|
2038
|
+
track: HTMLTrackElementProps;
|
|
2039
|
+
/**
|
|
2040
|
+
* The _Image Map_ element.
|
|
2041
|
+
*
|
|
2042
|
+
* Used with `<area>` elements to define an image map. An image map allows geometric areas on an image to be
|
|
2043
|
+
* associated with links.
|
|
2044
|
+
*
|
|
2045
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map
|
|
2046
|
+
*/
|
|
2047
|
+
map: HTMLMapElementProps;
|
|
2048
|
+
/**
|
|
2049
|
+
* The _Image Map Area_ element.
|
|
2050
|
+
*
|
|
2051
|
+
* Defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas
|
|
2052
|
+
* on an image to be associated with links.
|
|
2053
|
+
*
|
|
2054
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area
|
|
2055
|
+
*/
|
|
2056
|
+
area: HTMLAreaElementProps;
|
|
2057
|
+
}
|
|
2058
|
+
interface HTMLMediaElementProps<T extends HTMLMediaElement> extends HTMLElementProps, PropertiesOf<T> {
|
|
2059
|
+
/**
|
|
2060
|
+
* Play the media automatically when it loads.
|
|
2061
|
+
*
|
|
2062
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay
|
|
2063
|
+
*/
|
|
2064
|
+
autoplay?: OptionalProperty<boolean>;
|
|
2065
|
+
/**
|
|
2066
|
+
* Display playback controls.
|
|
2067
|
+
*
|
|
2068
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls
|
|
2069
|
+
*/
|
|
2070
|
+
controls?: OptionalProperty<boolean>;
|
|
2071
|
+
/**
|
|
2072
|
+
* Indicates whether to use CORS to fetch the media. If not present the media is fetched without a CORS request.
|
|
2073
|
+
*
|
|
2074
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin
|
|
2075
|
+
*/
|
|
2076
|
+
crossOrigin?: OptionalProperty<"anonymous" | "use-credentials">;
|
|
2077
|
+
/**
|
|
2078
|
+
* Indicates whether the media will start over automatically once the end is reached.
|
|
2079
|
+
*
|
|
2080
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop
|
|
2081
|
+
*/
|
|
2082
|
+
loop?: OptionalProperty<boolean>;
|
|
2083
|
+
/**
|
|
2084
|
+
* Indicates whether the media element will play audio. A value of `true` will prevent audio playback.
|
|
2085
|
+
*
|
|
2086
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted
|
|
2087
|
+
*/
|
|
2088
|
+
muted?: OptionalProperty<boolean>;
|
|
2089
|
+
/**
|
|
2090
|
+
* Indicates whether the media element is paused.
|
|
2091
|
+
*
|
|
2092
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused
|
|
2093
|
+
*/
|
|
2094
|
+
paused?: OptionalProperty<boolean>;
|
|
2095
|
+
/**
|
|
2096
|
+
* Controls the rate at which the media is played back. 1.0 is normal speed, 0.5 is half speed and 2.0 is double speed, though any value is allowed.
|
|
2097
|
+
*
|
|
2098
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate
|
|
2099
|
+
*/
|
|
2100
|
+
playbackRate?: OptionalProperty<number>;
|
|
2101
|
+
/**
|
|
2102
|
+
* When `true` the pitch is adjusted to compensate for changes in `playbackRate`. Defaults to `true`.
|
|
2103
|
+
*
|
|
2104
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preservesPitch
|
|
2105
|
+
*/
|
|
2106
|
+
preservesPitch?: OptionalProperty<boolean>;
|
|
2107
|
+
/**
|
|
2108
|
+
* Tells the browser what to preload before the user begins playing the media.
|
|
2109
|
+
*
|
|
2110
|
+
* - `none` will preload nothing.
|
|
2111
|
+
* - `metadata` will preload only metadata such as length.
|
|
2112
|
+
* - `auto` or `""` will allow preloading of the entire file before playback begins.
|
|
2113
|
+
*
|
|
2114
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-preload
|
|
2115
|
+
*/
|
|
2116
|
+
preload?: OptionalProperty<"none" | "metadata" | "auto" | "">;
|
|
2117
|
+
/**
|
|
2118
|
+
* The URL of a media resource to use in the element.
|
|
2119
|
+
*
|
|
2120
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src
|
|
2121
|
+
*/
|
|
2122
|
+
src?: OptionalProperty<string>;
|
|
2123
|
+
/**
|
|
2124
|
+
* An object containing a media resource to use in the element.
|
|
2125
|
+
*
|
|
2126
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject
|
|
2127
|
+
*/
|
|
2128
|
+
srcObject?: MediaStream | MediaSource | Blob | File | Readable<MediaStream> | Readable<MediaStream | undefined> | Readable<MediaSource> | Readable<MediaSource | undefined> | Readable<Blob> | Readable<Blob | undefined> | Readable<File> | Readable<File | undefined>;
|
|
2129
|
+
/**
|
|
2130
|
+
* The current audio volume of the media element. Must be a number between 0 and 1.
|
|
2131
|
+
*
|
|
2132
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume
|
|
2133
|
+
*/
|
|
2134
|
+
volume?: OptionalProperty<number>;
|
|
2135
|
+
/**
|
|
2136
|
+
* Fired when the resource was not fully loaded, but not as the result of an error.
|
|
2137
|
+
*
|
|
2138
|
+
* This event is not cancelable and does not bubble.
|
|
2139
|
+
*
|
|
2140
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/abort_event
|
|
2141
|
+
*/
|
|
2142
|
+
onAbort?: OptionalProperty<EventHandler<Event>>;
|
|
2143
|
+
/**
|
|
2144
|
+
* Fired when the user agent can play the media, but estimates that not enough data has been loaded
|
|
2145
|
+
* to play the media up to its end without having to stop for further buffering of content.
|
|
2146
|
+
*
|
|
2147
|
+
* This event is not cancelable and does not bubble.
|
|
2148
|
+
*
|
|
2149
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event
|
|
2150
|
+
*/
|
|
2151
|
+
onCanPlay?: OptionalProperty<EventHandler<Event>>;
|
|
2152
|
+
/**
|
|
2153
|
+
* Fired when the user agent can play the media, and estimates that enough data has been loaded
|
|
2154
|
+
* to play the media up to its end without having to stop for further buffering of content.
|
|
2155
|
+
*
|
|
2156
|
+
* This event is not cancelable and does not bubble.
|
|
2157
|
+
*
|
|
2158
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplaythrough_event
|
|
2159
|
+
*/
|
|
2160
|
+
onCanPlayThrough?: OptionalProperty<EventHandler<Event>>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Fired when the duration attribute has been updated.
|
|
2163
|
+
*
|
|
2164
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/durationchange_event
|
|
2165
|
+
*/
|
|
2166
|
+
onDurationChange?: OptionalProperty<EventHandler<Event>>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Fired when the media has become empty; for example, this event is sent if the media has already been loaded
|
|
2169
|
+
* (or partially loaded), and the `load()` method is called to reload it.
|
|
2170
|
+
*
|
|
2171
|
+
* This event is not cancelable and does not bubble.
|
|
2172
|
+
*
|
|
2173
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/emptied_event
|
|
2174
|
+
*/
|
|
2175
|
+
onEmptied?: OptionalProperty<EventHandler<Event>>;
|
|
2176
|
+
/**
|
|
2177
|
+
* Fired when the media encounters some initialization data indicating it is encrypted.
|
|
2178
|
+
*
|
|
2179
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/encrypted_event
|
|
2180
|
+
*/
|
|
2181
|
+
onEncrypted?: OptionalProperty<EventHandler<MediaEncryptedEvent>>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
|
|
2184
|
+
*
|
|
2185
|
+
* This event is not cancelable and does not bubble.
|
|
2186
|
+
*
|
|
2187
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event
|
|
2188
|
+
*/
|
|
2189
|
+
onEnded?: OptionalProperty<EventHandler<Event>>;
|
|
2190
|
+
/**
|
|
2191
|
+
* Fired when the frame at the current playback position of the media has finished loading.
|
|
2192
|
+
*
|
|
2193
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadeddata_event
|
|
2194
|
+
*/
|
|
2195
|
+
onLoadedData?: OptionalProperty<EventHandler<Event>>;
|
|
2196
|
+
/**
|
|
2197
|
+
* Fired when metadata has been loaded.
|
|
2198
|
+
*
|
|
2199
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
|
|
2200
|
+
*/
|
|
2201
|
+
onLoadedMetadata?: OptionalProperty<EventHandler<Event>>;
|
|
2202
|
+
/**
|
|
2203
|
+
* Fired when the browser has started to load a resource.
|
|
2204
|
+
*
|
|
2205
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadstart_event
|
|
2206
|
+
*/
|
|
2207
|
+
onLoadStart?: OptionalProperty<EventHandler<Event>>;
|
|
2208
|
+
/**
|
|
2209
|
+
* Fired when media is paused.
|
|
2210
|
+
*
|
|
2211
|
+
* This event is not cancelable and does not bubble.
|
|
2212
|
+
*
|
|
2213
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event
|
|
2214
|
+
*/
|
|
2215
|
+
onPause?: OptionalProperty<EventHandler<Event>>;
|
|
2216
|
+
/**
|
|
2217
|
+
* Fired when `paused` changes to false and media playback resumes.
|
|
2218
|
+
*
|
|
2219
|
+
* This event is not cancelable and does not bubble.
|
|
2220
|
+
*
|
|
2221
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event
|
|
2222
|
+
*/
|
|
2223
|
+
onPlay?: OptionalProperty<EventHandler<Event>>;
|
|
2224
|
+
/**
|
|
2225
|
+
* Fired after playback is first started, and whenever it is restarted.
|
|
2226
|
+
* For example, it is fired when playback resumes after having been paused or delayed due to lack of data.
|
|
2227
|
+
*
|
|
2228
|
+
* This event is not cancelable and does not bubble.
|
|
2229
|
+
*
|
|
2230
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event
|
|
2231
|
+
*/
|
|
2232
|
+
onPlaying?: OptionalProperty<EventHandler<Event>>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Fired periodically as the browser loads a resource.
|
|
2235
|
+
*
|
|
2236
|
+
* This event is not cancelable and does not bubble.
|
|
2237
|
+
*
|
|
2238
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/progress_event
|
|
2239
|
+
*/
|
|
2240
|
+
onProgress?: OptionalProperty<EventHandler<Event>>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Fired when the playback rate has changed.
|
|
2243
|
+
*
|
|
2244
|
+
* This event is not cancelable and does not bubble.
|
|
2245
|
+
*
|
|
2246
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event
|
|
2247
|
+
*/
|
|
2248
|
+
onRateChange?: OptionalProperty<EventHandler<Event>>;
|
|
2249
|
+
/**
|
|
2250
|
+
* Fired when a seek operation completed, the current playback position has changed, and the Boolean `seeking` attribute is changed to `false`.
|
|
2251
|
+
*
|
|
2252
|
+
* This event is not cancelable and does not bubble.
|
|
2253
|
+
*
|
|
2254
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeked_event
|
|
2255
|
+
*/
|
|
2256
|
+
onSeeked?: OptionalProperty<EventHandler<Event>>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Fired when a seek operation starts, meaning the Boolean `seeking` attribute has changed to `true` and the media is seeking a new position.
|
|
2259
|
+
*
|
|
2260
|
+
* This event is not cancelable and does not bubble.
|
|
2261
|
+
*
|
|
2262
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event
|
|
2263
|
+
*/
|
|
2264
|
+
onSeeking?: OptionalProperty<EventHandler<Event>>;
|
|
2265
|
+
/**
|
|
2266
|
+
* Fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
|
|
2267
|
+
*
|
|
2268
|
+
* This event is not cancelable and does not bubble.
|
|
2269
|
+
*
|
|
2270
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/stalled_event
|
|
2271
|
+
*/
|
|
2272
|
+
onStalled?: OptionalProperty<EventHandler<Event>>;
|
|
2273
|
+
/**
|
|
2274
|
+
* Fired when media data loading has been suspended.
|
|
2275
|
+
*
|
|
2276
|
+
* This event is not cancelable and does not bubble.
|
|
2277
|
+
*
|
|
2278
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/suspend_event
|
|
2279
|
+
*/
|
|
2280
|
+
onSuspend?: OptionalProperty<EventHandler<Event>>;
|
|
2281
|
+
/**
|
|
2282
|
+
* Fired when the time indicated by the `currentTime` attribute has been updated.
|
|
2283
|
+
*
|
|
2284
|
+
* This event is not cancelable and does not bubble.
|
|
2285
|
+
*
|
|
2286
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event
|
|
2287
|
+
*/
|
|
2288
|
+
onTimeUpdate?: OptionalProperty<EventHandler<Event>>;
|
|
2289
|
+
/**
|
|
2290
|
+
* Fired when the volume has changed.
|
|
2291
|
+
*
|
|
2292
|
+
* This event is not cancelable and does not bubble.
|
|
2293
|
+
*
|
|
2294
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event
|
|
2295
|
+
*/
|
|
2296
|
+
onVolumeChange?: OptionalProperty<EventHandler<Event>>;
|
|
2297
|
+
/**
|
|
2298
|
+
* Fired when playback has stopped because of a temporary lack of data.
|
|
2299
|
+
*
|
|
2300
|
+
* This event is not cancelable and does not bubble.
|
|
2301
|
+
*
|
|
2302
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/waiting_event
|
|
2303
|
+
*/
|
|
2304
|
+
onWaiting?: OptionalProperty<EventHandler<Event>>;
|
|
2305
|
+
/**
|
|
2306
|
+
* Fired when the resource was not fully loaded, but not as the result of an error.
|
|
2307
|
+
*
|
|
2308
|
+
* This event is not cancelable and does not bubble.
|
|
2309
|
+
*
|
|
2310
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/abort_event
|
|
2311
|
+
*/
|
|
2312
|
+
onabort?: OptionalProperty<EventHandler<Event>>;
|
|
2313
|
+
/**
|
|
2314
|
+
* Fired when the user agent can play the media, but estimates that not enough data has been loaded
|
|
2315
|
+
* to play the media up to its end without having to stop for further buffering of content.
|
|
2316
|
+
*
|
|
2317
|
+
* This event is not cancelable and does not bubble.
|
|
2318
|
+
*
|
|
2319
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event
|
|
2320
|
+
*/
|
|
2321
|
+
oncanplay?: OptionalProperty<EventHandler<Event>>;
|
|
2322
|
+
/**
|
|
2323
|
+
* Fired when the user agent can play the media, and estimates that enough data has been loaded
|
|
2324
|
+
* to play the media up to its end without having to stop for further buffering of content.
|
|
2325
|
+
*
|
|
2326
|
+
* This event is not cancelable and does not bubble.
|
|
2327
|
+
*
|
|
2328
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplaythrough_event
|
|
2329
|
+
*/
|
|
2330
|
+
oncanplaythrough?: OptionalProperty<EventHandler<Event>>;
|
|
2331
|
+
/**
|
|
2332
|
+
* Fired when the duration attribute has been updated.
|
|
2333
|
+
*
|
|
2334
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/durationchange_event
|
|
2335
|
+
*/
|
|
2336
|
+
ondurationchange?: OptionalProperty<EventHandler<Event>>;
|
|
2337
|
+
/**
|
|
2338
|
+
* Fired when the media has become empty; for example, this event is sent if the media has already been loaded
|
|
2339
|
+
* (or partially loaded), and the `load()` method is called to reload it.
|
|
2340
|
+
*
|
|
2341
|
+
* This event is not cancelable and does not bubble.
|
|
2342
|
+
*
|
|
2343
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/emptied_event
|
|
2344
|
+
*/
|
|
2345
|
+
onemptied?: OptionalProperty<EventHandler<Event>>;
|
|
2346
|
+
/**
|
|
2347
|
+
* Fired when the media encounters some initialization data indicating it is encrypted.
|
|
2348
|
+
*
|
|
2349
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/encrypted_event
|
|
2350
|
+
*/
|
|
2351
|
+
onencrypted?: OptionalProperty<EventHandler<MediaEncryptedEvent>>;
|
|
2352
|
+
/**
|
|
2353
|
+
* Fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
|
|
2354
|
+
*
|
|
2355
|
+
* This event is not cancelable and does not bubble.
|
|
2356
|
+
*
|
|
2357
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event
|
|
2358
|
+
*/
|
|
2359
|
+
onended?: OptionalProperty<EventHandler<Event>>;
|
|
2360
|
+
/**
|
|
2361
|
+
* Fired when the frame at the current playback position of the media has finished loading.
|
|
2362
|
+
*
|
|
2363
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadeddata_event
|
|
2364
|
+
*/
|
|
2365
|
+
onloadeddata?: OptionalProperty<EventHandler<Event>>;
|
|
2366
|
+
/**
|
|
2367
|
+
* Fired when metadata has been loaded.
|
|
2368
|
+
*
|
|
2369
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
|
|
2370
|
+
*/
|
|
2371
|
+
onloadedmetadata?: OptionalProperty<EventHandler<Event>>;
|
|
2372
|
+
/**
|
|
2373
|
+
* Fired when the browser has started to load a resource.
|
|
2374
|
+
*
|
|
2375
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadstart_event
|
|
2376
|
+
*/
|
|
2377
|
+
onloadstart?: OptionalProperty<EventHandler<Event>>;
|
|
2378
|
+
/**
|
|
2379
|
+
* Fired when media is paused.
|
|
2380
|
+
*
|
|
2381
|
+
* This event is not cancelable and does not bubble.
|
|
2382
|
+
*
|
|
2383
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event
|
|
2384
|
+
*/
|
|
2385
|
+
onpause?: OptionalProperty<EventHandler<Event>>;
|
|
2386
|
+
/**
|
|
2387
|
+
* Fired when `paused` changes to false and media playback resumes.
|
|
2388
|
+
*
|
|
2389
|
+
* This event is not cancelable and does not bubble.
|
|
2390
|
+
*
|
|
2391
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event
|
|
2392
|
+
*/
|
|
2393
|
+
onplay?: OptionalProperty<EventHandler<Event>>;
|
|
2394
|
+
/**
|
|
2395
|
+
* Fired after playback is first started, and whenever it is restarted.
|
|
2396
|
+
* For example, it is fired when playback resumes after having been paused or delayed due to lack of data.
|
|
2397
|
+
*
|
|
2398
|
+
* This event is not cancelable and does not bubble.
|
|
2399
|
+
*
|
|
2400
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event
|
|
2401
|
+
*/
|
|
2402
|
+
onplaying?: OptionalProperty<EventHandler<Event>>;
|
|
2403
|
+
/**
|
|
2404
|
+
* Fired periodically as the browser loads a resource.
|
|
2405
|
+
*
|
|
2406
|
+
* This event is not cancelable and does not bubble.
|
|
2407
|
+
*
|
|
2408
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/progress_event
|
|
2409
|
+
*/
|
|
2410
|
+
onprogress?: OptionalProperty<EventHandler<Event>>;
|
|
2411
|
+
/**
|
|
2412
|
+
* Fired when the playback rate has changed.
|
|
2413
|
+
*
|
|
2414
|
+
* This event is not cancelable and does not bubble.
|
|
2415
|
+
*
|
|
2416
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event
|
|
2417
|
+
*/
|
|
2418
|
+
onratechange?: OptionalProperty<EventHandler<Event>>;
|
|
2419
|
+
/**
|
|
2420
|
+
* Fired when a seek operation completed, the current playback position has changed, and the Boolean `seeking` attribute is changed to `false`.
|
|
2421
|
+
*
|
|
2422
|
+
* This event is not cancelable and does not bubble.
|
|
2423
|
+
*
|
|
2424
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeked_event
|
|
2425
|
+
*/
|
|
2426
|
+
onseeked?: OptionalProperty<EventHandler<Event>>;
|
|
2427
|
+
/**
|
|
2428
|
+
* Fired when a seek operation starts, meaning the Boolean `seeking` attribute has changed to `true` and the media is seeking a new position.
|
|
2429
|
+
*
|
|
2430
|
+
* This event is not cancelable and does not bubble.
|
|
2431
|
+
*
|
|
2432
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event
|
|
2433
|
+
*/
|
|
2434
|
+
onseeking?: OptionalProperty<EventHandler<Event>>;
|
|
2435
|
+
/**
|
|
2436
|
+
* Fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
|
|
2437
|
+
*
|
|
2438
|
+
* This event is not cancelable and does not bubble.
|
|
2439
|
+
*
|
|
2440
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/stalled_event
|
|
2441
|
+
*/
|
|
2442
|
+
onstalled?: OptionalProperty<EventHandler<Event>>;
|
|
2443
|
+
/**
|
|
2444
|
+
* Fired when media data loading has been suspended.
|
|
2445
|
+
*
|
|
2446
|
+
* This event is not cancelable and does not bubble.
|
|
2447
|
+
*
|
|
2448
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/suspend_event
|
|
2449
|
+
*/
|
|
2450
|
+
onsuspend?: OptionalProperty<EventHandler<Event>>;
|
|
2451
|
+
/**
|
|
2452
|
+
* Fired when the time indicated by the `currentTime` attribute has been updated.
|
|
2453
|
+
*
|
|
2454
|
+
* This event is not cancelable and does not bubble.
|
|
2455
|
+
*
|
|
2456
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event
|
|
2457
|
+
*/
|
|
2458
|
+
ontimeupdate?: OptionalProperty<EventHandler<Event>>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Fired when the volume has changed.
|
|
2461
|
+
*
|
|
2462
|
+
* This event is not cancelable and does not bubble.
|
|
2463
|
+
*
|
|
2464
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event
|
|
2465
|
+
*/
|
|
2466
|
+
onvolumechange?: OptionalProperty<EventHandler<Event>>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Fired when playback has stopped because of a temporary lack of data.
|
|
2469
|
+
*
|
|
2470
|
+
* This event is not cancelable and does not bubble.
|
|
2471
|
+
*
|
|
2472
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/waiting_event
|
|
2473
|
+
*/
|
|
2474
|
+
onwaiting?: OptionalProperty<EventHandler<Event>>;
|
|
2475
|
+
}
|
|
2476
|
+
interface HTMLVideoElementProps extends HTMLMediaElementProps<HTMLVideoElement> {
|
|
2477
|
+
/**
|
|
2478
|
+
* The height of the video's display area in CSS pixels. This must be an absolute value; percentages are not allowed.
|
|
2479
|
+
*
|
|
2480
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
|
|
2481
|
+
*/
|
|
2482
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2483
|
+
/**
|
|
2484
|
+
* The width of the video's display area in CSS pixels. This must be an absolute value; percentages are not allowed.
|
|
2485
|
+
*
|
|
2486
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
|
|
2487
|
+
*/
|
|
2488
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2489
|
+
/**
|
|
2490
|
+
* A URL for an image to show while video data is loading. If this attribute isn't specified, nothing is
|
|
2491
|
+
* displayed until the first frame is available, then the first frame is shown as the poster frame.
|
|
2492
|
+
*
|
|
2493
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
|
|
2494
|
+
*/
|
|
2495
|
+
poster?: OptionalProperty<string | undefined>;
|
|
2496
|
+
/**
|
|
2497
|
+
* Indicates that the video is to be played _inline_, that is within the element's playback area.
|
|
2498
|
+
* Note that the absence of this attribute does not imply that the video will always be played in fullscreen.
|
|
2499
|
+
*/
|
|
2500
|
+
playsInline?: OptionalProperty<boolean>;
|
|
2501
|
+
}
|
|
2502
|
+
interface HTMLSourceElementProps extends PropertiesOf<HTMLSourceElement> {
|
|
2503
|
+
/**
|
|
2504
|
+
* The [MIME type](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) of the resource.
|
|
2505
|
+
*/
|
|
2506
|
+
type?: OptionalProperty<string>;
|
|
2507
|
+
/**
|
|
2508
|
+
* URL of the media resource.
|
|
2509
|
+
*
|
|
2510
|
+
* Required if the source element's parent is an `<audio>` or `<video>` element, not allowed for `<picture>` elements.
|
|
2511
|
+
*/
|
|
2512
|
+
src?: OptionalProperty<string>;
|
|
2513
|
+
/**
|
|
2514
|
+
* A list of one or more strings, separated by commas, indicating a set of possible images represented by the source for the browser to use.
|
|
2515
|
+
*
|
|
2516
|
+
* Required if the source element's parent is a `<picture>` element, not allowed for `<audio>` or `<video>` elements.
|
|
2517
|
+
*
|
|
2518
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset
|
|
2519
|
+
*/
|
|
2520
|
+
srcset?: OptionalProperty<string>;
|
|
2521
|
+
/**
|
|
2522
|
+
* A list of source sizes that describes the final width of the image. Each source size consists of a comma-separated
|
|
2523
|
+
* list of media condition-length pairs. This information is used by the browser to determine, before laying the page out,
|
|
2524
|
+
* which image defined in `srcset` to use. Please note that `sizes` will have its effect only if width dimension
|
|
2525
|
+
* descriptors are provided with `srcset` instead of pixel ratio values (`200w` instead of `2x` for example).
|
|
2526
|
+
*
|
|
2527
|
+
* Allowed if the source element's parent is a `<picture>` element, not allowed for `<audio>` or `<video>` elements.
|
|
2528
|
+
*
|
|
2529
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-sizes
|
|
2530
|
+
*/
|
|
2531
|
+
sizes?: OptionalProperty<string>;
|
|
2532
|
+
/**
|
|
2533
|
+
* Media query of the resource's intended media.
|
|
2534
|
+
*
|
|
2535
|
+
* Allowed if the source element's parent is a `<picture>` element, not allowed for `<audio>` or `<video>` elements.
|
|
2536
|
+
*
|
|
2537
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-media
|
|
2538
|
+
*/
|
|
2539
|
+
media?: OptionalProperty<string>;
|
|
2540
|
+
/**
|
|
2541
|
+
* The height of the image in pixels. Must be an integer without a unit.
|
|
2542
|
+
*
|
|
2543
|
+
* Allowed if the source element's parent is a `<picture>` element, not allowed for `<audio>` or `<video>` elements.
|
|
2544
|
+
*
|
|
2545
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-height
|
|
2546
|
+
*/
|
|
2547
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2548
|
+
/**
|
|
2549
|
+
* The width of the image in pixels. Must be an integer without a unit.
|
|
2550
|
+
*
|
|
2551
|
+
* Allowed if the source element's parent is a `<picture>` element, not allowed for `<audio>` or `<video>` elements.
|
|
2552
|
+
*
|
|
2553
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-width
|
|
2554
|
+
*/
|
|
2555
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2556
|
+
}
|
|
2557
|
+
interface HTMLImageElementProps extends PropertiesOf<HTMLImageElement> {
|
|
2558
|
+
/**
|
|
2559
|
+
* Defines an alternative text description of the image. This can be displayed visually when the image
|
|
2560
|
+
* cannot be loaded, but also provides a description of the content to users accessing the site with a screen reader.
|
|
2561
|
+
*
|
|
2562
|
+
* This is a required property for accessibility. If the image truly can't be described, pass an empty string.
|
|
2563
|
+
*
|
|
2564
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt
|
|
2565
|
+
*/
|
|
2566
|
+
alt: RequiredProperty<string>;
|
|
2567
|
+
/**
|
|
2568
|
+
* Indicates whether to use CORS to fetch the image. If not present the image is fetched without a CORS request.
|
|
2569
|
+
*
|
|
2570
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin
|
|
2571
|
+
*/
|
|
2572
|
+
crossOrigin?: OptionalProperty<"anonymous" | "use-credentials">;
|
|
2573
|
+
/**
|
|
2574
|
+
* Tells the browser whether it should render the image synchronously (waiting for the image before displaying other content)
|
|
2575
|
+
* or asynchronously (displaying other content and loading image in later). Each browser has its own defaults.
|
|
2576
|
+
*
|
|
2577
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding
|
|
2578
|
+
*/
|
|
2579
|
+
decoding?: OptionalProperty<"sync" | "async" | "auto">;
|
|
2580
|
+
/**
|
|
2581
|
+
* Provides a hint of the relative priority to use when fetching the image.
|
|
2582
|
+
*
|
|
2583
|
+
* @experimental
|
|
2584
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-fetchpriority
|
|
2585
|
+
*/
|
|
2586
|
+
/**
|
|
2587
|
+
* The height of the image in CSS pixels. Must be an integer without a unit.
|
|
2588
|
+
*
|
|
2589
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height
|
|
2590
|
+
*/
|
|
2591
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2592
|
+
/**
|
|
2593
|
+
* The width of the image in CSS pixels. Must be an integer without a unit.
|
|
2594
|
+
*
|
|
2595
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width
|
|
2596
|
+
*/
|
|
2597
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2598
|
+
/**
|
|
2599
|
+
* Indicates that the image is part of a [server-side map](https://en.wikipedia.org/wiki/Image_map#Server-side).
|
|
2600
|
+
* If so, the coordinates where the user clicked on the image are sent to the server.
|
|
2601
|
+
*
|
|
2602
|
+
* This property is only valid if this image is inside an `<a>` tag.
|
|
2603
|
+
*
|
|
2604
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap
|
|
2605
|
+
*/
|
|
2606
|
+
isMap?: OptionalProperty<boolean>;
|
|
2607
|
+
/**
|
|
2608
|
+
* Indicates how the browser should load the image when it is located outside the viewport.
|
|
2609
|
+
*
|
|
2610
|
+
* - `eager` will load the image as soon as the `<img>` tag is processed.
|
|
2611
|
+
* - `lazy` will attempt to wait until just before the user scrolls the image into view.
|
|
2612
|
+
*
|
|
2613
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
|
2614
|
+
*/
|
|
2615
|
+
loading?: OptionalProperty<"eager" | "lazy">;
|
|
2616
|
+
/**
|
|
2617
|
+
* A string indicating which referrer to use when fetching the resource.
|
|
2618
|
+
*
|
|
2619
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy
|
|
2620
|
+
*/
|
|
2621
|
+
referrerPolicy?: OptionalProperty<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
2622
|
+
/**
|
|
2623
|
+
* One or more strings separated by commas, indicating a set of source sizes.
|
|
2624
|
+
*
|
|
2625
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes
|
|
2626
|
+
*/
|
|
2627
|
+
sizes?: MaybeReadable<string>;
|
|
2628
|
+
/**
|
|
2629
|
+
* The image URL.
|
|
2630
|
+
*
|
|
2631
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src
|
|
2632
|
+
*/
|
|
2633
|
+
src: RequiredProperty<string>;
|
|
2634
|
+
/**
|
|
2635
|
+
* Identifies one or more image candidate strings separated by commas. Note that the `sizes` property
|
|
2636
|
+
* must also be present or `srcset` will be ignored.
|
|
2637
|
+
*
|
|
2638
|
+
* @example "header640.png 640w, header960.png 960w, header1024.png 1024w"
|
|
2639
|
+
*
|
|
2640
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset
|
|
2641
|
+
*/
|
|
2642
|
+
srcset?: OptionalProperty<string>;
|
|
2643
|
+
/**
|
|
2644
|
+
* The partial URL (starting with #) of an [image map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map)
|
|
2645
|
+
* associated with the element.
|
|
2646
|
+
*
|
|
2647
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap
|
|
2648
|
+
*/
|
|
2649
|
+
useMap?: OptionalProperty<string>;
|
|
2650
|
+
}
|
|
2651
|
+
interface HTMLIFrameElementProps extends PropertiesOf<HTMLIFrameElement> {
|
|
2652
|
+
/**
|
|
2653
|
+
* Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`.
|
|
2654
|
+
* The policy defines what features are available to the `<iframe>` based on the origin of the request
|
|
2655
|
+
* (e.g. access to the microphone, camera, battery, web-share API, etc.).
|
|
2656
|
+
*
|
|
2657
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy#the_iframe_allow_attribute
|
|
2658
|
+
*/
|
|
2659
|
+
allow?: OptionalProperty<string>;
|
|
2660
|
+
allowFullscreen?: OptionalProperty<boolean>;
|
|
2661
|
+
/**
|
|
2662
|
+
* The height of the frame in CSS pixels.
|
|
2663
|
+
*/
|
|
2664
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2665
|
+
/**
|
|
2666
|
+
* The width of the frame in CSS pixels.
|
|
2667
|
+
*/
|
|
2668
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Indicates how the browser should load the iframe.
|
|
2671
|
+
*
|
|
2672
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-loading
|
|
2673
|
+
*/
|
|
2674
|
+
loading?: OptionalProperty<"eager" | "lazy">;
|
|
2675
|
+
/**
|
|
2676
|
+
* A targetable name for the embedded browsing context. This can be used in the `target` attribute of the
|
|
2677
|
+
* `<a>`, `<form>`, or `<base>` elements; the `formtarget` attribute of the `<input>` or `<button>` elements;
|
|
2678
|
+
* or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) method.
|
|
2679
|
+
*
|
|
2680
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-name
|
|
2681
|
+
*/
|
|
2682
|
+
name?: OptionalProperty<string>;
|
|
2683
|
+
/**
|
|
2684
|
+
* Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply
|
|
2685
|
+
* all restrictions, or [space-separated tokens to lift particular restrictions](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox).
|
|
2686
|
+
*/
|
|
2687
|
+
sandbox?: OptionalProperty<string>;
|
|
2688
|
+
/**
|
|
2689
|
+
* A string indicating which referrer to send when fetching the resource.
|
|
2690
|
+
*
|
|
2691
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
|
|
2692
|
+
*/
|
|
2693
|
+
referrerPolicy?: OptionalProperty<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
2694
|
+
/**
|
|
2695
|
+
* The URL of the page to embed.
|
|
2696
|
+
*
|
|
2697
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/src
|
|
2698
|
+
*/
|
|
2699
|
+
src?: OptionalProperty<string>;
|
|
2700
|
+
/**
|
|
2701
|
+
* Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute,
|
|
2702
|
+
* it will fall back to the URL in the `src` attribute.
|
|
2703
|
+
*
|
|
2704
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/srcdoc
|
|
2705
|
+
*/
|
|
2706
|
+
srcdoc?: OptionalProperty<string>;
|
|
2707
|
+
}
|
|
2708
|
+
interface HTMLEmbedElementProps extends PropertiesOf<HTMLEmbedElement> {
|
|
2709
|
+
/**
|
|
2710
|
+
* The displayed height of the resource in CSS pixels.
|
|
2711
|
+
*/
|
|
2712
|
+
height?: OptionalProperty<string>;
|
|
2713
|
+
/**
|
|
2714
|
+
* The displayed width of the resource in CSS pixels.
|
|
2715
|
+
*/
|
|
2716
|
+
width?: OptionalProperty<string>;
|
|
2717
|
+
/**
|
|
2718
|
+
* The URL of the resource being embedded.
|
|
2719
|
+
*/
|
|
2720
|
+
src?: OptionalProperty<string>;
|
|
2721
|
+
/**
|
|
2722
|
+
* The [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) to use to select the plug-in to instantiate.
|
|
2723
|
+
*/
|
|
2724
|
+
type?: OptionalProperty<string>;
|
|
2725
|
+
}
|
|
2726
|
+
interface HTMLObjectElementProps extends PropertiesOf<HTMLObjectElement> {
|
|
2727
|
+
/**
|
|
2728
|
+
* The displayed height of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.
|
|
2729
|
+
*/
|
|
2730
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2731
|
+
/**
|
|
2732
|
+
* The displayed width of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.
|
|
2733
|
+
*/
|
|
2734
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
2735
|
+
/**
|
|
2736
|
+
* The address of the resource as a valid URL. At least one of `data` and `type` must be defined.
|
|
2737
|
+
*/
|
|
2738
|
+
data?: OptionalProperty<string>;
|
|
2739
|
+
/**
|
|
2740
|
+
* The [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the resource specified by data.
|
|
2741
|
+
* At least one of `data` and `type` must be defined.
|
|
2742
|
+
*/
|
|
2743
|
+
type?: OptionalProperty<string>;
|
|
2744
|
+
/**
|
|
2745
|
+
* The form element, if any, that the object element is associated with (its form owner).
|
|
2746
|
+
* The value of the attribute must be an ID of a `<form>` element in the same document.
|
|
2747
|
+
*/
|
|
2748
|
+
form?: OptionalProperty<string>;
|
|
2749
|
+
/**
|
|
2750
|
+
* The name of valid browsing context (HTML5), or the name of the control (HTML 4).
|
|
2751
|
+
*/
|
|
2752
|
+
name?: OptionalProperty<string>;
|
|
2753
|
+
/**
|
|
2754
|
+
* A hash-name reference to a `<map>` element; that is a '#' followed by the value of a name of a map element.
|
|
2755
|
+
*/
|
|
2756
|
+
useMap?: OptionalProperty<string>;
|
|
2757
|
+
}
|
|
2758
|
+
interface HTMLTrackElementProps extends PropertiesOf<HTMLTrackElement> {
|
|
2759
|
+
/**
|
|
2760
|
+
* Indicates that the track should be enabled unless the user's preferences indicate that another track
|
|
2761
|
+
* is more appropriate. This may only be used on one track element per media element.
|
|
2762
|
+
*/
|
|
2763
|
+
default?: OptionalProperty<boolean>;
|
|
2764
|
+
/**
|
|
2765
|
+
* How the text track is meant to be used. If omitted the default kind is `subtitles`.
|
|
2766
|
+
*
|
|
2767
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track#attr-kind
|
|
2768
|
+
*/
|
|
2769
|
+
kind?: OptionalProperty<"subtitles" | "captions" | "descriptions" | "chapters" | "metadata">;
|
|
2770
|
+
/**
|
|
2771
|
+
* A user-readable title of the text track which is used by the browser when listing available text tracks.
|
|
2772
|
+
*/
|
|
2773
|
+
label?: OptionalProperty<string>;
|
|
2774
|
+
/**
|
|
2775
|
+
* Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value
|
|
2776
|
+
* must have the same origin as the document — unless the `<audio>` or `<video>` parent element of the track
|
|
2777
|
+
* element has a `crossorigin` attribute.
|
|
2778
|
+
*/
|
|
2779
|
+
src: RequiredProperty<string>;
|
|
2780
|
+
/**
|
|
2781
|
+
* Language of the track text data. It must be a valid [BCP 47 language tag](https://r12a.github.io/app-subtags/).
|
|
2782
|
+
* If the `kind` attribute is set to `subtitles`, then `srclang` must be defined.
|
|
2783
|
+
*/
|
|
2784
|
+
srclang?: OptionalProperty<string>;
|
|
2785
|
+
}
|
|
2786
|
+
interface HTMLMapElementProps extends PropertiesOf<HTMLMapElement> {
|
|
2787
|
+
/**
|
|
2788
|
+
* Gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value
|
|
2789
|
+
* with no space characters. The value of the name attribute must not be equal to the value of the name attribute
|
|
2790
|
+
* of another `<map>` element in the same document. If the `id` attribute is also specified, both attributes must
|
|
2791
|
+
* have the same value.
|
|
2792
|
+
*
|
|
2793
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name
|
|
2794
|
+
*/
|
|
2795
|
+
name: RequiredProperty<string>;
|
|
2796
|
+
}
|
|
2797
|
+
interface HTMLAreaElementProps extends PropertiesOf<HTMLAreaElement> {
|
|
2798
|
+
/**
|
|
2799
|
+
* A text string alternative to display on browsers that do not display images. The text should be phrased
|
|
2800
|
+
* so that it presents the user with the same kind of choice as the image would offer when displayed without
|
|
2801
|
+
* the alternative text. This attribute is required only if the `href` attribute is used.
|
|
2802
|
+
*/
|
|
2803
|
+
alt?: OptionalProperty<string>;
|
|
2804
|
+
/**
|
|
2805
|
+
* The shape of the associated hot spot.
|
|
2806
|
+
*/
|
|
2807
|
+
shape?: OptionalProperty<"rect" | "circle" | "poly" | "default">;
|
|
2808
|
+
/**
|
|
2809
|
+
* Details the coordinates of the `shape` attribute in size, shape, and placement of an `<area>`.
|
|
2810
|
+
* This attribute must not be used if `shape` is set to `default`.
|
|
2811
|
+
*
|
|
2812
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area#attr-coords
|
|
2813
|
+
*/
|
|
2814
|
+
coords?: OptionalProperty<string>;
|
|
2815
|
+
/**
|
|
2816
|
+
* If present, indicates that the author intends the hyperlink to be used for downloading a resource.
|
|
2817
|
+
* See `<a>` for [a full description of the `download` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download).
|
|
2818
|
+
*/
|
|
2819
|
+
download?: OptionalProperty<string>;
|
|
2820
|
+
/**
|
|
2821
|
+
* The hyperlink target for the area. Its value is a valid URL. This attribute may be omitted; if so,
|
|
2822
|
+
* the `<area>` element does not represent a hyperlink.
|
|
2823
|
+
*/
|
|
2824
|
+
href?: OptionalProperty<string>;
|
|
2825
|
+
/**
|
|
2826
|
+
* Contains a space-separated list of URLs to which, when the hyperlink is followed, `POST` requests with the body
|
|
2827
|
+
* `PING` will be sent by the browser (in the background). Typically used for tracking.
|
|
2828
|
+
*/
|
|
2829
|
+
ping?: OptionalProperty<string>;
|
|
2830
|
+
/**
|
|
2831
|
+
* A string indicating which referrer to use when fetching the resource.
|
|
2832
|
+
*
|
|
2833
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area#attr-referrerpolicy
|
|
2834
|
+
*/
|
|
2835
|
+
referrerPolicy?: OptionalProperty<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
2836
|
+
/**
|
|
2837
|
+
* For anchors containing the `href` attribute, this attribute specifies the relationship of the target object
|
|
2838
|
+
* to the link object. The value is a space-separated list of [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
|
|
2839
|
+
* The values and their semantics will be registered by some authority that might have meaning to the document author.
|
|
2840
|
+
* The default relationship, if no other is given, is void. Use this attribute only if the `href` attribute is present.
|
|
2841
|
+
*/
|
|
2842
|
+
rel?: OptionalProperty<string>;
|
|
2843
|
+
/**
|
|
2844
|
+
* Where to display the linked URL, as the name for a browsing context (a tab, window, or `<iframe>`)
|
|
2845
|
+
*
|
|
2846
|
+
* A common usage is `target: "_blank"` to cause a link to open in a new tab.
|
|
2847
|
+
*
|
|
2848
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area#attr-target
|
|
2849
|
+
*/
|
|
2850
|
+
target?: OptionalProperty<"_self" | "_blank" | "parent" | "_top">;
|
|
2851
|
+
}
|
|
2852
|
+
export interface IntrinsicElements {
|
|
2853
|
+
/**
|
|
2854
|
+
* The _Table_ element.
|
|
2855
|
+
*
|
|
2856
|
+
* Represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns
|
|
2857
|
+
* of cells containing data.
|
|
2858
|
+
*
|
|
2859
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
|
|
2860
|
+
*/
|
|
2861
|
+
table: PropertiesOf<HTMLTableElement>;
|
|
2862
|
+
/**
|
|
2863
|
+
* The _Table Caption_ element.
|
|
2864
|
+
*
|
|
2865
|
+
* Specifies the caption (or title) of a table.
|
|
2866
|
+
*
|
|
2867
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
|
|
2868
|
+
*/
|
|
2869
|
+
caption: PropertiesOf<HTMLTableCaptionElement>;
|
|
2870
|
+
/**
|
|
2871
|
+
* The _Table Column Group_ element.
|
|
2872
|
+
*
|
|
2873
|
+
* Defines a group of columns within a table.
|
|
2874
|
+
*
|
|
2875
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup
|
|
2876
|
+
*/
|
|
2877
|
+
colgroup: HTMLTableColgroupElementProps;
|
|
2878
|
+
/**
|
|
2879
|
+
* The _Table Column_ element.
|
|
2880
|
+
*
|
|
2881
|
+
* Defines a column within a table and is used for defining common semantics on all common cells.
|
|
2882
|
+
* It is generally found within a `<colgroup>` element.
|
|
2883
|
+
*
|
|
2884
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col
|
|
2885
|
+
*/
|
|
2886
|
+
col: HTMLTableColElementProps;
|
|
2887
|
+
/**
|
|
2888
|
+
* The _Table Body_ element.
|
|
2889
|
+
*
|
|
2890
|
+
* Encapsulates a set of table rows (`<tr>` elements), indicating that they comprise the body of the table (`<table>`).
|
|
2891
|
+
*
|
|
2892
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody
|
|
2893
|
+
*/
|
|
2894
|
+
tbody: PropertiesOf<HTMLTableSectionElement>;
|
|
2895
|
+
/**
|
|
2896
|
+
* The _Table Head_ element.
|
|
2897
|
+
*
|
|
2898
|
+
* Defines a set of rows defining the head of the columns of the table.
|
|
2899
|
+
*
|
|
2900
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead
|
|
2901
|
+
*/
|
|
2902
|
+
thead: PropertiesOf<HTMLTableSectionElement>;
|
|
2903
|
+
/**
|
|
2904
|
+
* The _Table Foot_ element.
|
|
2905
|
+
*
|
|
2906
|
+
* Defines a set of rows summarizing the columns of the table.
|
|
2907
|
+
*
|
|
2908
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot
|
|
2909
|
+
*/
|
|
2910
|
+
tfoot: PropertiesOf<HTMLTableSectionElement>;
|
|
2911
|
+
/**
|
|
2912
|
+
* The _Table Row_ element.
|
|
2913
|
+
*
|
|
2914
|
+
* Defines a row of cells in a table. The row's cells can then be established using a mix of `<td>` (data cell)
|
|
2915
|
+
* and `<th>` (header cell) elements.
|
|
2916
|
+
*
|
|
2917
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
2918
|
+
*/
|
|
2919
|
+
tr: PropertiesOf<HTMLTableRowElement>;
|
|
2920
|
+
/**
|
|
2921
|
+
* The _Table Data Cell_ element.
|
|
2922
|
+
*
|
|
2923
|
+
* Defines a cell of a table that contains data.
|
|
2924
|
+
*
|
|
2925
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td
|
|
2926
|
+
*/
|
|
2927
|
+
td: HTMLTableCellElementProps;
|
|
2928
|
+
/**
|
|
2929
|
+
* The _Table Header_ element.
|
|
2930
|
+
*
|
|
2931
|
+
* Defines a cell as header of a group of table cells. The exact nature of this group is defined by the
|
|
2932
|
+
* `scope` and `headers` attributes.
|
|
2933
|
+
*
|
|
2934
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
|
|
2935
|
+
*/
|
|
2936
|
+
th: HTMLTableHeaderElementProps;
|
|
2937
|
+
}
|
|
2938
|
+
interface HTMLTableColgroupElementProps extends PropertiesOf<HTMLTableColElement> {
|
|
2939
|
+
/**
|
|
2940
|
+
* A positive integer indicating the number of consecutive columns the `<colgroup>` element spans.
|
|
2941
|
+
* If not present, its default value is `1`.
|
|
2942
|
+
*
|
|
2943
|
+
* The `span` attribute is not permitted if there are one or more `<col>` elements within the `<colgroup>`.
|
|
2944
|
+
*/
|
|
2945
|
+
span?: OptionalProperty<number>;
|
|
2946
|
+
}
|
|
2947
|
+
interface HTMLTableColElementProps extends PropertiesOf<HTMLTableColElement> {
|
|
2948
|
+
/**
|
|
2949
|
+
* A positive integer indicating the number of consecutive columns the `<col>` element spans.
|
|
2950
|
+
* If not present, its default value is `1`.
|
|
2951
|
+
*/
|
|
2952
|
+
span?: OptionalProperty<number>;
|
|
2953
|
+
}
|
|
2954
|
+
interface HTMLTableCellElementProps extends PropertiesOf<HTMLTableCellElement> {
|
|
2955
|
+
/**
|
|
2956
|
+
* A positive integer value that indicates for how many columns the cell extends. Its default value is `1`.
|
|
2957
|
+
* Values higher than 1000 will be considered as incorrect and will be set to the default value.
|
|
2958
|
+
*/
|
|
2959
|
+
colSpan?: OptionalProperty<number>;
|
|
2960
|
+
/**
|
|
2961
|
+
* A non-negative integer value that indicates for how many rows the cell extends. Its default value is `1`;
|
|
2962
|
+
* if its value is set to `0`, it extends until the end of the table section (`<thead>`, `<tbody>`, `<tfoot>`,
|
|
2963
|
+
* even if implicitly defined), that the cell belongs to.
|
|
2964
|
+
*
|
|
2965
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-rowspan
|
|
2966
|
+
*/
|
|
2967
|
+
rowSpan?: OptionalProperty<number>;
|
|
2968
|
+
/**
|
|
2969
|
+
* A list of space-separated strings, each corresponding to the `id` attribute of the `<th>` elements that apply to this element.
|
|
2970
|
+
*/
|
|
2971
|
+
headers?: OptionalProperty<string>;
|
|
2972
|
+
}
|
|
2973
|
+
interface HTMLTableHeaderElementProps extends HTMLTableCellElementProps {
|
|
2974
|
+
/**
|
|
2975
|
+
* A short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.
|
|
2976
|
+
*/
|
|
2977
|
+
abbr?: OptionalProperty<string>;
|
|
2978
|
+
/**
|
|
2979
|
+
* Defines the cells that the `<th>` element relates to.
|
|
2980
|
+
*
|
|
2981
|
+
* - `row`: The header relates to all cells of the row it belongs to.
|
|
2982
|
+
* - `col`: The header relates to all cells of the column it belongs to.
|
|
2983
|
+
* - `rowgroup`: The header belongs to a rowgroup and relates to all of its cells. These cells can be placed to the
|
|
2984
|
+
* right or the left of the header, depending on the value of the `dir` attribute in the `<table>` element.
|
|
2985
|
+
* - `colgroup`: The header belongs to a colgroup and relates to all of its cells.
|
|
2986
|
+
*
|
|
2987
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope
|
|
2988
|
+
*/
|
|
2989
|
+
scope?: OptionalProperty<"row" | "col" | "rowgroup" | "colgroup">;
|
|
2990
|
+
}
|
|
2991
|
+
export interface IntrinsicElements {
|
|
2992
|
+
/**
|
|
2993
|
+
* Contains a group of interactive elements for taking input from a user.
|
|
2994
|
+
* This can be anything from a chat box with a submit button to a full page tax form.
|
|
2995
|
+
*
|
|
2996
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form
|
|
2997
|
+
*/
|
|
2998
|
+
form: FormElementProps;
|
|
2999
|
+
/**
|
|
3000
|
+
* Provides a text label that describes another element.
|
|
3001
|
+
*
|
|
3002
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label
|
|
3003
|
+
*/
|
|
3004
|
+
label: HTMLLabelElementProps;
|
|
3005
|
+
input: HTMLInputElementProps;
|
|
3006
|
+
button: ButtonElementProps;
|
|
3007
|
+
select: HTMLSelectElementProps;
|
|
3008
|
+
datalist: PropertiesOf<HTMLDataListElement>;
|
|
3009
|
+
optgroup: HTMLOptGroupElementProps;
|
|
3010
|
+
option: HTMLOptionElementProps;
|
|
3011
|
+
textarea: HTMLTextAreaElementProps;
|
|
3012
|
+
output: HTMLOutputElementProps;
|
|
3013
|
+
/**
|
|
3014
|
+
* Displays a finite progress indicator.
|
|
3015
|
+
*/
|
|
3016
|
+
progress: HTMLProgressElementProps;
|
|
3017
|
+
/**
|
|
3018
|
+
* Displays a value within a finite range. Think gas gauge or progress bar.
|
|
3019
|
+
* Consider the simpler [`<progress>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) element for progress bars.
|
|
3020
|
+
*
|
|
3021
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter
|
|
3022
|
+
*/
|
|
3023
|
+
meter: HTMLMeterElementProps;
|
|
3024
|
+
/**
|
|
3025
|
+
* Contains and names a group of related form controls.
|
|
3026
|
+
*
|
|
3027
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
|
|
3028
|
+
*/
|
|
3029
|
+
fieldset: HTMLFieldSetElementProps;
|
|
3030
|
+
/**
|
|
3031
|
+
* Provides a caption for a parent `<fieldset>`.
|
|
3032
|
+
*
|
|
3033
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend
|
|
3034
|
+
*/
|
|
3035
|
+
legend: PropertiesOf<HTMLLegendElement>;
|
|
3036
|
+
}
|
|
3037
|
+
type AutocompleteValues = boolean | "off" | "on";
|
|
3038
|
+
interface FormElementProps extends PropertiesOf<HTMLFormElement> {
|
|
3039
|
+
/**
|
|
3040
|
+
* Indicates whether input elements can by default have their values automatically completed by the browser.
|
|
3041
|
+
* `autocomplete` attributes on form elements override it on `<form>`.
|
|
3042
|
+
*
|
|
3043
|
+
* @see \https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete
|
|
3044
|
+
*/
|
|
3045
|
+
autocomplete?: OptionalProperty<AutocompleteValues>;
|
|
3046
|
+
/**
|
|
3047
|
+
* The `name` of the form. The value must not be the empty string, and must be unique among the form elements
|
|
3048
|
+
* in the forms collection that it is in, if any.
|
|
3049
|
+
*/
|
|
3050
|
+
name?: OptionalProperty<string>;
|
|
3051
|
+
rel?: OptionalProperty<string>;
|
|
3052
|
+
/**
|
|
3053
|
+
* The URL that handles the form submission.
|
|
3054
|
+
*/
|
|
3055
|
+
action?: OptionalProperty<string>;
|
|
3056
|
+
/**
|
|
3057
|
+
* The [MIME type](https://en.wikipedia.org/wiki/Media_type) of the form data, when the form has a `method` of `post`.
|
|
3058
|
+
* Alias to `encoding`.
|
|
3059
|
+
*/
|
|
3060
|
+
enctype?: OptionalProperty<"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain" | string>;
|
|
3061
|
+
/**
|
|
3062
|
+
* The [MIME type](https://en.wikipedia.org/wiki/Media_type) of the form data, when the form has a `method` of `post`.
|
|
3063
|
+
* Alias to `enctype`.
|
|
3064
|
+
*/
|
|
3065
|
+
encoding?: OptionalProperty<"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain" | string>;
|
|
3066
|
+
/**
|
|
3067
|
+
* The HTTP method to use when submitting the form. A value of `"dialog"` is valid when the form is inside a `<dialog`>
|
|
3068
|
+
* element, where it will close the dialog and fire a `submit` event without sending data or clearing the form.
|
|
3069
|
+
*
|
|
3070
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method
|
|
3071
|
+
*/
|
|
3072
|
+
method?: OptionalProperty<"post" | "POST" | "get" | "GET" | "dialog" | string>;
|
|
3073
|
+
/**
|
|
3074
|
+
* If true, prevents the form from being validated when submitted.
|
|
3075
|
+
*
|
|
3076
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate
|
|
3077
|
+
*/
|
|
3078
|
+
noValidate?: OptionalProperty<boolean>;
|
|
3079
|
+
/**
|
|
3080
|
+
* Name of the browsing context to display the response to the form's submission.
|
|
3081
|
+
*
|
|
3082
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target
|
|
3083
|
+
*/
|
|
3084
|
+
target?: OptionalProperty<"_self" | "_blank" | "_parent" | "_top" | string>;
|
|
3085
|
+
/**
|
|
3086
|
+
* Fires after the entry list representing the form's data is constructed.
|
|
3087
|
+
*
|
|
3088
|
+
* This event is not cancelable and does not bubble.
|
|
3089
|
+
*
|
|
3090
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/formdata_event
|
|
3091
|
+
*/
|
|
3092
|
+
onFormData?: OptionalProperty<EventHandler<FormDataEvent>>;
|
|
3093
|
+
/**
|
|
3094
|
+
* Fires when a `<form>` is reset.
|
|
3095
|
+
*
|
|
3096
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset_event
|
|
3097
|
+
*/
|
|
3098
|
+
onReset?: OptionalProperty<EventHandler<Event>>;
|
|
3099
|
+
/**
|
|
3100
|
+
* Fires when a `<form>` is submitted.
|
|
3101
|
+
*
|
|
3102
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event
|
|
3103
|
+
*/
|
|
3104
|
+
onSubmit?: OptionalProperty<EventHandler<SubmitEvent>>;
|
|
3105
|
+
/**
|
|
3106
|
+
* Fires after the entry list representing the form's data is constructed.
|
|
3107
|
+
*
|
|
3108
|
+
* This event is not cancelable and does not bubble.
|
|
3109
|
+
*
|
|
3110
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/formdata_event
|
|
3111
|
+
*/
|
|
3112
|
+
onformdata?: OptionalProperty<EventHandler<FormDataEvent>>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Fires when a `<form>` is reset.
|
|
3115
|
+
*
|
|
3116
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset_event
|
|
3117
|
+
*/
|
|
3118
|
+
onreset?: OptionalProperty<EventHandler<Event>>;
|
|
3119
|
+
/**
|
|
3120
|
+
* Fires when a `<form>` is submitted.
|
|
3121
|
+
*
|
|
3122
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event
|
|
3123
|
+
*/
|
|
3124
|
+
onsubmit?: OptionalProperty<EventHandler<SubmitEvent>>;
|
|
3125
|
+
}
|
|
3126
|
+
interface HTMLLabelElementProps extends PropertiesOf<HTMLLabelElement> {
|
|
3127
|
+
/**
|
|
3128
|
+
* An `id` for the element the label labels.
|
|
3129
|
+
*
|
|
3130
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#attr-for
|
|
3131
|
+
*/
|
|
3132
|
+
htmlFor?: OptionalProperty<string>;
|
|
3133
|
+
/**
|
|
3134
|
+
* An `id` for the element the label labels. Alias to `htmlFor` property.
|
|
3135
|
+
*
|
|
3136
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#attr-for
|
|
3137
|
+
*/
|
|
3138
|
+
for?: OptionalProperty<string>;
|
|
3139
|
+
}
|
|
3140
|
+
export type InputType = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "submit" | "image" | "reset" | "button";
|
|
3141
|
+
interface HTMLInputElementProps extends PropertiesOf<HTMLInputElement> {
|
|
3142
|
+
accept?: OptionalProperty<string>;
|
|
3143
|
+
alt?: OptionalProperty<string>;
|
|
3144
|
+
autocomplete?: OptionalProperty<AutocompleteValues>;
|
|
3145
|
+
checked?: OptionalProperty<boolean>;
|
|
3146
|
+
dirName?: OptionalProperty<string>;
|
|
3147
|
+
disabled?: OptionalProperty<boolean>;
|
|
3148
|
+
form?: OptionalProperty<string>;
|
|
3149
|
+
formAction?: OptionalProperty<string>;
|
|
3150
|
+
formEnctype?: OptionalProperty<string>;
|
|
3151
|
+
formMethod?: OptionalProperty<string>;
|
|
3152
|
+
formNoValidate?: OptionalProperty<boolean>;
|
|
3153
|
+
formTarget?: OptionalProperty<string>;
|
|
3154
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3155
|
+
list?: OptionalProperty<string>;
|
|
3156
|
+
max?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3157
|
+
maxLength?: OptionalProperty<number>;
|
|
3158
|
+
min?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3159
|
+
minLength?: OptionalProperty<number>;
|
|
3160
|
+
multiple?: OptionalProperty<boolean>;
|
|
3161
|
+
name?: OptionalProperty<string>;
|
|
3162
|
+
pattern?: OptionalProperty<string | RegExp> | OptionalProperty<string> | OptionalProperty<RegExp>;
|
|
3163
|
+
placeholder?: OptionalProperty<string>;
|
|
3164
|
+
popoverTarget?: OptionalProperty<string>;
|
|
3165
|
+
popoverTargetAction?: OptionalProperty<"toggle" | "show" | "hide">;
|
|
3166
|
+
readOnly?: OptionalProperty<boolean>;
|
|
3167
|
+
required?: OptionalProperty<boolean>;
|
|
3168
|
+
size?: OptionalProperty<number>;
|
|
3169
|
+
src?: OptionalProperty<string>;
|
|
3170
|
+
step?: OptionalProperty<number>;
|
|
3171
|
+
type?: OptionalProperty<InputType>;
|
|
3172
|
+
value?: OptionalProperty<string>;
|
|
3173
|
+
/**
|
|
3174
|
+
* Takes a Writable and sets up two-way binding with it.
|
|
3175
|
+
* Any time the user changes the value of this input, that value will be written back to the Writable.
|
|
3176
|
+
*/
|
|
3177
|
+
$$value?: Writable<string>;
|
|
3178
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3179
|
+
title?: OptionalProperty<string>;
|
|
3180
|
+
/**
|
|
3181
|
+
* Fired when a submittable element has been checked for validity and doesn't satisfy its constraints.
|
|
3182
|
+
* When a form is submitted, `invalid` events are fired at each form control that is invalid.
|
|
3183
|
+
*
|
|
3184
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event
|
|
3185
|
+
*/
|
|
3186
|
+
onInvalid?: OptionalProperty<EventHandler<Event>>;
|
|
3187
|
+
/**
|
|
3188
|
+
* Fired when text has been selected.
|
|
3189
|
+
*
|
|
3190
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select_event
|
|
3191
|
+
*/
|
|
3192
|
+
onSelect?: OptionalProperty<EventHandler<Event>>;
|
|
3193
|
+
/**
|
|
3194
|
+
* Fired when a submittable element has been checked for validity and doesn't satisfy its constraints.
|
|
3195
|
+
* When a form is submitted, `invalid` events are fired at each form control that is invalid.
|
|
3196
|
+
*
|
|
3197
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event
|
|
3198
|
+
*/
|
|
3199
|
+
oninvalid?: OptionalProperty<EventHandler<Event>>;
|
|
3200
|
+
/**
|
|
3201
|
+
* Fired when text has been selected.
|
|
3202
|
+
*
|
|
3203
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select_event
|
|
3204
|
+
*/
|
|
3205
|
+
onselect?: OptionalProperty<EventHandler<Event>>;
|
|
3206
|
+
}
|
|
3207
|
+
export type ButtonTypeValues = "submit" | "reset" | "button";
|
|
3208
|
+
interface ButtonElementProps extends PropertiesOf<HTMLButtonElement> {
|
|
3209
|
+
disabled?: OptionalProperty<boolean>;
|
|
3210
|
+
form?: OptionalProperty<string>;
|
|
3211
|
+
formAction?: OptionalProperty<string>;
|
|
3212
|
+
formEnctype?: OptionalProperty<string>;
|
|
3213
|
+
formMethod?: OptionalProperty<string>;
|
|
3214
|
+
formNoValidate?: OptionalProperty<boolean>;
|
|
3215
|
+
formTarget?: OptionalProperty<string>;
|
|
3216
|
+
name?: OptionalProperty<string>;
|
|
3217
|
+
popoverTarget?: OptionalProperty<string>;
|
|
3218
|
+
popoverTargetAction?: OptionalProperty<"toggle" | "show" | "hide">;
|
|
3219
|
+
type?: OptionalProperty<ButtonTypeValues>;
|
|
3220
|
+
value?: OptionalProperty<string>;
|
|
3221
|
+
}
|
|
3222
|
+
interface HTMLSelectElementProps extends PropertiesOf<HTMLSelectElement> {
|
|
3223
|
+
autocomplete?: OptionalProperty<AutocompleteValues>;
|
|
3224
|
+
disabled?: OptionalProperty<boolean>;
|
|
3225
|
+
form?: OptionalProperty<string>;
|
|
3226
|
+
multiple?: OptionalProperty<boolean>;
|
|
3227
|
+
name?: OptionalProperty<string>;
|
|
3228
|
+
required?: OptionalProperty<boolean>;
|
|
3229
|
+
size?: OptionalProperty<number>;
|
|
3230
|
+
value?: OptionalProperty<string>;
|
|
3231
|
+
}
|
|
3232
|
+
interface HTMLOptGroupElementProps extends PropertiesOf<HTMLOptGroupElement> {
|
|
3233
|
+
disabled?: OptionalProperty<boolean>;
|
|
3234
|
+
label?: OptionalProperty<string>;
|
|
3235
|
+
}
|
|
3236
|
+
interface HTMLOptionElementProps extends PropertiesOf<HTMLOptionElement> {
|
|
3237
|
+
disabled?: OptionalProperty<boolean>;
|
|
3238
|
+
label?: OptionalProperty<string>;
|
|
3239
|
+
selected?: OptionalProperty<boolean>;
|
|
3240
|
+
value?: OptionalProperty<string>;
|
|
3241
|
+
}
|
|
3242
|
+
interface HTMLTextAreaElementProps extends PropertiesOf<HTMLTextAreaElement> {
|
|
3243
|
+
autocomplete?: OptionalProperty<AutocompleteValues>;
|
|
3244
|
+
cols?: OptionalProperty<number>;
|
|
3245
|
+
dirname?: OptionalProperty<string>;
|
|
3246
|
+
disabled?: OptionalProperty<boolean>;
|
|
3247
|
+
form?: OptionalProperty<string>;
|
|
3248
|
+
maxLength?: OptionalProperty<number>;
|
|
3249
|
+
minLength?: OptionalProperty<number>;
|
|
3250
|
+
name?: OptionalProperty<string>;
|
|
3251
|
+
placeholder?: OptionalProperty<string>;
|
|
3252
|
+
readOnly?: OptionalProperty<boolean>;
|
|
3253
|
+
required?: OptionalProperty<boolean>;
|
|
3254
|
+
rows?: OptionalProperty<number>;
|
|
3255
|
+
wrap?: OptionalProperty<"soft" | "hard">;
|
|
3256
|
+
value?: OptionalProperty<string>;
|
|
3257
|
+
$$value?: Writable<string>;
|
|
3258
|
+
}
|
|
3259
|
+
interface HTMLOutputElementProps extends PropertiesOf<HTMLOutputElement> {
|
|
3260
|
+
for?: OptionalProperty<string>;
|
|
3261
|
+
form?: OptionalProperty<string>;
|
|
3262
|
+
name?: OptionalProperty<string>;
|
|
3263
|
+
}
|
|
3264
|
+
interface HTMLProgressElementProps extends PropertiesOf<HTMLProgressElement> {
|
|
3265
|
+
value?: OptionalProperty<number>;
|
|
3266
|
+
max?: OptionalProperty<number>;
|
|
3267
|
+
}
|
|
3268
|
+
interface HTMLMeterElementProps extends PropertiesOf<HTMLMeterElement> {
|
|
3269
|
+
/**
|
|
3270
|
+
* The current value displayed by this meter. Must be between `min` and `max`, which default to 0 and 1 respectively.
|
|
3271
|
+
*/
|
|
3272
|
+
value?: OptionalProperty<number>;
|
|
3273
|
+
/**
|
|
3274
|
+
* The minimum value this meter can display. Defaults to 0.
|
|
3275
|
+
*/
|
|
3276
|
+
min?: OptionalProperty<number>;
|
|
3277
|
+
/**
|
|
3278
|
+
* The maximum value this meter can display. Defaults to 1.
|
|
3279
|
+
*/
|
|
3280
|
+
max?: OptionalProperty<number>;
|
|
3281
|
+
/**
|
|
3282
|
+
* If `value` is between `min` and `low` it is considered "low". You would charge your phone
|
|
3283
|
+
* if your battery meter was in this range. The browser may display values in this range in red.
|
|
3284
|
+
*/
|
|
3285
|
+
low?: OptionalProperty<number>;
|
|
3286
|
+
/**
|
|
3287
|
+
* If `value` is between `high` and `max` it is considered "high". You just took your phone off the charger
|
|
3288
|
+
* if your battery meter is in this range. The browser may display values in this range in green.
|
|
3289
|
+
*/
|
|
3290
|
+
high?: OptionalProperty<number>;
|
|
3291
|
+
/**
|
|
3292
|
+
* The ideal `value`.
|
|
3293
|
+
*/
|
|
3294
|
+
optimum?: OptionalProperty<number>;
|
|
3295
|
+
}
|
|
3296
|
+
interface HTMLFieldSetElementProps extends PropertiesOf<HTMLFieldSetElement> {
|
|
3297
|
+
/**
|
|
3298
|
+
* If true, all form controls inside this fieldset are disabled.
|
|
3299
|
+
*/
|
|
3300
|
+
disabled?: OptionalProperty<boolean>;
|
|
3301
|
+
/**
|
|
3302
|
+
* The name of this group of inputs.
|
|
3303
|
+
*/
|
|
3304
|
+
name?: OptionalProperty<string>;
|
|
3305
|
+
}
|
|
3306
|
+
export interface IntrinsicElements {
|
|
3307
|
+
/**
|
|
3308
|
+
* The _Details disclosure_ element.
|
|
3309
|
+
*
|
|
3310
|
+
* Creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state.
|
|
3311
|
+
* A summary or label must be provided using the `<summary>` element.
|
|
3312
|
+
*
|
|
3313
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
3314
|
+
*/
|
|
3315
|
+
details: HTMLDetailsElementProps;
|
|
3316
|
+
/**
|
|
3317
|
+
* The _Disclosure Summary_ element.
|
|
3318
|
+
*
|
|
3319
|
+
* Specifies a summary, caption, or legend for a `<details>` element's disclosure box.
|
|
3320
|
+
* Clicking the `<summary>` element toggles the state of the parent `<details>` element open and closed.
|
|
3321
|
+
*
|
|
3322
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary
|
|
3323
|
+
*/
|
|
3324
|
+
summary: PropertiesOf<HTMLElement>;
|
|
3325
|
+
/**
|
|
3326
|
+
* The _Dialog_ element.
|
|
3327
|
+
*
|
|
3328
|
+
* Represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.
|
|
3329
|
+
*
|
|
3330
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
|
|
3331
|
+
*/
|
|
3332
|
+
dialog: HTMLDialogElementProps;
|
|
3333
|
+
}
|
|
3334
|
+
interface HTMLDetailsElementProps extends PropertiesOf<HTMLDetailsElement> {
|
|
3335
|
+
/**
|
|
3336
|
+
* Indicates whether the contents of the <details> element are currently visible.
|
|
3337
|
+
* The details are shown when this attribute is true, hidden when false.
|
|
3338
|
+
*
|
|
3339
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
3340
|
+
*/
|
|
3341
|
+
open?: OptionalProperty<boolean>;
|
|
3342
|
+
/**
|
|
3343
|
+
* The `toggle` event is fired when the `open`/`closed` state of a `<details>` element is toggled.
|
|
3344
|
+
*
|
|
3345
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement/toggle_event
|
|
3346
|
+
*/
|
|
3347
|
+
ontoggle?: OptionalProperty<EventHandler<Event>>;
|
|
3348
|
+
/**
|
|
3349
|
+
* The `toggle` event is fired when the `open`/`closed` state of a `<details>` element is toggled.
|
|
3350
|
+
*
|
|
3351
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement/toggle_event
|
|
3352
|
+
*/
|
|
3353
|
+
onToggle?: OptionalProperty<EventHandler<Event>>;
|
|
3354
|
+
}
|
|
3355
|
+
interface HTMLDialogElementProps extends PropertiesOf<HTMLDialogElement> {
|
|
3356
|
+
/**
|
|
3357
|
+
* Indicates that the dialog is active and can be interacted with. When the `open` attribute is not set, the dialog
|
|
3358
|
+
* shouldn't be shown to the user. It is recommended to use the `.show()` or `.showModal()` methods to render dialogs,
|
|
3359
|
+
* rather than the `open` attribute.
|
|
3360
|
+
*/
|
|
3361
|
+
open?: OptionalProperty<boolean>;
|
|
3362
|
+
}
|
|
3363
|
+
export interface IntrinsicElements {
|
|
3364
|
+
/**
|
|
3365
|
+
* The _Graphics Canvas_ element.
|
|
3366
|
+
*
|
|
3367
|
+
* Use it with either the [canvas scripting API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API)
|
|
3368
|
+
* or the [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) to draw graphics and animations.
|
|
3369
|
+
*
|
|
3370
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas
|
|
3371
|
+
*/
|
|
3372
|
+
canvas: HTMLCanvasElementProps;
|
|
3373
|
+
}
|
|
3374
|
+
interface HTMLCanvasElementProps extends PropertiesOf<HTMLCanvasElement> {
|
|
3375
|
+
/**
|
|
3376
|
+
* The width of the coordinate space in CSS pixels. Defaults to 300.
|
|
3377
|
+
*
|
|
3378
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#attributes
|
|
3379
|
+
*/
|
|
3380
|
+
width?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3381
|
+
/**
|
|
3382
|
+
* The height of the coordinate space in CSS pixels. Defaults to 150.
|
|
3383
|
+
*
|
|
3384
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#attributes
|
|
3385
|
+
*/
|
|
3386
|
+
height?: OptionalProperty<string | number> | OptionalProperty<string> | OptionalProperty<number>;
|
|
3387
|
+
}
|
|
3388
|
+
export {};
|