dothtml-interfaces 0.1.2 → 0.1.4

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/src/i-dot.d.ts ADDED
@@ -0,0 +1,817 @@
1
+
2
+ import IComponent, { FrameworkItems } from "./i-component";
3
+ import IDotCss, { IDotcssProp } from "./i-dot-css";
4
+ import IEventBus from "./i-event-bus";
5
+
6
+ type DotContentPrimitive = string|number|boolean;
7
+ type DotContentBasic = DotContentPrimitive|Node|Element|NodeList|IComponent|IDotDocument//typeof DotDocument;
8
+ export type DotContent = DotContentBasic|Array<DotContent>|(()=>DotContent);
9
+
10
+ // Global interface containing elements:
11
+ export interface IDotDocument
12
+ {
13
+ // Creating a blank DotDocument.
14
+ (document?: Element, classPrefix?: number): void;
15
+
16
+ // Internal use only:
17
+ _appendOrCreateDocument(content: DotContent, parentEl?: Element, beforeNode?: Node|number);
18
+
19
+ // Main functions.
20
+ // TODO: please make this into a test case.
21
+ /**
22
+ * Cast any document to any other element type. This can be used to access attributes when dotHTML doesn't know the type.
23
+ * @example
24
+ * dot("#my-input").as(dot.input).value("Hello, world!")
25
+ * @example
26
+ * dot.h("<a>Click me!</a>").as(dot.a).hRef("https://dothtml.com/")
27
+ */
28
+ as<T extends IDotDocument>(dotElement: (...props: any[])=>T): T;
29
+ /**
30
+ * Creates a custom element.
31
+ */
32
+ el(tag: string, content?: DotContent): IDotElementDocument<IDotGenericElement>
33
+
34
+ // Special "tags"
35
+ /**
36
+ * Creates a generic HTML node that can render a string, HTML nodes, or dotHTML content.
37
+ */
38
+ h(content?: DotContent): IDotDocument;
39
+ /**
40
+ * Creates a text node that will render as a string, rather than being parsed as markup.
41
+ */
42
+ t(content?: any): IDotA;
43
+ /**
44
+ * Iterates n times, appending the result of each iteration to the VDBO.
45
+ * @param n The number of iterations.
46
+ * @param callback The markup-generating callback.
47
+ */
48
+ iterate(n: number, callback: (i: number)=>DotContent): IDotDocument;
49
+ each<T>(a: Array<T>|(()=>Array<T>)|{[key: string]: T}, callback: (x: T, i: number|string)=>DotContent): IDotDocument;
50
+
51
+ /**
52
+ * Removes the targeted document and everything in it.
53
+ */
54
+ remove(): void;
55
+ /**
56
+ * Get the last HTML element added to the targeted document.
57
+ */
58
+ getLast(): HTMLElement;
59
+ /**
60
+ * Deletes each element within the targeted document.
61
+ */
62
+ empty(): IDotDocument;
63
+
64
+ /**
65
+ * Executes a function immediately.
66
+ */
67
+ script(callback: Function): IDotDocument;
68
+ /**
69
+ * A conditional function, analogous to if. Renders the specified DOT if a condition is met. Dynamic binding is possible when condition and callback are functions.
70
+ */
71
+ when(condition:(()=>boolean)|boolean, callback: (()=>void)|DotContent): IDotDocument;
72
+ /**
73
+ * A conditional catch, analogous to else if. Can be used after a when function. Evaluates if the previous when's condition was false.
74
+ * Renders the specified DOT if a condition is met. Dynamic binding is possible when condition and callback are functions.
75
+ */
76
+ otherwiseWhen(condition:(()=>boolean)|boolean, callback: (()=>void)|DotContent): IDotDocument;
77
+ /**
78
+ * A conditional final catch, analogous to else. Can be used after a when or otherwiseWhen function. Evaluates if the previous when/otherwiseWhen evaluated to false.
79
+ * Renders the specified DOT if a condition is met. Dynamic binding is possible when callback is a function.
80
+ */
81
+ otherwise(callback: (()=>void)|DotContent): IDotDocument;
82
+
83
+ scopeClass(prefix: number|string|null, content: DotContent): IDotDocument;
84
+
85
+ wait(timeout, callback);
86
+ defer(callback);
87
+
88
+ // Tags.
89
+ a(content?: DotContent): IDotA;
90
+
91
+ aside(content?: DotContent): IDotElementDocument<IDotGenericElement>;
92
+ abbr(content?: DotContent): IDotElementDocument<IDotGenericElement>;
93
+ address(content?: DotContent): IDotElementDocument<IDotGenericElement>;
94
+
95
+ area(content?: DotContent): IDotArea;
96
+
97
+ article(content?: DotContent): IDotElementDocument<IDotGenericElement>;
98
+
99
+ audio(content?: DotContent): IDotAudio;
100
+
101
+ b(content?: DotContent): IDotElementDocument<IDotGenericElement>;
102
+ bdi(content?: DotContent): IDotElementDocument<IDotGenericElement>;
103
+ bdo(content?: DotContent): IDotElementDocument<IDotGenericElement>;
104
+
105
+ blockQuote(content?: DotContent): IDotBlockQuote;
106
+ body(content?: DotContent): IDotBody; // This shouldn't really be used - if it is, then it should have the custom behavior of rewriting the existing document body, rather than adding a second one.
107
+ br(content?: DotContent): IDotBr;
108
+ button(content?: DotContent): IDotButton;
109
+ canvas(content?: DotContent): IDotCanvas;
110
+
111
+ caption(content?: DotContent): IDotElementDocument<IDotGenericElement>;
112
+ cite(content?: DotContent): IDotElementDocument<IDotGenericElement>;
113
+ code(content?: DotContent): IDotElementDocument<IDotGenericElement>;
114
+
115
+ col(content?: DotContent): IDotCol;
116
+ colGroup(content?: DotContent): IDotColGroup;
117
+
118
+ content(content?: DotContent): IDotElementDocument<IDotGenericElement>;
119
+ data(content?: DotContent): IDotElementDocument<IDotGenericElement>;
120
+ dataList(content?: DotContent): IDotElementDocument<IDotGenericElement>;
121
+ dd(content?: DotContent): IDotElementDocument<IDotGenericElement>;
122
+
123
+ del(content?: DotContent): IDotDel;
124
+ details(content?: DotContent): IDotDetails;
125
+
126
+ dfn(content?: DotContent): IDotElementDocument<IDotGenericElement>;
127
+ dialog(content?: DotContent): IDotElementDocument<IDotGenericElement>;
128
+ div(content?: DotContent): IDotElementDocument<IDotGenericElement>;
129
+ dl(content?: DotContent): IDotElementDocument<IDotGenericElement>;
130
+ dt(content?: DotContent): IDotElementDocument<IDotGenericElement>;
131
+ em(content?: DotContent): IDotElementDocument<IDotGenericElement>;
132
+
133
+ embed(content?: DotContent): IDotEmbed;
134
+ fieldSet(content?: DotContent): IDotFieldSet;
135
+
136
+ figCaption(content?: DotContent): IDotElementDocument<IDotGenericElement>;
137
+ figure(content?: DotContent): IDotElementDocument<IDotGenericElement>;
138
+ footer(content?: DotContent): IDotElementDocument<IDotGenericElement>;
139
+
140
+ form(content?: DotContent): IDotForm;
141
+
142
+ h1(content?: DotContent): IDotElementDocument<IDotGenericElement>;
143
+ h2(content?: DotContent): IDotElementDocument<IDotGenericElement>;
144
+ h3(content?: DotContent): IDotElementDocument<IDotGenericElement>;
145
+ h4(content?: DotContent): IDotElementDocument<IDotGenericElement>;
146
+ h5(content?: DotContent): IDotElementDocument<IDotGenericElement>;
147
+ h6(content?: DotContent): IDotElementDocument<IDotGenericElement>;
148
+ header(content?: DotContent): IDotElementDocument<IDotGenericElement>;
149
+
150
+ hr(content?: DotContent): IDotHr;
151
+
152
+ i(content?: DotContent): IDotElementDocument<IDotGenericElement>;
153
+
154
+ iFrame(content?: DotContent): IDotIFrame;
155
+ img(content?: DotContent): IDotImg;
156
+ input(content?: DotContent): IDotInput;
157
+ ins(content?: DotContent): IDotIns;
158
+
159
+ kbd(content?: DotContent): IDotElementDocument<IDotGenericElement>;
160
+
161
+ keyGen(content?: DotContent): IDotKeyGen;
162
+ label(content?: DotContent): IDotLabel;
163
+
164
+ legend(content?: DotContent): IDotElementDocument<IDotGenericElement>;
165
+
166
+ li(content?: DotContent): IDotLi;
167
+
168
+ main(content?: DotContent): IDotElementDocument<IDotGenericElement>;
169
+
170
+ map(content?: DotContent): IDotMap;
171
+
172
+ mark(content?: DotContent): IDotElementDocument<IDotGenericElement>;
173
+
174
+ menu(content?: DotContent): IDotMenu;
175
+ meter(content?: DotContent): IDotMeter;
176
+
177
+ nav(content?: DotContent): IDotElementDocument<IDotGenericElement>;
178
+
179
+ object(content?: DotContent): IDotObject;
180
+ ol(content?: DotContent): IDotOl;
181
+ optGroup(content?: DotContent): IDotOptGroup;
182
+ option(content?: DotContent): IDotOption;
183
+ output(content?: DotContent): IDotOutput;
184
+
185
+ p(content?: DotContent): IDotElementDocument<IDotGenericElement>;
186
+
187
+ param(content?: DotContent): IDotParam;
188
+
189
+ pre(content?: DotContent): IDotElementDocument<IDotGenericElement>;
190
+
191
+ progress(content?: DotContent): IDotProgress;
192
+ q(content?: DotContent): IDotQ;
193
+
194
+ rp(content?: DotContent): IDotElementDocument<IDotGenericElement>;
195
+ rt(content?: DotContent): IDotElementDocument<IDotGenericElement>;
196
+ ruby(content?: DotContent): IDotElementDocument<IDotGenericElement>;
197
+ s(content?: DotContent): IDotElementDocument<IDotGenericElement>;
198
+ samp(content?: DotContent): IDotElementDocument<IDotGenericElement>;
199
+ section(content?: DotContent): IDotElementDocument<IDotGenericElement>;
200
+
201
+ select(content?: DotContent): IDotSelect;
202
+
203
+ small(content?: DotContent): IDotElementDocument<IDotGenericElement>;
204
+
205
+ source(content?: DotContent): IDotSource;
206
+
207
+ span(content?: DotContent): IDotElementDocument<IDotGenericElement>;
208
+ strong(content?: DotContent): IDotElementDocument<IDotGenericElement>;
209
+ svg(content?: DotContent): IDotElementDocument<IDotGenericElement>;
210
+ sub(content?: DotContent): IDotElementDocument<IDotGenericElement>;
211
+ summary(content?: DotContent): IDotElementDocument<IDotGenericElement>;
212
+ sup(content?: DotContent): IDotElementDocument<IDotGenericElement>;
213
+
214
+ table(content?: DotContent): IDotTable;
215
+ tBody(content?: DotContent): IDotTBody;
216
+ td(content?: DotContent): IDotTd;
217
+ textArea(content?: DotContent): IDotTextArea;
218
+ tFoot(content?: DotContent): IDotTFoot;
219
+ th(content?: DotContent): IDotTh;
220
+ tHead(content?: DotContent): IDotTHead;
221
+ time(content?: DotContent): IDotTime;
222
+ tr(content?: DotContent): IDotTr;
223
+ track(content?: DotContent): IDotTrack;
224
+
225
+ u(content?: DotContent): IDotElementDocument<IDotGenericElement>;
226
+ ul(content?: DotContent): IDotElementDocument<IDotGenericElement>;
227
+ var(content?: DotContent): IDotElementDocument<IDotGenericElement>;
228
+
229
+ video(content?: DotContent): IDotVideo;
230
+
231
+ wbr(content?: DotContent): IDotElementDocument<IDotGenericElement>;
232
+ }
233
+
234
+ // Interface for the dot object:
235
+ export interface IDotCore extends IDotDocument
236
+ {
237
+ (targetSelector: string|Element|Node|NodeList|Array<Node|Element>): IDotElementDocument<IDotGenericElement>;
238
+
239
+ version: string;
240
+
241
+ navigate(path: string, noHistory?: boolean, force?: boolean): void;
242
+ css: IDotCss;
243
+ bus: IEventBus;
244
+
245
+ component<T extends {new(...args: any[]): (IComponent)}>(ComponentClass: T): T&{new(...args: any[]): ({$: FrameworkItems})};
246
+
247
+ /**
248
+ * DOThtml's component factory. Use it to create component classes.
249
+ */
250
+ component(callback: (
251
+ ({
252
+ html: IDotDocument,
253
+ css: IDotCss,
254
+ $: IComponentInternal
255
+ })=>new (...args: any[])=>IComponent
256
+ )): (new (...args: any[]) => IComponent);
257
+ // component(component: typeof Component): void;
258
+ // removeComponent = removeComponent;
259
+ }
260
+
261
+ /**
262
+ * Public interface indicating the return type of the Component builder method. Represents any VDBO containing an element.
263
+ * The VDBO returned by Component builder method must contain exactly one element.
264
+ */
265
+ export interface IDotElement extends IDotElementDocument<IDotGenericElement>{}
266
+
267
+ // Attribute interface (for all elements):
268
+ export interface IDotElementDocument<T extends IDotDocument> extends IDotDocument
269
+ {
270
+ // (document?: Element, classPrefix?: number): IDotElement;
271
+ // TODO: consider allowing a function that passes in the container for the previous element to allow adding attributes to it.
272
+ // TODO: I'd really like to enable this. Unfortunately it's not terribly easy to implement.
273
+ // Might be impossible in ES5 (notwithstanding some possible hackery).
274
+ //(content?: DotContent): IDotElementDocument<IDotGenericElement>;
275
+
276
+ // TODO: this will erase element context, which could be a bug.
277
+ // It can be duplicated multiple times below, or find a new solution.
278
+ /**
279
+ * Create a custom attribute.
280
+ */
281
+ attr(name: string, value: unknown, arg3?: unknown): T;
282
+ /**
283
+ * Adds a data-<suffix> attribute to the current element which can contain custom data.
284
+ */
285
+ customData(suffix: string, value: DotContentPrimitive): T;
286
+ /**
287
+ * Create a named reference to the current element so that it can be accessed within the current component.
288
+ */
289
+ ref(name: string, index?:number): T;
290
+
291
+ // TODO: move to specific elements.
292
+ /** @deprecated Deprecated in HTML5. Use CSS. */
293
+ bgColor(value: unknown): T;
294
+ /** @deprecated Deprecated in HTML5. Use CSS. */
295
+ color(value: unknown): T;
296
+ /** @deprecated Deprecated in HTML5. Use CSS. */
297
+ aLink(value: unknown): T;
298
+ /** @deprecated Deprecated in HTML5. Use CSS. */
299
+ archive(value: unknown): T;
300
+ // Only add this if we decide to add the search element.
301
+ // /** @deprecated Non-standard attribute. */
302
+ // autoSave(value: unknown): IDotMajor;
303
+
304
+ accessKey(value: unknown): T;
305
+ class(value: unknown): T;
306
+ contentEditable(value: unknown): T;
307
+ dir(value: unknown): T;
308
+ draggable(value: unknown): T;
309
+ dropZone(value: "move"|"copy"|"link"): T; // Might not be supported anywhere.
310
+ hidden(value: unknown): T;
311
+ id(value: unknown): T;
312
+ itemProp(value: unknown): T;
313
+ lang(value: unknown): T;
314
+ spellCheck(value: unknown): T;
315
+ style(value: string|IDotcssProp): T;
316
+ tabIndex(value: unknown): T;
317
+ title(value: unknown): T;
318
+
319
+ // Events
320
+
321
+ onContextMenu(callback: (e: Event)=>void): T; // global
322
+ onCopy(callback: (e: Event)=>void): T; // global
323
+ onCut(callback: (e: Event)=>void): T; // global
324
+ onPagePaste(callback: (e: Event)=>void): T; // global
325
+
326
+ // TODO: Really really add:
327
+ onDrag(callback: (e: DragEvent)=>void): T; // global
328
+ onDragEnd(callback: (e: DragEvent)=>void): T; // global
329
+ onDragStart(callback: (e: DragEvent)=>void): T; // global
330
+ onDragEnter(callback: (e: DragEvent)=>void): T; // global
331
+ onDragOver(callback: (e: DragEvent)=>void): T; // global
332
+ onDragLeave(callback: (e: DragEvent)=>void): T; // global
333
+ onDrop(callback: (e: DragEvent)=>void): T; // global
334
+ onError(callback: (e: Event)=>void): T; // loading elements
335
+ onInvalid(callback: (e: DragEvent)=>void): T; // global
336
+ onMouseWheel(callback: (e: WheelEvent)=>void): T; // global
337
+ onWheel(callback: (e: WheelEvent)=>void): T; // global
338
+
339
+ // Configured.
340
+ onBlur(callback: (e: FocusEvent)=>void): T;
341
+ onChange(callback: (e: Event)=>void): T;
342
+ onClick(callback: (e: MouseEvent)=>void): T;
343
+ onDblClick(callback: (e: MouseEvent)=>void): T;
344
+ onFocus(callback: (e: FocusEvent)=>void): T;
345
+ onInput(callback: (e: InputEvent)=>void): T;
346
+ onKeyDown(callback: (e: KeyboardEvent)=>void): T;
347
+ onKeyPress(callback: (e: KeyboardEvent)=>void): T;
348
+ onKeyUp(callback: (e: KeyboardEvent)=>void): T;
349
+ onLoad(callback: (e: Event)=>void): T; // On specific resources only.
350
+ onMouseDown(callback: (e: MouseEvent)=>void): T;
351
+ onMouseEnter(callback: (e: MouseEvent)=>void): T;
352
+ onMouseLeave(callback: (e: MouseEvent)=>void): T;
353
+ onMouseMove(callback: (e: MouseEvent)=>void): T;
354
+ onMouseOut(callback: (e: MouseEvent)=>void): T;
355
+ onMouseOver(callback: (e: MouseEvent)=>void): T;
356
+ onMouseUp(callback: (e: MouseEvent)=>void): T;
357
+ onPointerCancel(callback: (e: PointerEvent)=>void): T;
358
+ onPointerDown(callback: (e: PointerEvent)=>void): T;
359
+ onPointerEnter(callback: (e: PointerEvent)=>void): T;
360
+ onPointerLeave(callback: (e: PointerEvent)=>void): T;
361
+ onPointerMove(callback: (e: PointerEvent)=>void): T;
362
+ onPointerOut(callback: (e: PointerEvent)=>void): T;
363
+ onPointerOver(callback: (e: PointerEvent)=>void): T;
364
+ onPointerUp(callback: (e: PointerEvent)=>void): T;
365
+
366
+ onTouchMove(callback: (e: TouchEvent)=>void): T;
367
+ onTouchCancel(callback: (e: TouchEvent)=>void): T;
368
+ onTouchEnd(callback: (e: TouchEvent)=>void): T;
369
+ onTouchStart(callback: (e: TouchEvent)=>void): T;
370
+
371
+ onReset(callback: (e: Event)=>void): T;
372
+ onScroll(callback: (e: MouseEvent)=>void): T;
373
+ onSelect(callback: (e: Event)=>void): T;
374
+ onSubmit(callback: (e: SubmitEvent)=>void): T;
375
+ onUnload(callback: (e: Event)=>void): T;
376
+ }
377
+
378
+ export interface IDotGenericElement extends IDotElementDocument<IDotGenericElement>{}
379
+
380
+ // Interface for specific elements:
381
+ interface IDotA extends IDotElementDocument<IDotA>{
382
+ download(value: unknown): IDotA;
383
+ hRef(value: unknown): IDotA;
384
+ hRefLang(value: unknown): IDotA;
385
+ media(value: unknown): IDotA;
386
+ ping(value: unknown): IDotA;
387
+ rel(value: unknown): IDotA;
388
+ rev(value: unknown): IDotA;
389
+ target(value: unknown): IDotA;
390
+ type(value: unknown): IDotA;
391
+ }
392
+ interface IDotArea extends IDotElementDocument<IDotArea>{
393
+ alt(value: unknown): IDotArea;
394
+ coords(value: unknown): IDotArea;
395
+ download(value: unknown): IDotArea;
396
+ hRef(value: unknown): IDotArea;
397
+ hRefLang(value: unknown): IDotArea;
398
+ media(value: unknown): IDotArea;
399
+ noHRef(value: unknown): IDotArea;
400
+ rel(value: unknown): IDotArea;
401
+ shape(value: unknown): IDotArea;
402
+ target(value: unknown): IDotArea;
403
+ }
404
+ interface IDotAudio extends IDotElementDocument<IDotAudio>{
405
+ autoPlay(value: unknown): IDotAudio;
406
+ buffered(value: unknown): IDotAudio;
407
+ controls(value: unknown): IDotAudio;
408
+ loop(value: unknown): IDotAudio;
409
+ muted(value: unknown): IDotAudio;
410
+ preload(value: unknown): IDotAudio;
411
+ src(value: unknown): IDotAudio;
412
+
413
+ // Special functions:
414
+ pause(): IDotAudio;
415
+ play(): IDotAudio;
416
+ stop(): IDotAudio;
417
+
418
+ // Events:
419
+ onAbort(callback: (e: Event)=>void): IDotAudio;
420
+ onCantPlayThrough(callback: (e: Event)=>void): IDotAudio;
421
+ onDurationChange(callback: (e: Event)=>void): IDotAudio;
422
+ onEmptied(callback: (e: Event)=>void): IDotAudio;
423
+ onEnded(callback: (e: Event)=>void): IDotAudio;
424
+ onLoadedData(callback: (e: Event)=>void): IDotAudio;
425
+ onLoadStart(callback: (e: Event)=>void): IDotAudio;
426
+ onLoadedMetadata(callback: (e: Event)=>void): IDotAudio;
427
+ onPause(callback: (e: Event)=>void): IDotAudio;
428
+ onPlay(callback: (e: Event)=>void): IDotAudio;
429
+ onPlaying(callback: (e: Event)=>void): IDotAudio;
430
+ onProgress(callback: (e: Event)=>void): IDotAudio;
431
+ onRateChange(callback: (e: Event)=>void): IDotAudio;
432
+ onSeeked(callback: (e: Event)=>void): IDotAudio;
433
+ onSeeking(callback: (e: Event)=>void): IDotAudio;
434
+ onStalled(callback: (e: Event)=>void): IDotAudio;
435
+ onSuspend(callback: (e: Event)=>void): IDotAudio;
436
+ onTimeUpdate(callback: (e: Event)=>void): IDotAudio;
437
+ onVolumeChange(callback: (e: Event)=>void): IDotAudio;
438
+ onWaiting(callback: (e: Event)=>void): IDotAudio;
439
+ onCanPlay(callback: (e: Event)=>void): IDotAudio;
440
+ }
441
+ interface IDotBlockQuote extends IDotElementDocument<IDotBlockQuote>{
442
+ quoteCite(value: unknown): IDotBlockQuote; // cite
443
+ }
444
+ interface IDotBody extends IDotElementDocument<IDotBody>{
445
+ /** @deprecated Deprecated in HTML5. Use CSS. */
446
+ align(value: unknown): IDotBody;
447
+ /** @deprecated Deprecated in HTML5. Use CSS. */
448
+ background(value: unknown): IDotBody;
449
+
450
+ // Events
451
+ onHashChange(callback: (e: Event)=>void): IDotBody;
452
+ onOffline(callback: (e: Event)=>void): IDotBody;
453
+ onOnline(callback: (e: Event)=>void): IDotBody;
454
+ onPageHide(callback: (e: Event)=>void): IDotBody;
455
+ onPageShow(callback: (e: Event)=>void): IDotBody;
456
+ onPopState(callback: (e: Event)=>void): IDotBody;
457
+ onResize(callback: (e: Event)=>void): IDotBody;
458
+ onStorage(callback: (e: Event)=>void): IDotBody;
459
+ }
460
+ interface IDotBr extends IDotElementDocument<IDotBr>{
461
+ /** @deprecated Deprecated in HTML5. Use CSS. */
462
+ clear(value: unknown): IDotBr;
463
+ }
464
+ interface IDotButton extends IDotElementDocument<IDotButton>{
465
+ autoFocus(value: unknown): IDotButton;
466
+ formAction(value: unknown): IDotButton;
467
+ disabled(value?: unknown): IDotButton;
468
+ name(value: unknown): IDotButton;
469
+ type(value: unknown): IDotButton;
470
+ whichForm(value: unknown): IDotButton; // form
471
+ value(value: unknown): IDotButton;
472
+ }
473
+ interface IDotCanvas extends IDotElementDocument<IDotCanvas>{
474
+ height(value: unknown): IDotCanvas;
475
+ width(value: unknown): IDotCanvas;
476
+ }
477
+ interface IDotCol extends IDotElementDocument<IDotCol>{
478
+ /** @deprecated Deprecated in HTML5. Use CSS. */
479
+ charOff(value: unknown): IDotCol;
480
+ colSpan(value: unknown): IDotCol; // span
481
+ vAlign(value: unknown): IDotCol;
482
+ }
483
+ interface IDotColGroup extends IDotElementDocument<IDotColGroup>{
484
+ /** @deprecated Deprecated in HTML5. Use CSS. */
485
+ charOff(value: unknown): IDotColGroup;
486
+ colSpan(value: unknown): IDotColGroup; // span
487
+ vAlign(value: unknown): IDotColGroup;
488
+ }
489
+ interface IDotDel extends IDotElementDocument<IDotDel>{
490
+ dateTime(value: unknown): IDotDel;
491
+ quoteCite(value: unknown): IDotDel; // cite
492
+ }
493
+ interface IDotDetails extends IDotElementDocument<IDotDetails>{
494
+ open(value: unknown): IDotDetails;
495
+
496
+ // Events:
497
+ onToggle (callback: (e: Event)=>void): IDotDetails;
498
+ }
499
+ interface IDotEmbed extends IDotElementDocument<IDotEmbed>{
500
+ height(value: unknown): IDotEmbed;
501
+ src(value: unknown): IDotEmbed;
502
+ type(value: unknown): IDotEmbed;
503
+ width(value: unknown): IDotEmbed;
504
+ }
505
+ interface IDotFieldSet extends IDotElementDocument<IDotFieldSet>{
506
+ disabled(value: unknown): IDotFieldSet;
507
+ name(value: unknown): IDotFieldSet;
508
+ whichForm(value: unknown): IDotFieldSet; // form
509
+ }
510
+ interface IDotForm extends IDotElementDocument<IDotForm>{
511
+ acceptCharset(value: unknown): IDotForm; // accept-charset
512
+ action(value: unknown): IDotForm;
513
+ autoComplete(value: unknown): IDotForm;
514
+ encType(value: unknown): IDotForm;
515
+ method(value: unknown): IDotForm;
516
+ name(value: unknown): IDotForm;
517
+ noValidate(value: boolean): IDotForm;
518
+ rel(value: unknown): IDotForm;
519
+ target(value: unknown): IDotForm;
520
+ }
521
+ interface IDotHr extends IDotElementDocument<IDotHr>{
522
+ noShade(value: unknown): IDotHr;
523
+ }
524
+ interface IDotIFrame extends IDotElementDocument<IDotIFrame>{
525
+ height(value: unknown): IDotIFrame;
526
+ longDesc(value: unknown): IDotIFrame;
527
+ marginHeight(value: unknown): IDotIFrame;
528
+ marginWidth(value: unknown): IDotIFrame;
529
+ name(value: unknown): IDotIFrame;
530
+ sandbox(value: unknown): IDotIFrame;
531
+ scrolling(value: unknown): IDotIFrame;
532
+ seamless(value: unknown): IDotIFrame;
533
+ src(value: unknown): IDotIFrame;
534
+ srcDoc(value: unknown): IDotIFrame;
535
+ width(value: unknown): IDotIFrame;
536
+ }
537
+ interface IDotImg extends IDotElementDocument<IDotImg>{
538
+ alt(value: unknown): IDotImg;
539
+ height(value: unknown): IDotImg;
540
+ /** @deprecated Deprecated in HTML5. Use CSS. */
541
+ hSpace(value: unknown): IDotImg;
542
+ isMap(value: unknown): IDotImg;
543
+ longDesc(value: unknown): IDotImg;
544
+ sizes(value: unknown): IDotImg;
545
+ src(value: unknown): IDotImg;
546
+ srcSet(value: unknown): IDotImg;
547
+ useMap(value: unknown): IDotImg;
548
+ width(value: unknown): IDotImg;
549
+ }
550
+ interface IDotInput extends IDotElementDocument<IDotInput>{
551
+ accept(value: unknown): IDotInput;
552
+ alt(value: unknown): IDotInput;
553
+ autoComplete(value: unknown): IDotInput;
554
+ autoFocus(value: unknown): IDotInput;
555
+ checked(value?: boolean): IDotInput;
556
+ dirName(value: unknown): IDotInput;
557
+ disabled(value: unknown): IDotInput;
558
+ formAction(value: unknown): IDotInput;
559
+ list(value: unknown): IDotInput;
560
+ max(value: unknown): IDotInput;
561
+ maxLength(value: unknown): IDotInput;
562
+ min(value: unknown): IDotInput;
563
+ multiple(value: unknown): IDotInput;
564
+ name(value: unknown): IDotInput;
565
+ pattern(value: unknown): IDotInput;
566
+ placeholder(value: unknown): IDotInput;
567
+ readOnly(value: unknown): IDotInput;
568
+ required(value: unknown): IDotInput;
569
+ size(value: unknown): IDotInput;
570
+ src(value: unknown): IDotInput;
571
+ step(value: unknown): IDotInput;
572
+ type(value: unknown): IDotInput;
573
+ whichForm(value: unknown): IDotInput; // form
574
+ value(value: unknown): IDotInput;
575
+ width(value: unknown): IDotInput;
576
+
577
+ // Special functions:
578
+ bindTo(value: unknown): IDotInput;
579
+ getVal(): string
580
+ setVal(value: unknown): IDotInput;
581
+
582
+ // Input-specific events:
583
+ onSearch(callback: (e: Event)=>void): IDotInput;
584
+ }
585
+ interface IDotIns extends IDotElementDocument<IDotIns>{
586
+ dateTime(value: unknown): IDotIns;
587
+ quoteCite(value: unknown): IDotIns; // cite
588
+ }
589
+ interface IDotKeyGen extends IDotElementDocument<IDotKeyGen>{
590
+ challenge(value: unknown): IDotKeyGen;
591
+ keyType(value: unknown): IDotKeyGen;
592
+ }
593
+ interface IDotLabel extends IDotElementDocument<IDotLabel>{
594
+ for(value: unknown): IDotLabel;
595
+ whichForm(value: unknown): IDotLabel; // form
596
+ }
597
+ interface IDotLi extends IDotElementDocument<IDotLi>{
598
+ value(value: unknown): IDotLi;
599
+ }
600
+ interface IDotMap extends IDotElementDocument<IDotMap>{
601
+ name(value: unknown): IDotMap;
602
+ }
603
+ interface IDotMenu extends IDotElementDocument<IDotMenu>{
604
+ type(value: unknown): IDotMenu;
605
+ }
606
+ interface IDotMeter extends IDotElementDocument<IDotMeter>{
607
+ high(value: unknown): IDotMeter;
608
+ low(value: unknown): IDotMeter;
609
+ max(value: unknown): IDotMeter;
610
+ min(value: unknown): IDotMeter;
611
+ optimum(value: unknown): IDotMeter;
612
+ whichForm(value: unknown): IDotMeter; // form
613
+ value(value: unknown): IDotMeter;
614
+ }
615
+ interface IDotObject extends IDotElementDocument<IDotObject>{
616
+ classId(value: unknown): IDotObject;
617
+ codeBase(value: unknown): IDotObject;
618
+ codeType(value: unknown): IDotObject;
619
+ objectData(value: unknown): IDotObject; // data
620
+ declare(value: unknown): IDotObject;
621
+ height(value: unknown): IDotObject;
622
+ name(value: unknown): IDotObject;
623
+ standby(value: unknown): IDotObject;
624
+ type(value: unknown): IDotObject;
625
+ useMap(value: unknown): IDotObject;
626
+ whichForm(value: unknown): IDotObject; // form
627
+ width(value: unknown): IDotObject;
628
+ }
629
+ interface IDotOl extends IDotElementDocument<IDotOl>{
630
+ reversed(value: unknown): IDotOl;
631
+ start(value: unknown): IDotOl;
632
+ }
633
+ interface IDotOptGroup extends IDotElementDocument<IDotOptGroup>{
634
+ disabled(value: unknown): IDotOptGroup;
635
+ }
636
+ interface IDotOption extends IDotElementDocument<IDotOption>{
637
+ disabled(value: unknown): IDotOption;
638
+ optionLabel(value: unknown): IDotOption; // label
639
+ selected(value?: boolean): IDotOption;
640
+ value(value: unknown): IDotOption;
641
+
642
+ // Special functions:
643
+ bindTo(value: unknown): IDotOption;
644
+ getVal(): string;
645
+ setVal(value: unknown): IDotOption;
646
+ }
647
+ interface IDotOutput extends IDotElementDocument<IDotOutput>{
648
+ for(value: unknown): IDotOutput;
649
+ name(value: unknown): IDotOutput;
650
+ whichForm(value: unknown): IDotOutput; // form
651
+ }
652
+ interface IDotParam extends IDotElementDocument<IDotParam>{
653
+ name(value: unknown): IDotParam;
654
+ value(value: unknown): IDotParam;
655
+ valueType(value: unknown): IDotParam;
656
+ }
657
+ interface IDotProgress extends IDotElementDocument<IDotProgress>{
658
+ max(value: unknown): IDotProgress;
659
+ value(value: unknown): IDotProgress;
660
+ }
661
+ interface IDotQ extends IDotElementDocument<IDotQ>{
662
+ quoteCite(value: unknown): IDotQ; // cite
663
+ }
664
+ interface IDotSelect extends IDotElementDocument<IDotSelect>{
665
+ autoFocus(value: unknown): IDotSelect;
666
+ disabled(value: unknown): IDotSelect;
667
+ multiple(value: unknown): IDotSelect;
668
+ name(value: unknown): IDotSelect;
669
+ required(value: unknown): IDotSelect;
670
+ size(value: unknown): IDotSelect;
671
+ whichForm(value: unknown): IDotSelect; // form
672
+
673
+ // Special functions:
674
+ bindTo(value: unknown): IDotSelect;
675
+ getVal(): string;
676
+ setVal(value: unknown): IDotSelect;
677
+ }
678
+ interface IDotSource extends IDotElementDocument<IDotSource>{
679
+ media(value: unknown): IDotSource;
680
+ src(value: unknown): IDotSource;
681
+ type(value: unknown): IDotSource;
682
+ sizes(value: unknown): IDotSource;
683
+ src(value: unknown): IDotSource;
684
+ srcSet(value: unknown): IDotSource;
685
+ type(value: unknown): IDotSource;
686
+ }
687
+ interface IDotTable extends IDotElementDocument<IDotTable>{
688
+ /** @deprecated Deprecated in HTML5. Use CSS. */
689
+ border(value: unknown): IDotTable;
690
+ /** @deprecated Deprecated in HTML5. Use CSS. */
691
+ cellPadding(value: unknown): IDotTable;
692
+ /** @deprecated Deprecated in HTML5. Use CSS. */
693
+ cellSpacing(value: unknown): IDotTable;
694
+ /** @deprecated Deprecated in HTML5. Use CSS. */
695
+ frame(value: unknown): IDotTable;
696
+ rules(value: unknown): IDotTable;
697
+ tableSummary(value: unknown): IDotTable; // summary
698
+ }
699
+ interface IDotTextArea extends IDotElementDocument<IDotTextArea>{
700
+ autoFocus(value: unknown): IDotTextArea;
701
+ cols(value: unknown): IDotTextArea;
702
+ dirName(value: unknown): IDotTextArea;
703
+ disabled(value: unknown): IDotTextArea;
704
+ maxLength(value: unknown): IDotTextArea;
705
+ name(value: unknown): IDotTextArea;
706
+ placeholder(value: unknown): IDotTextArea;
707
+ readOnly(value: unknown): IDotTextArea;
708
+ required(value: unknown): IDotTextArea;
709
+ rows(value: unknown): IDotTextArea;
710
+ whichForm(value: unknown): IDotTextArea; // form
711
+ wrap(value: unknown): IDotTextArea;
712
+
713
+ // Special functions:
714
+ bindTo(value: unknown): IDotTextArea;
715
+ getVal(): string;
716
+ setVal(value: unknown): IDotTextArea;
717
+ }
718
+ interface IDotTBody extends IDotElementDocument<IDotTBody>{
719
+ /** @deprecated Deprecated in HTML5. Use CSS. */
720
+ charOff(value: unknown): IDotTBody;
721
+ vAlign(value: unknown): IDotTBody;
722
+ }
723
+ interface IDotTd extends IDotElementDocument<IDotTd>{
724
+
725
+ /** @deprecated Deprecated in HTML5. Use CSS. */
726
+ axis(value: unknown): IDotTd;
727
+ /** @deprecated Deprecated in HTML5. Use CSS. */
728
+ char(value: unknown): IDotTd;
729
+ colSpan(value: unknown): IDotTd;
730
+ /** @deprecated Deprecated in HTML5. Use CSS. */
731
+ charOff(value: unknown): IDotTd;
732
+ headers(value: unknown): IDotTd;
733
+ /** @deprecated Deprecated in HTML5. Use CSS. */
734
+ nowrap(value: unknown): IDotTd;
735
+ rowSpan(value: unknown): IDotTd;
736
+ vAlign(value: unknown): IDotTd;
737
+
738
+ }
739
+ interface IDotTFoot extends IDotElementDocument<IDotTFoot>{
740
+ /** @deprecated Deprecated in HTML5. Use CSS. */
741
+ charOff(value: unknown): IDotTFoot;
742
+ vAlign(value: unknown): IDotTFoot;
743
+ }
744
+ interface IDotTime extends IDotElementDocument<IDotTime>{
745
+ dateTime(value: unknown): IDotTime;
746
+ }
747
+ interface IDotTh extends IDotElementDocument<IDotTh>{
748
+ /** @deprecated Deprecated in HTML5. Use CSS. */
749
+ axis(value: unknown): IDotTh;
750
+ colSpan(value: unknown): IDotTh;
751
+ /** @deprecated Deprecated in HTML5. Use CSS. */
752
+ charOff(value: unknown): IDotTh;
753
+ headers(value: unknown): IDotTh;
754
+ rowSpan(value: unknown): IDotTh;
755
+ scope(value: unknown): IDotTh;
756
+ vAlign(value: unknown): IDotTh;
757
+ }
758
+ interface IDotTHead extends IDotElementDocument<IDotTHead>{
759
+ /** @deprecated Deprecated in HTML5. Use CSS. */
760
+ charOff(value: unknown): IDotTHead;
761
+ vAlign(value: unknown): IDotTHead;
762
+ }
763
+ interface IDotTr extends IDotElementDocument<IDotTr>{
764
+ /** @deprecated Deprecated in HTML5. Use CSS. */
765
+ charOff(value: unknown): IDotTr;
766
+ vAlign(value: unknown): IDotTr;
767
+ }
768
+ interface IDotTrack extends IDotElementDocument<IDotTrack>{
769
+ default(value: unknown): IDotTrack;
770
+ kind(value: unknown): IDotTrack;
771
+ src(value: unknown): IDotTrack;
772
+ srcLang(value: unknown): IDotTrack;
773
+ trackLabel(value: unknown): IDotTrack; // label
774
+
775
+ // Events:
776
+ onCueChange(callback: (e: Event)=>void): IDotTrack;
777
+ }
778
+ interface IDotVideo extends IDotElementDocument<IDotVideo>{
779
+ autoPlay(value: unknown): IDotVideo;
780
+ buffered(value: unknown): IDotVideo;
781
+ controls(value: unknown): IDotVideo;
782
+ height(value: unknown): IDotVideo;
783
+ loop(value: unknown): IDotVideo;
784
+ muted(value: unknown): IDotVideo;
785
+ poster(value: unknown): IDotVideo;
786
+ preload(value: unknown): IDotVideo;
787
+ src(value: unknown): IDotVideo;
788
+ width(value: unknown): IDotVideo;
789
+
790
+ // Special functions:
791
+ pause(): IDotVideo;
792
+ play(): IDotVideo;
793
+ stop(): IDotVideo;
794
+
795
+ // Events:
796
+ onAbort(callback: (e: Event)=>void): IDotVideo;
797
+ onCantPlayThrough(callback: (e: Event)=>void): IDotVideo;
798
+ onDurationChange(callback: (e: Event)=>void): IDotVideo;
799
+ onEmptied(callback: (e: Event)=>void): IDotVideo;
800
+ onEnded(callback: (e: Event)=>void): IDotVideo;
801
+ onLoadedData(callback: (e: Event)=>void): IDotVideo;
802
+ onLoadStart(callback: (e: Event)=>void): IDotVideo;
803
+ onLoadedMetadata(callback: (e: Event)=>void): IDotVideo;
804
+ onPause(callback: (e: Event)=>void): IDotVideo;
805
+ onPlay(callback: (e: Event)=>void): IDotVideo;
806
+ onPlaying(callback: (e: Event)=>void): IDotVideo;
807
+ onProgress(callback: (e: Event)=>void): IDotVideo;
808
+ onRateChange(callback: (e: Event)=>void): IDotVideo;
809
+ onSeeked(callback: (e: Event)=>void): IDotVideo;
810
+ onSeeking(callback: (e: Event)=>void): IDotVideo;
811
+ onStalled(callback: (e: Event)=>void): IDotVideo;
812
+ onSuspend(callback: (e: Event)=>void): IDotVideo;
813
+ onTimeUpdate(callback: (e: Event)=>void): IDotVideo;
814
+ onVolumeChange(callback: (e: Event)=>void): IDotVideo;
815
+ onWaiting(callback: (e: Event)=>void): IDotVideo;
816
+ onCanPlay(callback: (e: Event)=>void): IDotVideo;
817
+ }