-
Notifications
You must be signed in to change notification settings - Fork 0
/
html.go
488 lines (378 loc) · 14.9 KB
/
html.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
package web
// Code generated by internal/dog.go DO NOT EDIT!
// A returns an <a> element with optional children or attributes
func A(c ...interface{}) *Element {
return NewElement("a", c...)
}
// Abbr returns an <abbr> element with optional children or attributes
func Abbr(c ...interface{}) *Element {
return NewElement("abbr", c...)
}
// Acronym returns an <acronym> element with optional children or attributes
func Acronym(c ...interface{}) *Element {
return NewElement("acronym", c...)
}
// Address returns an <address> element with optional children or attributes
func Address(c ...interface{}) *Element {
return NewElement("address", c...)
}
// Article returns an <article> element with optional children or attributes
func Article(c ...interface{}) *Element {
return NewElement("article", c...)
}
// Aside returns an <aside> element with optional children or attributes
func Aside(c ...interface{}) *Element {
return NewElement("aside", c...)
}
// B returns an <b> element with optional children or attributes
func B(c ...interface{}) *Element {
return NewElement("b", c...)
}
// Big returns an <big> element with optional children or attributes
func Big(c ...interface{}) *Element {
return NewElement("big", c...)
}
// Blockquote returns an <blockquote> element with optional children or attributes
func Blockquote(c ...interface{}) *Element {
return NewElement("blockquote", c...)
}
// Body returns an <body> element with optional children or attributes
func Body(c ...interface{}) *Element {
return NewElement("body", c...)
}
// Button returns an <button> element with optional children or attributes
func Button(c ...interface{}) *Element {
return NewElement("button", c...)
}
// Cite returns an <cite> element with optional children or attributes
func Cite(c ...interface{}) *Element {
return NewElement("cite", c...)
}
// Code returns an <code> element with optional children or attributes
func Code(c ...interface{}) *Element {
return NewElement("code", c...)
}
// Dd returns an <dd> element with optional children or attributes
func Dd(c ...interface{}) *Element {
return NewElement("dd", c...)
}
// Del returns an <del> element with optional children or attributes
func Del(c ...interface{}) *Element {
return NewElement("del", c...)
}
// Details returns an <details> element with optional children or attributes
func Details(c ...interface{}) *Element {
return NewElement("details", c...)
}
// Dfn returns an <dfn> element with optional children or attributes
func Dfn(c ...interface{}) *Element {
return NewElement("dfn", c...)
}
// Div returns an <div> element with optional children or attributes
func Div(c ...interface{}) *Element {
return NewElement("div", c...)
}
// Dl returns an <dl> element with optional children or attributes
func Dl(c ...interface{}) *Element {
return NewElement("dl", c...)
}
// Dt returns an <dt> element with optional children or attributes
func Dt(c ...interface{}) *Element {
return NewElement("dt", c...)
}
// Em returns an <em> element with optional children or attributes
func Em(c ...interface{}) *Element {
return NewElement("em", c...)
}
// Footer returns an <footer> element with optional children or attributes
func Footer(c ...interface{}) *Element {
return NewElement("footer", c...)
}
// Form returns an <form> element with optional children or attributes
func Form(c ...interface{}) *Element {
return NewElement("form", c...)
}
// Fieldset returns an <fieldset> element with optional children or attributes
func Fieldset(c ...interface{}) *Element {
return NewElement("fieldset", c...)
}
// H1 returns an <h1> element with optional children or attributes
func H1(c ...interface{}) *Element {
return NewElement("h1", c...)
}
// H2 returns an <h2> element with optional children or attributes
func H2(c ...interface{}) *Element {
return NewElement("h2", c...)
}
// H3 returns an <h3> element with optional children or attributes
func H3(c ...interface{}) *Element {
return NewElement("h3", c...)
}
// H4 returns an <h4> element with optional children or attributes
func H4(c ...interface{}) *Element {
return NewElement("h4", c...)
}
// H5 returns an <h5> element with optional children or attributes
func H5(c ...interface{}) *Element {
return NewElement("h5", c...)
}
// H6 returns an <h6> element with optional children or attributes
func H6(c ...interface{}) *Element {
return NewElement("h6", c...)
}
// Head returns an <head> element with optional children or attributes
func Head(c ...interface{}) *Element {
return NewElement("head", c...)
}
// Header returns an <header> element with optional children or attributes
func Header(c ...interface{}) *Element {
return NewElement("header", c...)
}
// Hgroup returns an <hgroup> element with optional children or attributes
func Hgroup(c ...interface{}) *Element {
return NewElement("hgroup", c...)
}
// Html returns an <html> element with optional children or attributes
func Html(c ...interface{}) *Element {
return NewElement("html", c...)
}
// I returns an <i> element with optional children or attributes
func I(c ...interface{}) *Element {
return NewElement("i", c...)
}
// Ins returns an <ins> element with optional children or attributes
func Ins(c ...interface{}) *Element {
return NewElement("ins", c...)
}
// Kbd returns an <kbd> element with optional children or attributes
func Kbd(c ...interface{}) *Element {
return NewElement("kbd", c...)
}
// Label returns an <label> element with optional children or attributes
func Label(c ...interface{}) *Element {
return NewElement("label", c...)
}
// Legend returns an <legend> element with optional children or attributes
func Legend(c ...interface{}) *Element {
return NewElement("legend", c...)
}
// Li returns an <li> element with optional children or attributes
func Li(c ...interface{}) *Element {
return NewElement("li", c...)
}
// Mark returns an <mark> element with optional children or attributes
func Mark(c ...interface{}) *Element {
return NewElement("mark", c...)
}
// Menu returns an <menu> element with optional children or attributes
func Menu(c ...interface{}) *Element {
return NewElement("menu", c...)
}
// Meter returns an <meter> element with optional children or attributes
func Meter(c ...interface{}) *Element {
return NewElement("meter", c...)
}
// Nav returns an <nav> element with optional children or attributes
func Nav(c ...interface{}) *Element {
return NewElement("nav", c...)
}
// Noscript returns an <noscript> element with optional children or attributes
func Noscript(c ...interface{}) *Element {
return NewElement("noscript", c...)
}
// Ol returns an <ol> element with optional children or attributes
func Ol(c ...interface{}) *Element {
return NewElement("ol", c...)
}
// Optgroup returns an <optgroup> element with optional children or attributes
func Optgroup(c ...interface{}) *Element {
return NewElement("optgroup", c...)
}
// Option returns an <option> element with optional children or attributes
func Option(c ...interface{}) *Element {
return NewElement("option", c...)
}
// Output returns an <output> element with optional children or attributes
func Output(c ...interface{}) *Element {
return NewElement("output", c...)
}
// P returns an <p> element with optional children or attributes
func P(c ...interface{}) *Element {
return NewElement("p", c...)
}
// Pre returns an <pre> element with optional children or attributes
func Pre(c ...interface{}) *Element {
return NewElement("pre", c...)
}
// Quote returns an <quote> element with optional children or attributes
func Quote(c ...interface{}) *Element {
return NewElement("quote", c...)
}
// Script returns an <script> element with optional children or attributes
func Script(c ...interface{}) *Element {
return NewElement("script", c...)
}
// Section returns an <section> element with optional children or attributes
func Section(c ...interface{}) *Element {
return NewElement("section", c...)
}
// Select returns an <select> element with optional children or attributes
func Select(c ...interface{}) *Element {
return NewElement("select", c...)
}
// Span returns an <span> element with optional children or attributes
func Span(c ...interface{}) *Element {
return NewElement("span", c...)
}
// Style returns an <style> element with optional children or attributes
func Style(c ...interface{}) *Element {
return NewElement("style", c...)
}
// Sub returns an <sub> element with optional children or attributes
func Sub(c ...interface{}) *Element {
return NewElement("sub", c...)
}
// Summary returns an <summary> element with optional children or attributes
func Summary(c ...interface{}) *Element {
return NewElement("summary", c...)
}
// Sup returns an <sup> element with optional children or attributes
func Sup(c ...interface{}) *Element {
return NewElement("sup", c...)
}
// Table returns an <table> element with optional children or attributes
func Table(c ...interface{}) *Element {
return NewElement("table", c...)
}
// Tbody returns an <tbody> element with optional children or attributes
func Tbody(c ...interface{}) *Element {
return NewElement("tbody", c...)
}
// Td returns an <td> element with optional children or attributes
func Td(c ...interface{}) *Element {
return NewElement("td", c...)
}
// Textarea returns an <textarea> element with optional children or attributes
func Textarea(c ...interface{}) *Element {
return NewElement("textarea", c...)
}
// Th returns an <th> element with optional children or attributes
func Th(c ...interface{}) *Element {
return NewElement("th", c...)
}
// Thead returns an <thead> element with optional children or attributes
func Thead(c ...interface{}) *Element {
return NewElement("thead", c...)
}
// Title returns an <title> element with optional children or attributes
func Title(c ...interface{}) *Element {
return NewElement("title", c...)
}
// Tr returns an <tr> element with optional children or attributes
func Tr(c ...interface{}) *Element {
return NewElement("tr", c...)
}
// U returns an <u> element with optional children or attributes
func U(c ...interface{}) *Element {
return NewElement("u", c...)
}
// Ul returns an <ul> element with optional children or attributes
func Ul(c ...interface{}) *Element {
return NewElement("ul", c...)
}
// Var returns an <var> element with optional children or attributes
func Var(c ...interface{}) *Element {
return NewElement("var", c...)
}
// Base returns a <base/> element with optional attributes
func Base(c ...interface{}) *Element {
return NewSimpleElement("base", c...)
}
// Br returns a <br/> element with optional attributes
func Br(c ...interface{}) *Element {
return NewSimpleElement("br", c...)
}
// Hr returns a <hr/> element with optional attributes
func Hr(c ...interface{}) *Element {
return NewSimpleElement("hr", c...)
}
// Img returns a <img/> element with optional attributes
func Img(c ...interface{}) *Element {
return NewSimpleElement("img", c...)
}
// Input returns a <input/> element with optional attributes
func Input(c ...interface{}) *Element {
return NewSimpleElement("input", c...)
}
// Keygen returns a <keygen/> element with optional attributes
func Keygen(c ...interface{}) *Element {
return NewSimpleElement("keygen", c...)
}
// Link returns a <link/> element with optional attributes
func Link(c ...interface{}) *Element {
return NewSimpleElement("link", c...)
}
// Meta returns a <meta/> element with optional attributes
func Meta(c ...interface{}) *Element {
return NewSimpleElement("meta", c...)
}
// Action returns a action="v" attribute
func Action(v string) *Attribute { return &Attribute{Name: "action", Val: v} }
// Alt returns a alt="v" attribute
func Alt(v string) *Attribute { return &Attribute{Name: "alt", Val: v} }
// Autocomplete returns a autocomplete="v" attribute
func Autocomplete(v string) *Attribute { return &Attribute{Name: "autocomplete", Val: v} }
// Charset returns a charset="v" attribute
func Charset(v string) *Attribute { return &Attribute{Name: "charset", Val: v} }
// Class returns a class="v" attribute
func Class(v string) *Attribute { return &Attribute{Name: "class", Val: v} }
// Content returns a content="v" attribute
func Content(v string) *Attribute { return &Attribute{Name: "content", Val: v} }
// Formaction returns a formaction="v" attribute
func Formaction(v string) *Attribute { return &Attribute{Name: "formaction", Val: v} }
// Href returns a href="v" attribute
func Href(v string) *Attribute { return &Attribute{Name: "href", Val: v} }
// Id returns a id="v" attribute
func Id(v string) *Attribute { return &Attribute{Name: "id", Val: v} }
// Lang returns a lang="v" attribute
func Lang(v string) *Attribute { return &Attribute{Name: "lang", Val: v} }
// Max returns a max="v" attribute
func Max(v string) *Attribute { return &Attribute{Name: "max", Val: v} }
// Maxlength returns a maxlength="v" attribute
func Maxlength(v string) *Attribute { return &Attribute{Name: "maxlength", Val: v} }
// Method returns a method="v" attribute
func Method(v string) *Attribute { return &Attribute{Name: "method", Val: v} }
// Min returns a min="v" attribute
func Min(v string) *Attribute { return &Attribute{Name: "min", Val: v} }
// Name returns a name="v" attribute
func Name(v string) *Attribute { return &Attribute{Name: "name", Val: v} }
// Placeholder returns a placeholder="v" attribute
func Placeholder(v string) *Attribute { return &Attribute{Name: "placeholder", Val: v} }
// Rel returns a rel="v" attribute
func Rel(v string) *Attribute { return &Attribute{Name: "rel", Val: v} }
// Size returns a size="v" attribute
func Size(v string) *Attribute { return &Attribute{Name: "size", Val: v} }
// Src returns a src="v" attribute
func Src(v string) *Attribute { return &Attribute{Name: "src", Val: v} }
// Tabindex returns a tabindex="v" attribute
func Tabindex(v string) *Attribute { return &Attribute{Name: "tabindex", Val: v} }
// Type returns a type="v" attribute
func Type(v string) *Attribute { return &Attribute{Name: "type", Val: v} }
// Value returns a value="v" attribute
func Value(v string) *Attribute { return &Attribute{Name: "value", Val: v} }
// OnBlur returns a onBlur="v" attribute
func OnBlur(v string) *Attribute { return &Attribute{Name: "onBlur", Val: v} }
// OnFocus returns a onFocus="v" attribute
func OnFocus(v string) *Attribute { return &Attribute{Name: "onFocus", Val: v} }
// OnLoad returns a onLoad="v" attribute
func OnLoad(v string) *Attribute { return &Attribute{Name: "onLoad", Val: v} }
// OnMouseDown returns a onMouseDown="v" attribute
func OnMouseDown(v string) *Attribute { return &Attribute{Name: "onMouseDown", Val: v} }
// OnMouseOut returns a onMouseOut="v" attribute
func OnMouseOut(v string) *Attribute { return &Attribute{Name: "onMouseOut", Val: v} }
// OnMouseOver returns a onMouseOver="v" attribute
func OnMouseOver(v string) *Attribute { return &Attribute{Name: "onMouseOver", Val: v} }
// OnMouseUp returns a onMouseUp="v" attribute
func OnMouseUp(v string) *Attribute { return &Attribute{Name: "onMouseUp", Val: v} }
// OnMouseWheel returns a onMouseWheel="v" attribute
func OnMouseWheel(v string) *Attribute { return &Attribute{Name: "onMouseWheel", Val: v} }