typewriter 0.1.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.
- checksums.yaml +7 -0
- data/lib/typewriter/attribute.rb +102 -0
- data/lib/typewriter/spec_attributes.rb +254 -0
- data/lib/typewriter/spec_elements.rb +793 -0
- data/lib/typewriter/template.rb +122 -0
- data/lib/typewriter/version.rb +5 -0
- data/lib/typewriter/writer.rb +54 -0
- data/lib/typewriter.rb +9 -0
- data/rbi/attributes.rbx +189 -0
- data/rbi/elements.rbx +924 -0
- data/rbi/typewriter.rbi +936 -0
- data/rbi/typewriter.rbx +107 -0
- metadata +59 -0
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Typewriter
|
|
4
|
+
# HTML nodes autogenerated, do not edit
|
|
5
|
+
module SpecElements
|
|
6
|
+
module HTMLHtmlElement
|
|
7
|
+
def html(attributes = nil, &elements)
|
|
8
|
+
write('<html', '</html>', attributes, &elements)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
module HTMLHeadElement
|
|
13
|
+
def head(attributes = nil, &elements)
|
|
14
|
+
write('<head', '</head>', attributes, &elements)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module HTMLTitleElement
|
|
19
|
+
def title(attributes = nil, &elements)
|
|
20
|
+
write('<title', '</title>', attributes, &elements)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
module HTMLBaseElement
|
|
25
|
+
def base(attributes = nil)
|
|
26
|
+
# no child elements allowed and no closing tag
|
|
27
|
+
write_void('<base', attributes)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
module HTMLLinkElement
|
|
32
|
+
def link(attributes = nil)
|
|
33
|
+
# no child elements allowed and no closing tag
|
|
34
|
+
write_void('<link', attributes)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
module HTMLMetaElement
|
|
39
|
+
def meta(attributes = nil)
|
|
40
|
+
# no child elements allowed and no closing tag
|
|
41
|
+
write_void('<meta', attributes)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
module HTMLStyleElement
|
|
46
|
+
def style(attributes = nil, &elements)
|
|
47
|
+
write('<style', '</style>', attributes, &elements)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
module HTMLBodyElement
|
|
52
|
+
def body(attributes = nil, &elements)
|
|
53
|
+
write('<body', '</body>', attributes, &elements)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
module HTMLElement
|
|
58
|
+
def article(attributes = nil, &elements)
|
|
59
|
+
write('<article', '</article>', attributes, &elements)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def section(attributes = nil, &elements)
|
|
63
|
+
write('<section', '</section>', attributes, &elements)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def nav(attributes = nil, &elements)
|
|
67
|
+
write('<nav', '</nav>', attributes, &elements)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def aside(attributes = nil, &elements)
|
|
71
|
+
write('<aside', '</aside>', attributes, &elements)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def hgroup(attributes = nil, &elements)
|
|
75
|
+
write('<hgroup', '</hgroup>', attributes, &elements)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def header(attributes = nil, &elements)
|
|
79
|
+
write('<header', '</header>', attributes, &elements)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def footer(attributes = nil, &elements)
|
|
83
|
+
write('<footer', '</footer>', attributes, &elements)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def address(attributes = nil, &elements)
|
|
87
|
+
write('<address', '</address>', attributes, &elements)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def dt(attributes = nil, &elements)
|
|
91
|
+
write('<dt', '</dt>', attributes, &elements)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def dd(attributes = nil, &elements)
|
|
95
|
+
write('<dd', '</dd>', attributes, &elements)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def figure(attributes = nil, &elements)
|
|
99
|
+
write('<figure', '</figure>', attributes, &elements)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def figcaption(attributes = nil, &elements)
|
|
103
|
+
write('<figcaption', '</figcaption>', attributes, &elements)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def main(attributes = nil, &elements)
|
|
107
|
+
write('<main', '</main>', attributes, &elements)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def search(attributes = nil, &elements)
|
|
111
|
+
write('<search', '</search>', attributes, &elements)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def em(attributes = nil, &elements)
|
|
115
|
+
write('<em', '</em>', attributes, &elements)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def strong(attributes = nil, &elements)
|
|
119
|
+
write('<strong', '</strong>', attributes, &elements)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def small(attributes = nil, &elements)
|
|
123
|
+
write('<small', '</small>', attributes, &elements)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def s(attributes = nil, &elements)
|
|
127
|
+
write('<s', '</s>', attributes, &elements)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def cite(attributes = nil, &elements)
|
|
131
|
+
write('<cite', '</cite>', attributes, &elements)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def dfn(attributes = nil, &elements)
|
|
135
|
+
write('<dfn', '</dfn>', attributes, &elements)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def abbr(attributes = nil, &elements)
|
|
139
|
+
write('<abbr', '</abbr>', attributes, &elements)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def ruby(attributes = nil, &elements)
|
|
143
|
+
write('<ruby', '</ruby>', attributes, &elements)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def rt(attributes = nil, &elements)
|
|
147
|
+
write('<rt', '</rt>', attributes, &elements)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def rp(attributes = nil, &elements)
|
|
151
|
+
write('<rp', '</rp>', attributes, &elements)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def code(attributes = nil, &elements)
|
|
155
|
+
write('<code', '</code>', attributes, &elements)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def var(attributes = nil, &elements)
|
|
159
|
+
write('<var', '</var>', attributes, &elements)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def samp(attributes = nil, &elements)
|
|
163
|
+
write('<samp', '</samp>', attributes, &elements)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def kbd(attributes = nil, &elements)
|
|
167
|
+
write('<kbd', '</kbd>', attributes, &elements)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def sub(attributes = nil, &elements)
|
|
171
|
+
write('<sub', '</sub>', attributes, &elements)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def sup(attributes = nil, &elements)
|
|
175
|
+
write('<sup', '</sup>', attributes, &elements)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
def i(attributes = nil, &elements)
|
|
179
|
+
write('<i', '</i>', attributes, &elements)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def b(attributes = nil, &elements)
|
|
183
|
+
write('<b', '</b>', attributes, &elements)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def u(attributes = nil, &elements)
|
|
187
|
+
write('<u', '</u>', attributes, &elements)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def mark(attributes = nil, &elements)
|
|
191
|
+
write('<mark', '</mark>', attributes, &elements)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
def bdi(attributes = nil, &elements)
|
|
195
|
+
write('<bdi', '</bdi>', attributes, &elements)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
def bdo(attributes = nil, &elements)
|
|
199
|
+
write('<bdo', '</bdo>', attributes, &elements)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def wbr(attributes = nil)
|
|
203
|
+
# no child elements allowed and no closing tag
|
|
204
|
+
write_void('<wbr', attributes)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def summary(attributes = nil, &elements)
|
|
208
|
+
write('<summary', '</summary>', attributes, &elements)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def noscript(attributes = nil, &elements)
|
|
212
|
+
write('<noscript', '</noscript>', attributes, &elements)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def acronym(attributes = nil, &elements)
|
|
216
|
+
write('<acronym', '</acronym>', attributes, &elements)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
def noframes(attributes = nil, &elements)
|
|
220
|
+
write('<noframes', '</noframes>', attributes, &elements)
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def menuitem(attributes = nil, &elements)
|
|
224
|
+
write('<menuitem', '</menuitem>', attributes, &elements)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
def noembed(attributes = nil, &elements)
|
|
228
|
+
write('<noembed', '</noembed>', attributes, &elements)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def plaintext(attributes = nil, &elements)
|
|
232
|
+
write('<plaintext', '</plaintext>', attributes, &elements)
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
def rb(attributes = nil, &elements)
|
|
236
|
+
write('<rb', '</rb>', attributes, &elements)
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def rtc(attributes = nil, &elements)
|
|
240
|
+
write('<rtc', '</rtc>', attributes, &elements)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
def strike(attributes = nil, &elements)
|
|
244
|
+
write('<strike', '</strike>', attributes, &elements)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
def basefont(attributes = nil, &elements)
|
|
248
|
+
write('<basefont', '</basefont>', attributes, &elements)
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
def big(attributes = nil, &elements)
|
|
252
|
+
write('<big', '</big>', attributes, &elements)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
def center(attributes = nil, &elements)
|
|
256
|
+
write('<center', '</center>', attributes, &elements)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def nobr(attributes = nil, &elements)
|
|
260
|
+
write('<nobr', '</nobr>', attributes, &elements)
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def tt(attributes = nil, &elements)
|
|
264
|
+
write('<tt', '</tt>', attributes, &elements)
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
module HTMLHeadingElement
|
|
269
|
+
def h1(attributes = nil, &elements)
|
|
270
|
+
write('<h1', '</h1>', attributes, &elements)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
def h2(attributes = nil, &elements)
|
|
274
|
+
write('<h2', '</h2>', attributes, &elements)
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
def h3(attributes = nil, &elements)
|
|
278
|
+
write('<h3', '</h3>', attributes, &elements)
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
def h4(attributes = nil, &elements)
|
|
282
|
+
write('<h4', '</h4>', attributes, &elements)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
def h5(attributes = nil, &elements)
|
|
286
|
+
write('<h5', '</h5>', attributes, &elements)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
def h6(attributes = nil, &elements)
|
|
290
|
+
write('<h6', '</h6>', attributes, &elements)
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
module HTMLParagraphElement
|
|
295
|
+
def p(attributes = nil, &elements)
|
|
296
|
+
write('<p', '</p>', attributes, &elements)
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
module HTMLHRElement
|
|
301
|
+
def hr(attributes = nil)
|
|
302
|
+
# no child elements allowed and no closing tag
|
|
303
|
+
write_void('<hr', attributes)
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
module HTMLPreElement
|
|
308
|
+
def pre(attributes = nil, &elements)
|
|
309
|
+
write('<pre', '</pre>', attributes, &elements)
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
def listing(attributes = nil, &elements)
|
|
313
|
+
write('<listing', '</listing>', attributes, &elements)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
def xmp(attributes = nil, &elements)
|
|
317
|
+
write('<xmp', '</xmp>', attributes, &elements)
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
module HTMLQuoteElement
|
|
322
|
+
def blockquote(attributes = nil, &elements)
|
|
323
|
+
write('<blockquote', '</blockquote>', attributes, &elements)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
def q(attributes = nil, &elements)
|
|
327
|
+
write('<q', '</q>', attributes, &elements)
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
module HTMLOListElement
|
|
332
|
+
def ol(attributes = nil, &elements)
|
|
333
|
+
write('<ol', '</ol>', attributes, &elements)
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
module HTMLUListElement
|
|
338
|
+
def ul(attributes = nil, &elements)
|
|
339
|
+
write('<ul', '</ul>', attributes, &elements)
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
module HTMLMenuElement
|
|
344
|
+
def menu(attributes = nil, &elements)
|
|
345
|
+
write('<menu', '</menu>', attributes, &elements)
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
module HTMLLIElement
|
|
350
|
+
def li(attributes = nil, &elements)
|
|
351
|
+
write('<li', '</li>', attributes, &elements)
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
module HTMLDListElement
|
|
356
|
+
def dl(attributes = nil, &elements)
|
|
357
|
+
write('<dl', '</dl>', attributes, &elements)
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
module HTMLDivElement
|
|
362
|
+
def div(attributes = nil, &elements)
|
|
363
|
+
write('<div', '</div>', attributes, &elements)
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
module HTMLAnchorElement
|
|
368
|
+
def a(attributes = nil, &elements)
|
|
369
|
+
write('<a', '</a>', attributes, &elements)
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
module HTMLDataElement
|
|
374
|
+
def data(attributes = nil, &elements)
|
|
375
|
+
write('<data', '</data>', attributes, &elements)
|
|
376
|
+
end
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
module HTMLTimeElement
|
|
380
|
+
def time(attributes = nil, &elements)
|
|
381
|
+
write('<time', '</time>', attributes, &elements)
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
module HTMLSpanElement
|
|
386
|
+
def span(attributes = nil, &elements)
|
|
387
|
+
write('<span', '</span>', attributes, &elements)
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
module HTMLBRElement
|
|
392
|
+
def br(attributes = nil)
|
|
393
|
+
# no child elements allowed and no closing tag
|
|
394
|
+
write_void('<br', attributes)
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
module HTMLModElement
|
|
399
|
+
def ins(attributes = nil, &elements)
|
|
400
|
+
write('<ins', '</ins>', attributes, &elements)
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
def del(attributes = nil, &elements)
|
|
404
|
+
write('<del', '</del>', attributes, &elements)
|
|
405
|
+
end
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
module HTMLPictureElement
|
|
409
|
+
def picture(attributes = nil, &elements)
|
|
410
|
+
write('<picture', '</picture>', attributes, &elements)
|
|
411
|
+
end
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
module HTMLSourceElement
|
|
415
|
+
def source(attributes = nil)
|
|
416
|
+
# no child elements allowed and no closing tag
|
|
417
|
+
write_void('<source', attributes)
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
module HTMLImageElement
|
|
422
|
+
def img(attributes = nil)
|
|
423
|
+
# no child elements allowed and no closing tag
|
|
424
|
+
write_void('<img', attributes)
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
module HTMLIFrameElement
|
|
429
|
+
def iframe(attributes = nil, &elements)
|
|
430
|
+
write('<iframe', '</iframe>', attributes, &elements)
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
module HTMLEmbedElement
|
|
435
|
+
def embed(attributes = nil)
|
|
436
|
+
# no child elements allowed and no closing tag
|
|
437
|
+
write_void('<embed', attributes)
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
module HTMLObjectElement
|
|
442
|
+
def object(attributes = nil, &elements)
|
|
443
|
+
write('<object', '</object>', attributes, &elements)
|
|
444
|
+
end
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
module HTMLVideoElement
|
|
448
|
+
def video(attributes = nil, &elements)
|
|
449
|
+
write('<video', '</video>', attributes, &elements)
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
module HTMLAudioElement
|
|
454
|
+
def audio(attributes = nil, &elements)
|
|
455
|
+
write('<audio', '</audio>', attributes, &elements)
|
|
456
|
+
end
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
module HTMLTrackElement
|
|
460
|
+
def track(attributes = nil)
|
|
461
|
+
# no child elements allowed and no closing tag
|
|
462
|
+
write_void('<track', attributes)
|
|
463
|
+
end
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
module HTMLMapElement
|
|
467
|
+
def map(attributes = nil, &elements)
|
|
468
|
+
write('<map', '</map>', attributes, &elements)
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
module HTMLAreaElement
|
|
473
|
+
def area(attributes = nil)
|
|
474
|
+
# no child elements allowed and no closing tag
|
|
475
|
+
write_void('<area', attributes)
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
module HTMLTableElement
|
|
480
|
+
def table(attributes = nil, &elements)
|
|
481
|
+
write('<table', '</table>', attributes, &elements)
|
|
482
|
+
end
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
module HTMLTableCaptionElement
|
|
486
|
+
def caption(attributes = nil, &elements)
|
|
487
|
+
write('<caption', '</caption>', attributes, &elements)
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
module HTMLTableColElement
|
|
492
|
+
def colgroup(attributes = nil, &elements)
|
|
493
|
+
write('<colgroup', '</colgroup>', attributes, &elements)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
def col(attributes = nil)
|
|
497
|
+
# no child elements allowed and no closing tag
|
|
498
|
+
write_void('<col', attributes)
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
module HTMLTableSectionElement
|
|
503
|
+
def tbody(attributes = nil, &elements)
|
|
504
|
+
write('<tbody', '</tbody>', attributes, &elements)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
def thead(attributes = nil, &elements)
|
|
508
|
+
write('<thead', '</thead>', attributes, &elements)
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
def tfoot(attributes = nil, &elements)
|
|
512
|
+
write('<tfoot', '</tfoot>', attributes, &elements)
|
|
513
|
+
end
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
module HTMLTableRowElement
|
|
517
|
+
def tr(attributes = nil, &elements)
|
|
518
|
+
write('<tr', '</tr>', attributes, &elements)
|
|
519
|
+
end
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
module HTMLTableCellElement
|
|
523
|
+
def td(attributes = nil, &elements)
|
|
524
|
+
write('<td', '</td>', attributes, &elements)
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
def th(attributes = nil, &elements)
|
|
528
|
+
write('<th', '</th>', attributes, &elements)
|
|
529
|
+
end
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
module HTMLFormElement
|
|
533
|
+
def form(attributes = nil, &elements)
|
|
534
|
+
write('<form', '</form>', attributes, &elements)
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
module HTMLLabelElement
|
|
539
|
+
def label(attributes = nil, &elements)
|
|
540
|
+
write('<label', '</label>', attributes, &elements)
|
|
541
|
+
end
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
module HTMLInputElement
|
|
545
|
+
def input(attributes = nil)
|
|
546
|
+
# no child elements allowed and no closing tag
|
|
547
|
+
write_void('<input', attributes)
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
module HTMLButtonElement
|
|
552
|
+
def button(attributes = nil, &elements)
|
|
553
|
+
write('<button', '</button>', attributes, &elements)
|
|
554
|
+
end
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
module HTMLSelectElement
|
|
558
|
+
def select(attributes = nil, &elements)
|
|
559
|
+
write('<select', '</select>', attributes, &elements)
|
|
560
|
+
end
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
module HTMLDataListElement
|
|
564
|
+
def datalist(attributes = nil, &elements)
|
|
565
|
+
write('<datalist', '</datalist>', attributes, &elements)
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
module HTMLOptGroupElement
|
|
570
|
+
def optgroup(attributes = nil, &elements)
|
|
571
|
+
write('<optgroup', '</optgroup>', attributes, &elements)
|
|
572
|
+
end
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
module HTMLOptionElement
|
|
576
|
+
def option(attributes = nil, &elements)
|
|
577
|
+
write('<option', '</option>', attributes, &elements)
|
|
578
|
+
end
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
module HTMLTextAreaElement
|
|
582
|
+
def textarea(attributes = nil, &elements)
|
|
583
|
+
write('<textarea', '</textarea>', attributes, &elements)
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
module HTMLOutputElement
|
|
588
|
+
def output(attributes = nil, &elements)
|
|
589
|
+
write('<output', '</output>', attributes, &elements)
|
|
590
|
+
end
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
module HTMLProgressElement
|
|
594
|
+
def progress(attributes = nil, &elements)
|
|
595
|
+
write('<progress', '</progress>', attributes, &elements)
|
|
596
|
+
end
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
module HTMLMeterElement
|
|
600
|
+
def meter(attributes = nil, &elements)
|
|
601
|
+
write('<meter', '</meter>', attributes, &elements)
|
|
602
|
+
end
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
module HTMLFieldSetElement
|
|
606
|
+
def fieldset(attributes = nil, &elements)
|
|
607
|
+
write('<fieldset', '</fieldset>', attributes, &elements)
|
|
608
|
+
end
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
module HTMLLegendElement
|
|
612
|
+
def legend(attributes = nil, &elements)
|
|
613
|
+
write('<legend', '</legend>', attributes, &elements)
|
|
614
|
+
end
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
module HTMLDetailsElement
|
|
618
|
+
def details(attributes = nil, &elements)
|
|
619
|
+
write('<details', '</details>', attributes, &elements)
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
module HTMLDialogElement
|
|
624
|
+
def dialog(attributes = nil, &elements)
|
|
625
|
+
write('<dialog', '</dialog>', attributes, &elements)
|
|
626
|
+
end
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
module HTMLScriptElement
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
module HTMLTemplateElement
|
|
633
|
+
def template(attributes = nil, &elements)
|
|
634
|
+
write('<template', '</template>', attributes, &elements)
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
module HTMLSlotElement
|
|
639
|
+
def slot(attributes = nil, &elements)
|
|
640
|
+
write('<slot', '</slot>', attributes, &elements)
|
|
641
|
+
end
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
module HTMLCanvasElement
|
|
645
|
+
def canvas(attributes = nil, &elements)
|
|
646
|
+
write('<canvas', '</canvas>', attributes, &elements)
|
|
647
|
+
end
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
module HTMLUnknownElement
|
|
651
|
+
def applet(attributes = nil, &elements)
|
|
652
|
+
write('<applet', '</applet>', attributes, &elements)
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
def bgsound(attributes = nil, &elements)
|
|
656
|
+
write('<bgsound', '</bgsound>', attributes, &elements)
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
def isindex(attributes = nil, &elements)
|
|
660
|
+
write('<isindex', '</isindex>', attributes, &elements)
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
def keygen(attributes = nil, &elements)
|
|
664
|
+
write('<keygen', '</keygen>', attributes, &elements)
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
def nextid(attributes = nil, &elements)
|
|
668
|
+
write('<nextid', '</nextid>', attributes, &elements)
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
def blink(attributes = nil, &elements)
|
|
672
|
+
write('<blink', '</blink>', attributes, &elements)
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
def multicol(attributes = nil, &elements)
|
|
676
|
+
write('<multicol', '</multicol>', attributes, &elements)
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
def spacer(attributes = nil, &elements)
|
|
680
|
+
write('<spacer', '</spacer>', attributes, &elements)
|
|
681
|
+
end
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
module HTMLDirectoryElement
|
|
685
|
+
def dir(attributes = nil, &elements)
|
|
686
|
+
write('<dir', '</dir>', attributes, &elements)
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
module HTMLFrameElement
|
|
691
|
+
def frame(attributes = nil, &elements)
|
|
692
|
+
write('<frame', '</frame>', attributes, &elements)
|
|
693
|
+
end
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
module HTMLFrameSetElement
|
|
697
|
+
def frameset(attributes = nil, &elements)
|
|
698
|
+
write('<frameset', '</frameset>', attributes, &elements)
|
|
699
|
+
end
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
module HTMLParamElement
|
|
703
|
+
def param(attributes = nil, &elements)
|
|
704
|
+
write('<param', '</param>', attributes, &elements)
|
|
705
|
+
end
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
module HTMLFontElement
|
|
709
|
+
def font(attributes = nil, &elements)
|
|
710
|
+
write('<font', '</font>', attributes, &elements)
|
|
711
|
+
end
|
|
712
|
+
end
|
|
713
|
+
|
|
714
|
+
module HTMLMarqueeElement
|
|
715
|
+
def marquee(attributes = nil, &elements)
|
|
716
|
+
write('<marquee', '</marquee>', attributes, &elements)
|
|
717
|
+
end
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
module HTMLAllElements
|
|
721
|
+
include HTMLHtmlElement
|
|
722
|
+
include HTMLHeadElement
|
|
723
|
+
include HTMLTitleElement
|
|
724
|
+
include HTMLBaseElement
|
|
725
|
+
include HTMLLinkElement
|
|
726
|
+
include HTMLMetaElement
|
|
727
|
+
include HTMLStyleElement
|
|
728
|
+
include HTMLBodyElement
|
|
729
|
+
include HTMLElement
|
|
730
|
+
include HTMLHeadingElement
|
|
731
|
+
include HTMLParagraphElement
|
|
732
|
+
include HTMLHRElement
|
|
733
|
+
include HTMLPreElement
|
|
734
|
+
include HTMLQuoteElement
|
|
735
|
+
include HTMLOListElement
|
|
736
|
+
include HTMLUListElement
|
|
737
|
+
include HTMLMenuElement
|
|
738
|
+
include HTMLLIElement
|
|
739
|
+
include HTMLDListElement
|
|
740
|
+
include HTMLDivElement
|
|
741
|
+
include HTMLAnchorElement
|
|
742
|
+
include HTMLDataElement
|
|
743
|
+
include HTMLTimeElement
|
|
744
|
+
include HTMLSpanElement
|
|
745
|
+
include HTMLBRElement
|
|
746
|
+
include HTMLModElement
|
|
747
|
+
include HTMLPictureElement
|
|
748
|
+
include HTMLSourceElement
|
|
749
|
+
include HTMLImageElement
|
|
750
|
+
include HTMLIFrameElement
|
|
751
|
+
include HTMLEmbedElement
|
|
752
|
+
include HTMLObjectElement
|
|
753
|
+
include HTMLVideoElement
|
|
754
|
+
include HTMLAudioElement
|
|
755
|
+
include HTMLTrackElement
|
|
756
|
+
include HTMLMapElement
|
|
757
|
+
include HTMLAreaElement
|
|
758
|
+
include HTMLTableElement
|
|
759
|
+
include HTMLTableCaptionElement
|
|
760
|
+
include HTMLTableColElement
|
|
761
|
+
include HTMLTableSectionElement
|
|
762
|
+
include HTMLTableRowElement
|
|
763
|
+
include HTMLTableCellElement
|
|
764
|
+
include HTMLFormElement
|
|
765
|
+
include HTMLLabelElement
|
|
766
|
+
include HTMLInputElement
|
|
767
|
+
include HTMLButtonElement
|
|
768
|
+
include HTMLSelectElement
|
|
769
|
+
include HTMLDataListElement
|
|
770
|
+
include HTMLOptGroupElement
|
|
771
|
+
include HTMLOptionElement
|
|
772
|
+
include HTMLTextAreaElement
|
|
773
|
+
include HTMLOutputElement
|
|
774
|
+
include HTMLProgressElement
|
|
775
|
+
include HTMLMeterElement
|
|
776
|
+
include HTMLFieldSetElement
|
|
777
|
+
include HTMLLegendElement
|
|
778
|
+
include HTMLDetailsElement
|
|
779
|
+
include HTMLDialogElement
|
|
780
|
+
include HTMLScriptElement
|
|
781
|
+
include HTMLTemplateElement
|
|
782
|
+
include HTMLSlotElement
|
|
783
|
+
include HTMLCanvasElement
|
|
784
|
+
include HTMLUnknownElement
|
|
785
|
+
include HTMLDirectoryElement
|
|
786
|
+
include HTMLFrameElement
|
|
787
|
+
include HTMLFrameSetElement
|
|
788
|
+
include HTMLParamElement
|
|
789
|
+
include HTMLFontElement
|
|
790
|
+
include HTMLMarqueeElement
|
|
791
|
+
end
|
|
792
|
+
end
|
|
793
|
+
end
|