Added WHATWG HTML5 element defs
This commit is contained in:
parent
62026132a8
commit
6948cdde4f
107
html5/defs.json
107
html5/defs.json
@ -5,14 +5,119 @@
|
||||
{"name": "src", "type": "string"}
|
||||
],
|
||||
"elements": [
|
||||
{"name": "a"},
|
||||
{"name": "abbr"},
|
||||
{"name": "address"},
|
||||
{"name": "area", "void": true},
|
||||
{"name": "article"},
|
||||
{"name": "aside"},
|
||||
{"name": "audio"},
|
||||
{"name": "b"},
|
||||
{"name": "base", "void": true},
|
||||
{"name": "bdi"},
|
||||
{"name": "bdo"},
|
||||
{"name": "blockquote"},
|
||||
{"name": "body"},
|
||||
{"name": "br", "void": true},
|
||||
{"name": "button"},
|
||||
{"name": "canvas"},
|
||||
{"name": "caption"},
|
||||
{"name": "cite"},
|
||||
{"name": "code"},
|
||||
{"name": "col", "void": true},
|
||||
{"name": "colgroup"},
|
||||
{"name": "data"},
|
||||
{"name": "datalist"},
|
||||
{"name": "dd"},
|
||||
{"name": "del"},
|
||||
{"name": "details"},
|
||||
{"name": "dfn"},
|
||||
{"name": "dialog"},
|
||||
{"name": "div"},
|
||||
{"name": "dl"},
|
||||
{"name": "dt"},
|
||||
{"name": "em"},
|
||||
{"name": "embed", "void": true},
|
||||
{"name": "fieldset"},
|
||||
{"name": "figcaption"},
|
||||
{"name": "figure"},
|
||||
{"name": "footer"},
|
||||
{"name": "form"},
|
||||
{"name": "h1"},
|
||||
{"name": "h2"},
|
||||
{"name": "h3"},
|
||||
{"name": "h4"},
|
||||
{"name": "h5"},
|
||||
{"name": "h6"},
|
||||
{"name": "head"},
|
||||
{"name": "header"},
|
||||
{"name": "hgroup"},
|
||||
{"name": "hr", "void": true},
|
||||
{"name": "html"},
|
||||
{"name": "i"},
|
||||
{"name": "iframe"},
|
||||
{"name": "img", "void": true},
|
||||
{"name": "input", "void": true},
|
||||
{"name": "ins"},
|
||||
{"name": "kbd"},
|
||||
{"name": "label"},
|
||||
{"name": "legend"},
|
||||
{"name": "li"},
|
||||
{"name": "link", "void": true},
|
||||
{"name": "main"},
|
||||
{"name": "map"},
|
||||
{"name": "mark"},
|
||||
{"name": "math"},
|
||||
{"name": "menu"},
|
||||
{"name": "meta", "void": true},
|
||||
{"name": "meter"},
|
||||
{"name": "nav"},
|
||||
{"name": "noscript"},
|
||||
{"name": "object"},
|
||||
{"name": "ol"},
|
||||
{"name": "optgroup"},
|
||||
{"name": "option"},
|
||||
{"name": "output"},
|
||||
{"name": "p"},
|
||||
{"name": "param", "void": true},
|
||||
{"name": "picture"},
|
||||
{"name": "pre"},
|
||||
{"name": "progress"},
|
||||
{"name": "q"},
|
||||
{"name": "rp"},
|
||||
{"name": "rt"},
|
||||
{"name": "ruby"},
|
||||
{"name": "s"},
|
||||
{"name": "samp"},
|
||||
{"name": "script"},
|
||||
{"name": "section"},
|
||||
{"name": "select"},
|
||||
{"name": "slot"},
|
||||
{"name": "small"},
|
||||
{"name": "source", "void": true},
|
||||
{"name": "span"},
|
||||
{"name": "strong"},
|
||||
{"name": "style"},
|
||||
{"name": "sub"},
|
||||
{"name": "summary"},
|
||||
{"name": "sup"},
|
||||
{"name": "svg"},
|
||||
{"name": "table"},
|
||||
{"name": "tbody"},
|
||||
{"name": "td"},
|
||||
{"name": "template"},
|
||||
{"name": "textarea"},
|
||||
{"name": "tfoot"},
|
||||
{"name": "th"},
|
||||
{"name": "thead"},
|
||||
{"name": "time"},
|
||||
{"name": "title"},
|
||||
{"name": "ul"}
|
||||
{"name": "tr"},
|
||||
{"name": "track", "void": true},
|
||||
{"name": "u"},
|
||||
{"name": "ul"},
|
||||
{"name": "var"},
|
||||
{"name": "video"},
|
||||
{"name": "wbr", "void": true}
|
||||
]
|
||||
}
|
||||
|
1300
html5/generated.go
1300
html5/generated.go
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,8 @@ package html5
|
||||
|
||||
import "gitlab.codemonkeysoftware.net/b/hatmill"
|
||||
|
||||
// Data creates an attribute of the form "data-suffix='value'".
|
||||
func Data(suffix, value string) hatmill.Attrib {
|
||||
// CustomData creates an attribute of the form data-suffix='value'.
|
||||
func CustomData(suffix, value string) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "data-" + suffix,
|
||||
Value: value,
|
||||
|
@ -17,7 +17,7 @@ func Example() {
|
||||
html5.Div()(
|
||||
html5.Img(html5.Src("./me.jpg"), html5.Id("profile-photo")),
|
||||
html5.Text(html.EscapeString(userInput)),
|
||||
html5.Div(html5.Disabled(), html5.Data("coolness", "awesome"))(),
|
||||
html5.Div(html5.Disabled(), html5.CustomData("coolness", "awesome"))(),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user