1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace Teein\Html\Elements; |
5
|
|
|
|
6
|
|
|
use Teein\Html\Ast\NormalElement; |
7
|
|
|
use Teein\Html\Ast\RawTextElement; |
8
|
|
|
use Teein\Html\Ast\Text; |
9
|
|
|
use Teein\Html\Ast\TextElement; |
10
|
|
|
use Teein\Html\Ast\VoidElement; |
11
|
|
|
use Teein\Html\VirtualDom\Attribute; |
12
|
|
|
use Teein\Html\VirtualDom\Node; |
13
|
|
|
use Teein\Html\VirtualDom\Text as TextInterface; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @link https://html.spec.whatwg.org/#the-a-element |
17
|
|
|
*/ |
18
|
|
|
function a(Attribute ...$attributes) : callable |
19
|
|
|
{ |
20
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
21
|
1 |
|
return new NormalElement( |
22
|
1 |
|
'a', |
23
|
1 |
|
$attributes, |
24
|
1 |
|
$elements |
25
|
|
|
); |
26
|
1 |
|
}; |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @link https://html.spec.whatwg.org/#the-abbr-element |
31
|
|
|
*/ |
32
|
|
|
function abbr(Attribute ...$attributes) : callable |
33
|
|
|
{ |
34
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
35
|
1 |
|
return new NormalElement( |
36
|
1 |
|
'abbr', |
37
|
1 |
|
$attributes, |
38
|
1 |
|
$elements |
39
|
|
|
); |
40
|
1 |
|
}; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @link https://html.spec.whatwg.org/#the-address-element |
45
|
|
|
*/ |
46
|
|
|
function address(Attribute ...$attributes) : callable |
47
|
|
|
{ |
48
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
49
|
1 |
|
return new NormalElement( |
50
|
1 |
|
'address', |
51
|
1 |
|
$attributes, |
52
|
1 |
|
$elements |
53
|
|
|
); |
54
|
1 |
|
}; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @link https://html.spec.whatwg.org/#the-area-element |
59
|
|
|
*/ |
60
|
|
|
function area(Attribute ...$attributes) : VoidElement |
61
|
|
|
{ |
62
|
1 |
|
return new VoidElement( |
63
|
1 |
|
'area', |
64
|
1 |
|
$attributes |
65
|
|
|
); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @link https://html.spec.whatwg.org/#the-article-element |
70
|
|
|
*/ |
71
|
|
|
function article(Attribute ...$attributes) : callable |
72
|
|
|
{ |
73
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
74
|
1 |
|
return new NormalElement( |
75
|
1 |
|
'article', |
76
|
1 |
|
$attributes, |
77
|
1 |
|
$elements |
78
|
|
|
); |
79
|
1 |
|
}; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @link https://html.spec.whatwg.org/#the-aside-element |
84
|
|
|
*/ |
85
|
|
|
function aside(Attribute ...$attributes) : callable |
86
|
|
|
{ |
87
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
88
|
1 |
|
return new NormalElement( |
89
|
1 |
|
'aside', |
90
|
1 |
|
$attributes, |
91
|
1 |
|
$elements |
92
|
|
|
); |
93
|
1 |
|
}; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @link https://html.spec.whatwg.org/#the-audio-element |
98
|
|
|
*/ |
99
|
|
|
function audio(Attribute ...$attributes) : callable |
100
|
|
|
{ |
101
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
102
|
1 |
|
return new NormalElement( |
103
|
1 |
|
'audio', |
104
|
1 |
|
$attributes, |
105
|
1 |
|
$elements |
106
|
|
|
); |
107
|
1 |
|
}; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @link https://html.spec.whatwg.org/#the-b-element |
112
|
|
|
*/ |
113
|
|
|
function b(Attribute ...$attributes) : callable |
114
|
|
|
{ |
115
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
116
|
1 |
|
return new NormalElement( |
117
|
1 |
|
'b', |
118
|
1 |
|
$attributes, |
119
|
1 |
|
$elements |
120
|
|
|
); |
121
|
1 |
|
}; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @link https://html.spec.whatwg.org/#the-base-element |
126
|
|
|
*/ |
127
|
|
|
function base(Attribute ...$attributes) : VoidElement |
128
|
|
|
{ |
129
|
1 |
|
return new VoidElement( |
130
|
1 |
|
'base', |
131
|
1 |
|
$attributes |
132
|
|
|
); |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @link https://html.spec.whatwg.org/#the-bdi-element |
137
|
|
|
*/ |
138
|
|
|
function bdi(Attribute ...$attributes) : callable |
139
|
|
|
{ |
140
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
141
|
1 |
|
return new NormalElement( |
142
|
1 |
|
'bdi', |
143
|
1 |
|
$attributes, |
144
|
1 |
|
$elements |
145
|
|
|
); |
146
|
1 |
|
}; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* @link https://html.spec.whatwg.org/#the-bdo-element |
151
|
|
|
*/ |
152
|
|
|
function bdo(Attribute ...$attributes) : callable |
153
|
|
|
{ |
154
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
155
|
1 |
|
return new NormalElement( |
156
|
1 |
|
'bdo', |
157
|
1 |
|
$attributes, |
158
|
1 |
|
$elements |
159
|
|
|
); |
160
|
1 |
|
}; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @link https://html.spec.whatwg.org/#the-blockquote-element |
165
|
|
|
*/ |
166
|
|
|
function blockquote(Attribute ...$attributes) : callable |
167
|
|
|
{ |
168
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
169
|
1 |
|
return new NormalElement( |
170
|
1 |
|
'blockquote', |
171
|
1 |
|
$attributes, |
172
|
1 |
|
$elements |
173
|
|
|
); |
174
|
1 |
|
}; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @link https://html.spec.whatwg.org/#the-body-element |
179
|
|
|
*/ |
180
|
|
|
function body(Attribute ...$attributes) : callable |
181
|
|
|
{ |
182
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
183
|
1 |
|
return new NormalElement( |
184
|
1 |
|
'body', |
185
|
1 |
|
$attributes, |
186
|
1 |
|
$elements |
187
|
|
|
); |
188
|
1 |
|
}; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @link https://html.spec.whatwg.org/#the-br-element |
193
|
|
|
*/ |
194
|
|
|
function br(Attribute ...$attributes) : VoidElement |
195
|
|
|
{ |
196
|
1 |
|
return new VoidElement( |
197
|
1 |
|
'br', |
198
|
1 |
|
$attributes |
199
|
|
|
); |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @link https://html.spec.whatwg.org/#the-button-element |
204
|
|
|
*/ |
205
|
|
|
function button(Attribute ...$attributes) : callable |
206
|
|
|
{ |
207
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
208
|
1 |
|
return new NormalElement( |
209
|
1 |
|
'button', |
210
|
1 |
|
$attributes, |
211
|
1 |
|
$elements |
212
|
|
|
); |
213
|
1 |
|
}; |
214
|
|
|
} |
215
|
|
|
|
216
|
|
|
/** |
217
|
|
|
* @link https://html.spec.whatwg.org/#the-canvas-element |
218
|
|
|
*/ |
219
|
|
|
function canvas(Attribute ...$attributes) : callable |
220
|
|
|
{ |
221
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
222
|
1 |
|
return new NormalElement( |
223
|
1 |
|
'canvas', |
224
|
1 |
|
$attributes, |
225
|
1 |
|
$elements |
226
|
|
|
); |
227
|
1 |
|
}; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @link https://html.spec.whatwg.org/#the-caption-element |
232
|
|
|
*/ |
233
|
|
|
function caption(Attribute ...$attributes) : callable |
234
|
|
|
{ |
235
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
236
|
1 |
|
return new NormalElement( |
237
|
1 |
|
'caption', |
238
|
1 |
|
$attributes, |
239
|
1 |
|
$elements |
240
|
|
|
); |
241
|
1 |
|
}; |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @link https://html.spec.whatwg.org/#the-cite-element |
246
|
|
|
*/ |
247
|
|
|
function cite(Attribute ...$attributes) : callable |
248
|
|
|
{ |
249
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
250
|
1 |
|
return new NormalElement( |
251
|
1 |
|
'cite', |
252
|
1 |
|
$attributes, |
253
|
1 |
|
$elements |
254
|
|
|
); |
255
|
1 |
|
}; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @link https://html.spec.whatwg.org/#the-code-element |
260
|
|
|
*/ |
261
|
|
|
function code(Attribute ...$attributes) : callable |
262
|
|
|
{ |
263
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
264
|
1 |
|
return new NormalElement( |
265
|
1 |
|
'code', |
266
|
1 |
|
$attributes, |
267
|
1 |
|
$elements |
268
|
|
|
); |
269
|
1 |
|
}; |
270
|
|
|
} |
271
|
|
|
|
272
|
|
|
/** |
273
|
|
|
* @link https://html.spec.whatwg.org/#the-col-element |
274
|
|
|
*/ |
275
|
|
|
function col(Attribute ...$attributes) : VoidElement |
276
|
|
|
{ |
277
|
1 |
|
return new VoidElement( |
278
|
1 |
|
'col', |
279
|
1 |
|
$attributes |
280
|
|
|
); |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* @link https://html.spec.whatwg.org/#the-colgroup-element |
285
|
|
|
*/ |
286
|
|
|
function colgroup(Attribute ...$attributes) : callable |
287
|
|
|
{ |
288
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
289
|
1 |
|
return new NormalElement( |
290
|
1 |
|
'colgroup', |
291
|
1 |
|
$attributes, |
292
|
1 |
|
$elements |
293
|
|
|
); |
294
|
1 |
|
}; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* @link https://html.spec.whatwg.org/#the-data-element |
299
|
|
|
*/ |
300
|
|
|
function data(Attribute ...$attributes) : callable |
301
|
|
|
{ |
302
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
303
|
1 |
|
return new NormalElement( |
304
|
1 |
|
'data', |
305
|
1 |
|
$attributes, |
306
|
1 |
|
$elements |
307
|
|
|
); |
308
|
1 |
|
}; |
309
|
|
|
} |
310
|
|
|
|
311
|
|
|
/** |
312
|
|
|
* @link https://html.spec.whatwg.org/#the-datalist-element |
313
|
|
|
*/ |
314
|
|
|
function datalist(Attribute ...$attributes) : callable |
315
|
|
|
{ |
316
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
317
|
1 |
|
return new NormalElement( |
318
|
1 |
|
'datalist', |
319
|
1 |
|
$attributes, |
320
|
1 |
|
$elements |
321
|
|
|
); |
322
|
1 |
|
}; |
323
|
|
|
} |
324
|
|
|
|
325
|
|
|
/** |
326
|
|
|
* @link https://html.spec.whatwg.org/#the-dd-element |
327
|
|
|
*/ |
328
|
|
|
function dd(Attribute ...$attributes) : callable |
329
|
|
|
{ |
330
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
331
|
1 |
|
return new NormalElement( |
332
|
1 |
|
'dd', |
333
|
1 |
|
$attributes, |
334
|
1 |
|
$elements |
335
|
|
|
); |
336
|
1 |
|
}; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @link https://html.spec.whatwg.org/#the-del-element |
341
|
|
|
*/ |
342
|
|
|
function del(Attribute ...$attributes) : callable |
343
|
|
|
{ |
344
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
345
|
1 |
|
return new NormalElement( |
346
|
1 |
|
'del', |
347
|
1 |
|
$attributes, |
348
|
1 |
|
$elements |
349
|
|
|
); |
350
|
1 |
|
}; |
351
|
|
|
} |
352
|
|
|
|
353
|
|
|
/** |
354
|
|
|
* @link https://html.spec.whatwg.org/#the-details-element |
355
|
|
|
*/ |
356
|
|
|
function details(Attribute ...$attributes) : callable |
357
|
|
|
{ |
358
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
359
|
1 |
|
return new NormalElement( |
360
|
1 |
|
'details', |
361
|
1 |
|
$attributes, |
362
|
1 |
|
$elements |
363
|
|
|
); |
364
|
1 |
|
}; |
365
|
|
|
} |
366
|
|
|
|
367
|
|
|
/** |
368
|
|
|
* @link https://html.spec.whatwg.org/#the-dfn-element |
369
|
|
|
*/ |
370
|
|
|
function dfn(Attribute ...$attributes) : callable |
371
|
|
|
{ |
372
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
373
|
1 |
|
return new NormalElement( |
374
|
1 |
|
'dfn', |
375
|
1 |
|
$attributes, |
376
|
1 |
|
$elements |
377
|
|
|
); |
378
|
1 |
|
}; |
379
|
|
|
} |
380
|
|
|
|
381
|
|
|
/** |
382
|
|
|
* @link https://html.spec.whatwg.org/#the-dialog-element |
383
|
|
|
*/ |
384
|
|
|
function dialog(Attribute ...$attributes) : callable |
385
|
|
|
{ |
386
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
387
|
1 |
|
return new NormalElement( |
388
|
1 |
|
'dialog', |
389
|
1 |
|
$attributes, |
390
|
1 |
|
$elements |
391
|
|
|
); |
392
|
1 |
|
}; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* @link https://html.spec.whatwg.org/#the-div-element |
397
|
|
|
*/ |
398
|
|
|
function div(Attribute ...$attributes) : callable |
399
|
|
|
{ |
400
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
401
|
1 |
|
return new NormalElement( |
402
|
1 |
|
'div', |
403
|
1 |
|
$attributes, |
404
|
1 |
|
$elements |
405
|
|
|
); |
406
|
1 |
|
}; |
407
|
|
|
} |
408
|
|
|
|
409
|
|
|
/** |
410
|
|
|
* @link https://html.spec.whatwg.org/#the-dl-element |
411
|
|
|
*/ |
412
|
|
|
function dl(Attribute ...$attributes) : callable |
413
|
|
|
{ |
414
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
415
|
1 |
|
return new NormalElement( |
416
|
1 |
|
'dl', |
417
|
1 |
|
$attributes, |
418
|
1 |
|
$elements |
419
|
|
|
); |
420
|
1 |
|
}; |
421
|
|
|
} |
422
|
|
|
|
423
|
|
|
/** |
424
|
|
|
* @link https://html.spec.whatwg.org/#the-dt-element |
425
|
|
|
*/ |
426
|
|
|
function dt(Attribute ...$attributes) : callable |
427
|
|
|
{ |
428
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
429
|
1 |
|
return new NormalElement( |
430
|
1 |
|
'dt', |
431
|
1 |
|
$attributes, |
432
|
1 |
|
$elements |
433
|
|
|
); |
434
|
1 |
|
}; |
435
|
|
|
} |
436
|
|
|
|
437
|
|
|
/** |
438
|
|
|
* @link https://html.spec.whatwg.org/#the-em-element |
439
|
|
|
*/ |
440
|
|
|
function em(Attribute ...$attributes) : callable |
441
|
|
|
{ |
442
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
443
|
1 |
|
return new NormalElement( |
444
|
1 |
|
'em', |
445
|
1 |
|
$attributes, |
446
|
1 |
|
$elements |
447
|
|
|
); |
448
|
1 |
|
}; |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* @link https://html.spec.whatwg.org/#the-embed-element |
453
|
|
|
*/ |
454
|
|
|
function embed(Attribute ...$attributes) : VoidElement |
455
|
|
|
{ |
456
|
1 |
|
return new VoidElement( |
457
|
1 |
|
'embed', |
458
|
1 |
|
$attributes |
459
|
|
|
); |
460
|
|
|
} |
461
|
|
|
|
462
|
|
|
/** |
463
|
|
|
* @link https://html.spec.whatwg.org/#the-fieldset-element |
464
|
|
|
*/ |
465
|
|
|
function fieldset(Attribute ...$attributes) : callable |
466
|
|
|
{ |
467
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
468
|
1 |
|
return new NormalElement( |
469
|
1 |
|
'fieldset', |
470
|
1 |
|
$attributes, |
471
|
1 |
|
$elements |
472
|
|
|
); |
473
|
1 |
|
}; |
474
|
|
|
} |
475
|
|
|
|
476
|
|
|
/** |
477
|
|
|
* @link https://html.spec.whatwg.org/#the-figcaption-element |
478
|
|
|
*/ |
479
|
|
|
function figcaption(Attribute ...$attributes) : callable |
480
|
|
|
{ |
481
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
482
|
1 |
|
return new NormalElement( |
483
|
1 |
|
'figcaption', |
484
|
1 |
|
$attributes, |
485
|
1 |
|
$elements |
486
|
|
|
); |
487
|
1 |
|
}; |
488
|
|
|
} |
489
|
|
|
|
490
|
|
|
/** |
491
|
|
|
* @link https://html.spec.whatwg.org/#the-figure-element |
492
|
|
|
*/ |
493
|
|
|
function figure(Attribute ...$attributes) : callable |
494
|
|
|
{ |
495
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
496
|
1 |
|
return new NormalElement( |
497
|
1 |
|
'figure', |
498
|
1 |
|
$attributes, |
499
|
1 |
|
$elements |
500
|
|
|
); |
501
|
1 |
|
}; |
502
|
|
|
} |
503
|
|
|
|
504
|
|
|
/** |
505
|
|
|
* @link https://html.spec.whatwg.org/#the-footer-element |
506
|
|
|
*/ |
507
|
|
|
function footer(Attribute ...$attributes) : callable |
508
|
|
|
{ |
509
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
510
|
1 |
|
return new NormalElement( |
511
|
1 |
|
'footer', |
512
|
1 |
|
$attributes, |
513
|
1 |
|
$elements |
514
|
|
|
); |
515
|
1 |
|
}; |
516
|
|
|
} |
517
|
|
|
|
518
|
|
|
/** |
519
|
|
|
* @link https://html.spec.whatwg.org/#the-form-element |
520
|
|
|
*/ |
521
|
|
|
function form(Attribute ...$attributes) : callable |
522
|
|
|
{ |
523
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
524
|
1 |
|
return new NormalElement( |
525
|
1 |
|
'form', |
526
|
1 |
|
$attributes, |
527
|
1 |
|
$elements |
528
|
|
|
); |
529
|
1 |
|
}; |
530
|
|
|
} |
531
|
|
|
|
532
|
|
|
/** |
533
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
534
|
|
|
*/ |
535
|
|
|
function h1(Attribute ...$attributes) : callable |
536
|
|
|
{ |
537
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
538
|
1 |
|
return new NormalElement( |
539
|
1 |
|
'h1', |
540
|
1 |
|
$attributes, |
541
|
1 |
|
$elements |
542
|
|
|
); |
543
|
1 |
|
}; |
544
|
|
|
} |
545
|
|
|
|
546
|
|
|
/** |
547
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
548
|
|
|
*/ |
549
|
|
|
function h2(Attribute ...$attributes) : callable |
550
|
|
|
{ |
551
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
552
|
1 |
|
return new NormalElement( |
553
|
1 |
|
'h2', |
554
|
1 |
|
$attributes, |
555
|
1 |
|
$elements |
556
|
|
|
); |
557
|
1 |
|
}; |
558
|
|
|
} |
559
|
|
|
|
560
|
|
|
/** |
561
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
562
|
|
|
*/ |
563
|
|
|
function h3(Attribute ...$attributes) : callable |
564
|
|
|
{ |
565
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
566
|
1 |
|
return new NormalElement( |
567
|
1 |
|
'h3', |
568
|
1 |
|
$attributes, |
569
|
1 |
|
$elements |
570
|
|
|
); |
571
|
1 |
|
}; |
572
|
|
|
} |
573
|
|
|
|
574
|
|
|
/** |
575
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
576
|
|
|
*/ |
577
|
|
|
function h4(Attribute ...$attributes) : callable |
578
|
|
|
{ |
579
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
580
|
1 |
|
return new NormalElement( |
581
|
1 |
|
'h4', |
582
|
1 |
|
$attributes, |
583
|
1 |
|
$elements |
584
|
|
|
); |
585
|
1 |
|
}; |
586
|
|
|
} |
587
|
|
|
|
588
|
|
|
/** |
589
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
590
|
|
|
*/ |
591
|
|
|
function h5(Attribute ...$attributes) : callable |
592
|
|
|
{ |
593
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
594
|
1 |
|
return new NormalElement( |
595
|
1 |
|
'h5', |
596
|
1 |
|
$attributes, |
597
|
1 |
|
$elements |
598
|
|
|
); |
599
|
1 |
|
}; |
600
|
|
|
} |
601
|
|
|
|
602
|
|
|
/** |
603
|
|
|
* @link https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements |
604
|
|
|
*/ |
605
|
|
|
function h6(Attribute ...$attributes) : callable |
606
|
|
|
{ |
607
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
608
|
1 |
|
return new NormalElement( |
609
|
1 |
|
'h6', |
610
|
1 |
|
$attributes, |
611
|
1 |
|
$elements |
612
|
|
|
); |
613
|
1 |
|
}; |
614
|
|
|
} |
615
|
|
|
|
616
|
|
|
/** |
617
|
|
|
* @link https://html.spec.whatwg.org/#the-head-element |
618
|
|
|
*/ |
619
|
|
|
function head(Attribute ...$attributes) : callable |
620
|
|
|
{ |
621
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
622
|
1 |
|
return new NormalElement( |
623
|
1 |
|
'head', |
624
|
1 |
|
$attributes, |
625
|
1 |
|
$elements |
626
|
|
|
); |
627
|
1 |
|
}; |
628
|
|
|
} |
629
|
|
|
|
630
|
|
|
/** |
631
|
|
|
* @link https://html.spec.whatwg.org/#the-header-element |
632
|
|
|
*/ |
633
|
|
|
function header(Attribute ...$attributes) : callable |
634
|
|
|
{ |
635
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
636
|
1 |
|
return new NormalElement( |
637
|
1 |
|
'header', |
638
|
1 |
|
$attributes, |
639
|
1 |
|
$elements |
640
|
|
|
); |
641
|
1 |
|
}; |
642
|
|
|
} |
643
|
|
|
|
644
|
|
|
/** |
645
|
|
|
* @link https://html.spec.whatwg.org/#the-hgroup-element |
646
|
|
|
*/ |
647
|
|
|
function hgroup(Attribute ...$attributes) : callable |
648
|
|
|
{ |
649
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
650
|
1 |
|
return new NormalElement( |
651
|
1 |
|
'hgroup', |
652
|
1 |
|
$attributes, |
653
|
1 |
|
$elements |
654
|
|
|
); |
655
|
1 |
|
}; |
656
|
|
|
} |
657
|
|
|
|
658
|
|
|
/** |
659
|
|
|
* @link https://html.spec.whatwg.org/#the-hr-element |
660
|
|
|
*/ |
661
|
|
|
function hr(Attribute ...$attributes) : VoidElement |
662
|
|
|
{ |
663
|
1 |
|
return new VoidElement( |
664
|
1 |
|
'hr', |
665
|
1 |
|
$attributes |
666
|
|
|
); |
667
|
|
|
} |
668
|
|
|
|
669
|
|
|
/** |
670
|
|
|
* @link https://html.spec.whatwg.org/#the-html-element |
671
|
|
|
*/ |
672
|
|
|
function html(Attribute ...$attributes) : callable |
673
|
|
|
{ |
674
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
675
|
2 |
|
return new NormalElement( |
676
|
2 |
|
'html', |
677
|
2 |
|
$attributes, |
678
|
2 |
|
$elements |
679
|
|
|
); |
680
|
2 |
|
}; |
681
|
|
|
} |
682
|
|
|
|
683
|
|
|
/** |
684
|
|
|
* @link https://html.spec.whatwg.org/#the-i-element |
685
|
|
|
*/ |
686
|
|
|
function i(Attribute ...$attributes) : callable |
687
|
|
|
{ |
688
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
689
|
1 |
|
return new NormalElement( |
690
|
1 |
|
'i', |
691
|
1 |
|
$attributes, |
692
|
1 |
|
$elements |
693
|
|
|
); |
694
|
1 |
|
}; |
695
|
|
|
} |
696
|
|
|
|
697
|
|
|
/** |
698
|
|
|
* @link https://html.spec.whatwg.org/#the-iframe-element |
699
|
|
|
*/ |
700
|
|
|
function iframe(Attribute ...$attributes) : callable |
701
|
|
|
{ |
702
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
703
|
1 |
|
return new NormalElement( |
704
|
1 |
|
'iframe', |
705
|
1 |
|
$attributes, |
706
|
1 |
|
$elements |
707
|
|
|
); |
708
|
1 |
|
}; |
709
|
|
|
} |
710
|
|
|
|
711
|
|
|
/** |
712
|
|
|
* @link https://html.spec.whatwg.org/#the-img-element |
713
|
|
|
*/ |
714
|
|
|
function img(Attribute ...$attributes) : VoidElement |
715
|
|
|
{ |
716
|
1 |
|
return new VoidElement( |
717
|
1 |
|
'img', |
718
|
1 |
|
$attributes |
719
|
|
|
); |
720
|
|
|
} |
721
|
|
|
|
722
|
|
|
/** |
723
|
|
|
* @link https://html.spec.whatwg.org/#the-input-element |
724
|
|
|
*/ |
725
|
|
|
function input(Attribute ...$attributes) : VoidElement |
726
|
|
|
{ |
727
|
1 |
|
return new VoidElement( |
728
|
1 |
|
'input', |
729
|
1 |
|
$attributes |
730
|
|
|
); |
731
|
|
|
} |
732
|
|
|
|
733
|
|
|
/** |
734
|
|
|
* @link https://html.spec.whatwg.org/#the-ins-element |
735
|
|
|
*/ |
736
|
|
|
function ins(Attribute ...$attributes) : callable |
737
|
|
|
{ |
738
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
739
|
1 |
|
return new NormalElement( |
740
|
1 |
|
'ins', |
741
|
1 |
|
$attributes, |
742
|
1 |
|
$elements |
743
|
|
|
); |
744
|
1 |
|
}; |
745
|
|
|
} |
746
|
|
|
|
747
|
|
|
/** |
748
|
|
|
* @link https://html.spec.whatwg.org/#the-kbd-element |
749
|
|
|
*/ |
750
|
|
|
function kbd(Attribute ...$attributes) : callable |
751
|
|
|
{ |
752
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
753
|
1 |
|
return new NormalElement( |
754
|
1 |
|
'kbd', |
755
|
1 |
|
$attributes, |
756
|
1 |
|
$elements |
757
|
|
|
); |
758
|
1 |
|
}; |
759
|
|
|
} |
760
|
|
|
|
761
|
|
|
/** |
762
|
|
|
* @link https://html.spec.whatwg.org/#the-label-element |
763
|
|
|
*/ |
764
|
|
|
function label(Attribute ...$attributes) : callable |
765
|
|
|
{ |
766
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
767
|
1 |
|
return new NormalElement( |
768
|
1 |
|
'label', |
769
|
1 |
|
$attributes, |
770
|
1 |
|
$elements |
771
|
|
|
); |
772
|
1 |
|
}; |
773
|
|
|
} |
774
|
|
|
|
775
|
|
|
/** |
776
|
|
|
* @link https://html.spec.whatwg.org/#the-legend-element |
777
|
|
|
*/ |
778
|
|
|
function legend(Attribute ...$attributes) : callable |
779
|
|
|
{ |
780
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
781
|
1 |
|
return new NormalElement( |
782
|
1 |
|
'legend', |
783
|
1 |
|
$attributes, |
784
|
1 |
|
$elements |
785
|
|
|
); |
786
|
1 |
|
}; |
787
|
|
|
} |
788
|
|
|
|
789
|
|
|
/** |
790
|
|
|
* @link https://html.spec.whatwg.org/#the-li-element |
791
|
|
|
*/ |
792
|
|
|
function li(Attribute ...$attributes) : callable |
793
|
|
|
{ |
794
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
795
|
1 |
|
return new NormalElement( |
796
|
1 |
|
'li', |
797
|
1 |
|
$attributes, |
798
|
1 |
|
$elements |
799
|
|
|
); |
800
|
1 |
|
}; |
801
|
|
|
} |
802
|
|
|
|
803
|
|
|
/** |
804
|
|
|
* @link https://html.spec.whatwg.org/#the-link-element |
805
|
|
|
*/ |
806
|
|
|
function link(Attribute ...$attributes) : VoidElement |
807
|
|
|
{ |
808
|
1 |
|
return new VoidElement( |
809
|
1 |
|
'link', |
810
|
1 |
|
$attributes |
811
|
|
|
); |
812
|
|
|
} |
813
|
|
|
|
814
|
|
|
/** |
815
|
|
|
* @link https://html.spec.whatwg.org/#the-main-element |
816
|
|
|
*/ |
817
|
|
|
function main(Attribute ...$attributes) : callable |
818
|
|
|
{ |
819
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
820
|
1 |
|
return new NormalElement( |
821
|
1 |
|
'main', |
822
|
1 |
|
$attributes, |
823
|
1 |
|
$elements |
824
|
|
|
); |
825
|
1 |
|
}; |
826
|
|
|
} |
827
|
|
|
|
828
|
|
|
/** |
829
|
|
|
* @link https://html.spec.whatwg.org/#the-map-element |
830
|
|
|
*/ |
831
|
|
|
function map(Attribute ...$attributes) : callable |
832
|
|
|
{ |
833
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
834
|
1 |
|
return new NormalElement( |
835
|
1 |
|
'map', |
836
|
1 |
|
$attributes, |
837
|
1 |
|
$elements |
838
|
|
|
); |
839
|
1 |
|
}; |
840
|
|
|
} |
841
|
|
|
|
842
|
|
|
/** |
843
|
|
|
* @link https://html.spec.whatwg.org/#the-mark-element |
844
|
|
|
*/ |
845
|
|
|
function mark(Attribute ...$attributes) : callable |
846
|
|
|
{ |
847
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
848
|
1 |
|
return new NormalElement( |
849
|
1 |
|
'mark', |
850
|
1 |
|
$attributes, |
851
|
1 |
|
$elements |
852
|
|
|
); |
853
|
1 |
|
}; |
854
|
|
|
} |
855
|
|
|
|
856
|
|
|
/** |
857
|
|
|
* @link https://html.spec.whatwg.org/#the-menu-element |
858
|
|
|
*/ |
859
|
|
|
function menu(Attribute ...$attributes) : callable |
860
|
|
|
{ |
861
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
862
|
1 |
|
return new NormalElement( |
863
|
1 |
|
'menu', |
864
|
1 |
|
$attributes, |
865
|
1 |
|
$elements |
866
|
|
|
); |
867
|
1 |
|
}; |
868
|
|
|
} |
869
|
|
|
|
870
|
|
|
/** |
871
|
|
|
* @link https://html.spec.whatwg.org/#the-meta-element |
872
|
|
|
*/ |
873
|
|
|
function meta(Attribute ...$attributes) : VoidElement |
874
|
|
|
{ |
875
|
1 |
|
return new VoidElement( |
876
|
1 |
|
'meta', |
877
|
1 |
|
$attributes |
878
|
|
|
); |
879
|
|
|
} |
880
|
|
|
|
881
|
|
|
/** |
882
|
|
|
* @link https://html.spec.whatwg.org/#the-meter-element |
883
|
|
|
*/ |
884
|
|
|
function meter(Attribute ...$attributes) : callable |
885
|
|
|
{ |
886
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
887
|
1 |
|
return new NormalElement( |
888
|
1 |
|
'meter', |
889
|
1 |
|
$attributes, |
890
|
1 |
|
$elements |
891
|
|
|
); |
892
|
1 |
|
}; |
893
|
|
|
} |
894
|
|
|
|
895
|
|
|
/** |
896
|
|
|
* @link https://html.spec.whatwg.org/#the-nav-element |
897
|
|
|
*/ |
898
|
|
|
function nav(Attribute ...$attributes) : callable |
899
|
|
|
{ |
900
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
901
|
1 |
|
return new NormalElement( |
902
|
1 |
|
'nav', |
903
|
1 |
|
$attributes, |
904
|
1 |
|
$elements |
905
|
|
|
); |
906
|
1 |
|
}; |
907
|
|
|
} |
908
|
|
|
|
909
|
|
|
/** |
910
|
|
|
* @link https://html.spec.whatwg.org/#the-noscript-element |
911
|
|
|
*/ |
912
|
|
|
function noscript(Attribute ...$attributes) : callable |
913
|
|
|
{ |
914
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
915
|
1 |
|
return new NormalElement( |
916
|
1 |
|
'noscript', |
917
|
1 |
|
$attributes, |
918
|
1 |
|
$elements |
919
|
|
|
); |
920
|
1 |
|
}; |
921
|
|
|
} |
922
|
|
|
|
923
|
|
|
/** |
924
|
|
|
* @link https://html.spec.whatwg.org/#the-object-element |
925
|
|
|
*/ |
926
|
|
|
function object_(Attribute ...$attributes) : callable |
927
|
|
|
{ |
928
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
929
|
1 |
|
return new NormalElement( |
930
|
1 |
|
'object', |
931
|
1 |
|
$attributes, |
932
|
1 |
|
$elements |
933
|
|
|
); |
934
|
1 |
|
}; |
935
|
|
|
} |
936
|
|
|
|
937
|
|
|
/** |
938
|
|
|
* @link https://html.spec.whatwg.org/#the-ol-element |
939
|
|
|
*/ |
940
|
|
|
function ol(Attribute ...$attributes) : callable |
941
|
|
|
{ |
942
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
943
|
1 |
|
return new NormalElement( |
944
|
1 |
|
'ol', |
945
|
1 |
|
$attributes, |
946
|
1 |
|
$elements |
947
|
|
|
); |
948
|
1 |
|
}; |
949
|
|
|
} |
950
|
|
|
|
951
|
|
|
/** |
952
|
|
|
* @link https://html.spec.whatwg.org/#the-optgroup-element |
953
|
|
|
*/ |
954
|
|
|
function optgroup(Attribute ...$attributes) : callable |
955
|
|
|
{ |
956
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
957
|
1 |
|
return new NormalElement( |
958
|
1 |
|
'optgroup', |
959
|
1 |
|
$attributes, |
960
|
1 |
|
$elements |
961
|
|
|
); |
962
|
1 |
|
}; |
963
|
|
|
} |
964
|
|
|
|
965
|
|
|
/** |
966
|
|
|
* @link https://html.spec.whatwg.org/#the-option-element |
967
|
|
|
*/ |
968
|
|
|
function option(Attribute ...$attributes) : callable |
969
|
|
|
{ |
970
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
971
|
1 |
|
return new NormalElement( |
972
|
1 |
|
'option', |
973
|
1 |
|
$attributes, |
974
|
1 |
|
$elements |
975
|
|
|
); |
976
|
1 |
|
}; |
977
|
|
|
} |
978
|
|
|
|
979
|
|
|
/** |
980
|
|
|
* @link https://html.spec.whatwg.org/#the-output-element |
981
|
|
|
*/ |
982
|
|
|
function output(Attribute ...$attributes) : callable |
983
|
|
|
{ |
984
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
985
|
1 |
|
return new NormalElement( |
986
|
1 |
|
'output', |
987
|
1 |
|
$attributes, |
988
|
1 |
|
$elements |
989
|
|
|
); |
990
|
1 |
|
}; |
991
|
|
|
} |
992
|
|
|
|
993
|
|
|
/** |
994
|
|
|
* @link https://html.spec.whatwg.org/#the-p-element |
995
|
|
|
*/ |
996
|
|
|
function p(Attribute ...$attributes) : callable |
997
|
|
|
{ |
998
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
999
|
1 |
|
return new NormalElement( |
1000
|
1 |
|
'p', |
1001
|
1 |
|
$attributes, |
1002
|
1 |
|
$elements |
1003
|
|
|
); |
1004
|
1 |
|
}; |
1005
|
|
|
} |
1006
|
|
|
|
1007
|
|
|
/** |
1008
|
|
|
* @link https://html.spec.whatwg.org/#the-param-element |
1009
|
|
|
*/ |
1010
|
|
|
function param(Attribute ...$attributes) : VoidElement |
1011
|
|
|
{ |
1012
|
1 |
|
return new VoidElement( |
1013
|
1 |
|
'param', |
1014
|
1 |
|
$attributes |
1015
|
|
|
); |
1016
|
|
|
} |
1017
|
|
|
|
1018
|
|
|
/** |
1019
|
|
|
* @link https://html.spec.whatwg.org/#the-picture-element |
1020
|
|
|
*/ |
1021
|
|
|
function picture(Attribute ...$attributes) : callable |
1022
|
|
|
{ |
1023
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1024
|
1 |
|
return new NormalElement( |
1025
|
1 |
|
'picture', |
1026
|
1 |
|
$attributes, |
1027
|
1 |
|
$elements |
1028
|
|
|
); |
1029
|
1 |
|
}; |
1030
|
|
|
} |
1031
|
|
|
|
1032
|
|
|
/** |
1033
|
|
|
* @link https://html.spec.whatwg.org/#the-pre-element |
1034
|
|
|
*/ |
1035
|
|
|
function pre(Attribute ...$attributes) : callable |
1036
|
|
|
{ |
1037
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1038
|
1 |
|
return new NormalElement( |
1039
|
1 |
|
'pre', |
1040
|
1 |
|
$attributes, |
1041
|
1 |
|
$elements |
1042
|
|
|
); |
1043
|
1 |
|
}; |
1044
|
|
|
} |
1045
|
|
|
|
1046
|
|
|
/** |
1047
|
|
|
* @link https://html.spec.whatwg.org/#the-progress-element |
1048
|
|
|
*/ |
1049
|
|
|
function progress(Attribute ...$attributes) : callable |
1050
|
|
|
{ |
1051
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1052
|
1 |
|
return new NormalElement( |
1053
|
1 |
|
'progress', |
1054
|
1 |
|
$attributes, |
1055
|
1 |
|
$elements |
1056
|
|
|
); |
1057
|
1 |
|
}; |
1058
|
|
|
} |
1059
|
|
|
|
1060
|
|
|
/** |
1061
|
|
|
* @link https://html.spec.whatwg.org/#the-q-element |
1062
|
|
|
*/ |
1063
|
|
|
function q(Attribute ...$attributes) : callable |
1064
|
|
|
{ |
1065
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1066
|
1 |
|
return new NormalElement( |
1067
|
1 |
|
'q', |
1068
|
1 |
|
$attributes, |
1069
|
1 |
|
$elements |
1070
|
|
|
); |
1071
|
1 |
|
}; |
1072
|
|
|
} |
1073
|
|
|
|
1074
|
|
|
/** |
1075
|
|
|
* @link https://html.spec.whatwg.org/#the-rp-element |
1076
|
|
|
*/ |
1077
|
|
|
function rp(Attribute ...$attributes) : callable |
1078
|
|
|
{ |
1079
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1080
|
1 |
|
return new NormalElement( |
1081
|
1 |
|
'rp', |
1082
|
1 |
|
$attributes, |
1083
|
1 |
|
$elements |
1084
|
|
|
); |
1085
|
1 |
|
}; |
1086
|
|
|
} |
1087
|
|
|
|
1088
|
|
|
/** |
1089
|
|
|
* @link https://html.spec.whatwg.org/#the-rt-element |
1090
|
|
|
*/ |
1091
|
|
|
function rt(Attribute ...$attributes) : callable |
1092
|
|
|
{ |
1093
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1094
|
1 |
|
return new NormalElement( |
1095
|
1 |
|
'rt', |
1096
|
1 |
|
$attributes, |
1097
|
1 |
|
$elements |
1098
|
|
|
); |
1099
|
1 |
|
}; |
1100
|
|
|
} |
1101
|
|
|
|
1102
|
|
|
/** |
1103
|
|
|
* @link https://html.spec.whatwg.org/#the-ruby-element |
1104
|
|
|
*/ |
1105
|
|
|
function ruby(Attribute ...$attributes) : callable |
1106
|
|
|
{ |
1107
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1108
|
1 |
|
return new NormalElement( |
1109
|
1 |
|
'ruby', |
1110
|
1 |
|
$attributes, |
1111
|
1 |
|
$elements |
1112
|
|
|
); |
1113
|
1 |
|
}; |
1114
|
|
|
} |
1115
|
|
|
|
1116
|
|
|
/** |
1117
|
|
|
* @link https://html.spec.whatwg.org/#the-s-element |
1118
|
|
|
*/ |
1119
|
|
|
function s(Attribute ...$attributes) : callable |
1120
|
|
|
{ |
1121
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1122
|
1 |
|
return new NormalElement( |
1123
|
1 |
|
's', |
1124
|
1 |
|
$attributes, |
1125
|
1 |
|
$elements |
1126
|
|
|
); |
1127
|
1 |
|
}; |
1128
|
|
|
} |
1129
|
|
|
|
1130
|
|
|
/** |
1131
|
|
|
* @link https://html.spec.whatwg.org/#the-samp-element |
1132
|
|
|
*/ |
1133
|
|
|
function samp(Attribute ...$attributes) : callable |
1134
|
|
|
{ |
1135
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1136
|
1 |
|
return new NormalElement( |
1137
|
1 |
|
'samp', |
1138
|
1 |
|
$attributes, |
1139
|
1 |
|
$elements |
1140
|
|
|
); |
1141
|
1 |
|
}; |
1142
|
|
|
} |
1143
|
|
|
|
1144
|
|
|
/** |
1145
|
|
|
* @link https://html.spec.whatwg.org/#the-script-element |
1146
|
|
|
*/ |
1147
|
|
|
function script(Attribute ...$attributes) : callable |
1148
|
|
|
{ |
1149
|
|
|
return function (TextInterface $text = null) use ($attributes) : RawTextElement { |
1150
|
1 |
|
return new RawTextElement( |
1151
|
1 |
|
'script', |
1152
|
1 |
|
$attributes, |
1153
|
1 |
|
$text ?? new Text('') |
1154
|
|
|
); |
1155
|
1 |
|
}; |
1156
|
|
|
} |
1157
|
|
|
|
1158
|
|
|
/** |
1159
|
|
|
* @link https://html.spec.whatwg.org/#the-section-element |
1160
|
|
|
*/ |
1161
|
|
|
function section(Attribute ...$attributes) : callable |
1162
|
|
|
{ |
1163
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1164
|
1 |
|
return new NormalElement( |
1165
|
1 |
|
'section', |
1166
|
1 |
|
$attributes, |
1167
|
1 |
|
$elements |
1168
|
|
|
); |
1169
|
1 |
|
}; |
1170
|
|
|
} |
1171
|
|
|
|
1172
|
|
|
/** |
1173
|
|
|
* @link https://html.spec.whatwg.org/#the-select-element |
1174
|
|
|
*/ |
1175
|
|
|
function select(Attribute ...$attributes) : callable |
1176
|
|
|
{ |
1177
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1178
|
1 |
|
return new NormalElement( |
1179
|
1 |
|
'select', |
1180
|
1 |
|
$attributes, |
1181
|
1 |
|
$elements |
1182
|
|
|
); |
1183
|
1 |
|
}; |
1184
|
|
|
} |
1185
|
|
|
|
1186
|
|
|
/** |
1187
|
|
|
* @link https://html.spec.whatwg.org/#the-slot-element |
1188
|
|
|
*/ |
1189
|
|
|
function slot(Attribute ...$attributes) : callable |
1190
|
|
|
{ |
1191
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1192
|
1 |
|
return new NormalElement( |
1193
|
1 |
|
'slot', |
1194
|
1 |
|
$attributes, |
1195
|
1 |
|
$elements |
1196
|
|
|
); |
1197
|
1 |
|
}; |
1198
|
|
|
} |
1199
|
|
|
|
1200
|
|
|
/** |
1201
|
|
|
* @link https://html.spec.whatwg.org/#the-small-element |
1202
|
|
|
*/ |
1203
|
|
|
function small(Attribute ...$attributes) : callable |
1204
|
|
|
{ |
1205
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1206
|
1 |
|
return new NormalElement( |
1207
|
1 |
|
'small', |
1208
|
1 |
|
$attributes, |
1209
|
1 |
|
$elements |
1210
|
|
|
); |
1211
|
1 |
|
}; |
1212
|
|
|
} |
1213
|
|
|
|
1214
|
|
|
/** |
1215
|
|
|
* @link https://html.spec.whatwg.org/#the-source-element |
1216
|
|
|
*/ |
1217
|
|
|
function source(Attribute ...$attributes) : VoidElement |
1218
|
|
|
{ |
1219
|
1 |
|
return new VoidElement( |
1220
|
1 |
|
'source', |
1221
|
1 |
|
$attributes |
1222
|
|
|
); |
1223
|
|
|
} |
1224
|
|
|
|
1225
|
|
|
/** |
1226
|
|
|
* @link https://html.spec.whatwg.org/#the-span-element |
1227
|
|
|
*/ |
1228
|
|
|
function span(Attribute ...$attributes) : callable |
1229
|
|
|
{ |
1230
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1231
|
1 |
|
return new NormalElement( |
1232
|
1 |
|
'span', |
1233
|
1 |
|
$attributes, |
1234
|
1 |
|
$elements |
1235
|
|
|
); |
1236
|
1 |
|
}; |
1237
|
|
|
} |
1238
|
|
|
|
1239
|
|
|
/** |
1240
|
|
|
* @link https://html.spec.whatwg.org/#the-strong-element |
1241
|
|
|
*/ |
1242
|
|
|
function strong(Attribute ...$attributes) : callable |
1243
|
|
|
{ |
1244
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1245
|
1 |
|
return new NormalElement( |
1246
|
1 |
|
'strong', |
1247
|
1 |
|
$attributes, |
1248
|
1 |
|
$elements |
1249
|
|
|
); |
1250
|
1 |
|
}; |
1251
|
|
|
} |
1252
|
|
|
|
1253
|
|
|
/** |
1254
|
|
|
* @link https://html.spec.whatwg.org/#the-style-element |
1255
|
|
|
*/ |
1256
|
|
|
function style(Attribute ...$attributes) : callable |
1257
|
|
|
{ |
1258
|
|
|
return function (TextInterface $text = null) use ($attributes) : RawTextElement { |
1259
|
1 |
|
return new RawTextElement( |
1260
|
1 |
|
'style', |
1261
|
1 |
|
$attributes, |
1262
|
1 |
|
$text ?? new Text('') |
1263
|
|
|
); |
1264
|
1 |
|
}; |
1265
|
|
|
} |
1266
|
|
|
|
1267
|
|
|
/** |
1268
|
|
|
* @link https://html.spec.whatwg.org/#the-sub-and-sup-elements |
1269
|
|
|
*/ |
1270
|
|
|
function sub(Attribute ...$attributes) : callable |
1271
|
|
|
{ |
1272
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1273
|
1 |
|
return new NormalElement( |
1274
|
1 |
|
'sub', |
1275
|
1 |
|
$attributes, |
1276
|
1 |
|
$elements |
1277
|
|
|
); |
1278
|
1 |
|
}; |
1279
|
|
|
} |
1280
|
|
|
|
1281
|
|
|
/** |
1282
|
|
|
* @link https://html.spec.whatwg.org/#the-summary-element |
1283
|
|
|
*/ |
1284
|
|
|
function summary(Attribute ...$attributes) : callable |
1285
|
|
|
{ |
1286
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1287
|
1 |
|
return new NormalElement( |
1288
|
1 |
|
'summary', |
1289
|
1 |
|
$attributes, |
1290
|
1 |
|
$elements |
1291
|
|
|
); |
1292
|
1 |
|
}; |
1293
|
|
|
} |
1294
|
|
|
|
1295
|
|
|
/** |
1296
|
|
|
* @link https://html.spec.whatwg.org/#the-sub-and-sup-elements |
1297
|
|
|
*/ |
1298
|
|
|
function sup(Attribute ...$attributes) : callable |
1299
|
|
|
{ |
1300
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1301
|
1 |
|
return new NormalElement( |
1302
|
1 |
|
'sup', |
1303
|
1 |
|
$attributes, |
1304
|
1 |
|
$elements |
1305
|
|
|
); |
1306
|
1 |
|
}; |
1307
|
|
|
} |
1308
|
|
|
|
1309
|
|
|
/** |
1310
|
|
|
* @link https://html.spec.whatwg.org/#the-table-element |
1311
|
|
|
*/ |
1312
|
|
|
function table(Attribute ...$attributes) : callable |
1313
|
|
|
{ |
1314
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1315
|
1 |
|
return new NormalElement( |
1316
|
1 |
|
'table', |
1317
|
1 |
|
$attributes, |
1318
|
1 |
|
$elements |
1319
|
|
|
); |
1320
|
1 |
|
}; |
1321
|
|
|
} |
1322
|
|
|
|
1323
|
|
|
/** |
1324
|
|
|
* @link https://html.spec.whatwg.org/#the-tbody-element |
1325
|
|
|
*/ |
1326
|
|
|
function tbody(Attribute ...$attributes) : callable |
1327
|
|
|
{ |
1328
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1329
|
1 |
|
return new NormalElement( |
1330
|
1 |
|
'tbody', |
1331
|
1 |
|
$attributes, |
1332
|
1 |
|
$elements |
1333
|
|
|
); |
1334
|
1 |
|
}; |
1335
|
|
|
} |
1336
|
|
|
|
1337
|
|
|
/** |
1338
|
|
|
* @link https://html.spec.whatwg.org/#the-td-element |
1339
|
|
|
*/ |
1340
|
|
|
function td(Attribute ...$attributes) : callable |
1341
|
|
|
{ |
1342
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1343
|
1 |
|
return new NormalElement( |
1344
|
1 |
|
'td', |
1345
|
1 |
|
$attributes, |
1346
|
1 |
|
$elements |
1347
|
|
|
); |
1348
|
1 |
|
}; |
1349
|
|
|
} |
1350
|
|
|
|
1351
|
|
|
/** |
1352
|
|
|
* @link https://html.spec.whatwg.org/#the-template-element |
1353
|
|
|
*/ |
1354
|
|
|
function template(Attribute ...$attributes) : callable |
1355
|
|
|
{ |
1356
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1357
|
1 |
|
return new NormalElement( |
1358
|
1 |
|
'template', |
1359
|
1 |
|
$attributes, |
1360
|
1 |
|
$elements |
1361
|
|
|
); |
1362
|
1 |
|
}; |
1363
|
|
|
} |
1364
|
|
|
|
1365
|
|
|
/** |
1366
|
|
|
* @link https://html.spec.whatwg.org/#the-textarea-element |
1367
|
|
|
*/ |
1368
|
|
|
function textarea(Attribute ...$attributes) : callable |
1369
|
|
|
{ |
1370
|
|
|
return function (TextInterface $text = null) use ($attributes) : TextElement { |
1371
|
1 |
|
return new TextElement( |
1372
|
1 |
|
'textarea', |
1373
|
1 |
|
$attributes, |
1374
|
1 |
|
$text ?? new Text('') |
1375
|
|
|
); |
1376
|
1 |
|
}; |
1377
|
|
|
} |
1378
|
|
|
/** |
1379
|
|
|
* @link https://html.spec.whatwg.org/#the-tfoot-element |
1380
|
|
|
*/ |
1381
|
|
|
function tfoot(Attribute ...$attributes) : callable |
1382
|
|
|
{ |
1383
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1384
|
1 |
|
return new NormalElement( |
1385
|
1 |
|
'tfoot', |
1386
|
1 |
|
$attributes, |
1387
|
1 |
|
$elements |
1388
|
|
|
); |
1389
|
1 |
|
}; |
1390
|
|
|
} |
1391
|
|
|
|
1392
|
|
|
/** |
1393
|
|
|
* @link https://html.spec.whatwg.org/#the-th-element |
1394
|
|
|
*/ |
1395
|
|
|
function th(Attribute ...$attributes) : callable |
1396
|
|
|
{ |
1397
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1398
|
1 |
|
return new NormalElement( |
1399
|
1 |
|
'th', |
1400
|
1 |
|
$attributes, |
1401
|
1 |
|
$elements |
1402
|
|
|
); |
1403
|
1 |
|
}; |
1404
|
|
|
} |
1405
|
|
|
|
1406
|
|
|
/** |
1407
|
|
|
* @link https://html.spec.whatwg.org/#the-thead-element |
1408
|
|
|
*/ |
1409
|
|
|
function thead(Attribute ...$attributes) : callable |
1410
|
|
|
{ |
1411
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1412
|
1 |
|
return new NormalElement( |
1413
|
1 |
|
'thead', |
1414
|
1 |
|
$attributes, |
1415
|
1 |
|
$elements |
1416
|
|
|
); |
1417
|
1 |
|
}; |
1418
|
|
|
} |
1419
|
|
|
|
1420
|
|
|
/** |
1421
|
|
|
* @link https://html.spec.whatwg.org/#the-time-element |
1422
|
|
|
*/ |
1423
|
|
|
function time(Attribute ...$attributes) : callable |
1424
|
|
|
{ |
1425
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1426
|
1 |
|
return new NormalElement( |
1427
|
1 |
|
'time', |
1428
|
1 |
|
$attributes, |
1429
|
1 |
|
$elements |
1430
|
|
|
); |
1431
|
1 |
|
}; |
1432
|
|
|
} |
1433
|
|
|
|
1434
|
|
|
/** |
1435
|
|
|
* @link https://html.spec.whatwg.org/#the-title-element |
1436
|
|
|
*/ |
1437
|
|
|
function title(Attribute ...$attributes) : callable |
1438
|
|
|
{ |
1439
|
|
|
return function (TextInterface $text = null) use ($attributes) : TextElement { |
1440
|
1 |
|
return new TextElement( |
1441
|
1 |
|
'title', |
1442
|
1 |
|
$attributes, |
1443
|
1 |
|
$text ?? new Text('') |
1444
|
|
|
); |
1445
|
1 |
|
}; |
1446
|
|
|
} |
1447
|
|
|
|
1448
|
|
|
/** |
1449
|
|
|
* @link https://html.spec.whatwg.org/#the-tr-element |
1450
|
|
|
*/ |
1451
|
|
|
function tr(Attribute ...$attributes) : callable |
1452
|
|
|
{ |
1453
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1454
|
1 |
|
return new NormalElement( |
1455
|
1 |
|
'tr', |
1456
|
1 |
|
$attributes, |
1457
|
1 |
|
$elements |
1458
|
|
|
); |
1459
|
1 |
|
}; |
1460
|
|
|
} |
1461
|
|
|
|
1462
|
|
|
/** |
1463
|
|
|
* @link https://html.spec.whatwg.org/#the-track-element |
1464
|
|
|
*/ |
1465
|
|
|
function track(Attribute ...$attributes) : VoidElement |
1466
|
|
|
{ |
1467
|
1 |
|
return new VoidElement( |
1468
|
1 |
|
'track', |
1469
|
1 |
|
$attributes |
1470
|
|
|
); |
1471
|
|
|
} |
1472
|
|
|
|
1473
|
|
|
/** |
1474
|
|
|
* @link https://html.spec.whatwg.org/#the-u-element |
1475
|
|
|
*/ |
1476
|
|
|
function u(Attribute ...$attributes) : callable |
1477
|
|
|
{ |
1478
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1479
|
1 |
|
return new NormalElement( |
1480
|
1 |
|
'u', |
1481
|
1 |
|
$attributes, |
1482
|
1 |
|
$elements |
1483
|
|
|
); |
1484
|
1 |
|
}; |
1485
|
|
|
} |
1486
|
|
|
|
1487
|
|
|
/** |
1488
|
|
|
* @link https://html.spec.whatwg.org/#the-ul-element |
1489
|
|
|
*/ |
1490
|
|
|
function ul(Attribute ...$attributes) : callable |
1491
|
|
|
{ |
1492
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1493
|
1 |
|
return new NormalElement( |
1494
|
1 |
|
'ul', |
1495
|
1 |
|
$attributes, |
1496
|
1 |
|
$elements |
1497
|
|
|
); |
1498
|
1 |
|
}; |
1499
|
|
|
} |
1500
|
|
|
|
1501
|
|
|
/** |
1502
|
|
|
* @link https://html.spec.whatwg.org/#the-var-element |
1503
|
|
|
*/ |
1504
|
|
|
function var_(Attribute ...$attributes) : callable |
1505
|
|
|
{ |
1506
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1507
|
1 |
|
return new NormalElement( |
1508
|
1 |
|
'var', |
1509
|
1 |
|
$attributes, |
1510
|
1 |
|
$elements |
1511
|
|
|
); |
1512
|
1 |
|
}; |
1513
|
|
|
} |
1514
|
|
|
|
1515
|
|
|
/** |
1516
|
|
|
* @link https://html.spec.whatwg.org/#the-video-element |
1517
|
|
|
*/ |
1518
|
|
|
function video(Attribute ...$attributes) : callable |
1519
|
|
|
{ |
1520
|
|
|
return function (Node ...$elements) use ($attributes) : NormalElement { |
1521
|
1 |
|
return new NormalElement( |
1522
|
1 |
|
'video', |
1523
|
1 |
|
$attributes, |
1524
|
1 |
|
$elements |
1525
|
|
|
); |
1526
|
1 |
|
}; |
1527
|
|
|
} |
1528
|
|
|
|
1529
|
|
|
/** |
1530
|
|
|
* @link https://html.spec.whatwg.org/#the-wbr-element |
1531
|
|
|
*/ |
1532
|
|
|
function wbr(Attribute ...$attributes) : VoidElement |
1533
|
|
|
{ |
1534
|
1 |
|
return new VoidElement( |
1535
|
1 |
|
'wbr', |
1536
|
1 |
|
$attributes |
1537
|
|
|
); |
1538
|
|
|
} |
1539
|
|
|
|