Added title element

This commit is contained in:
Brandon Dyck 2019-03-23 00:43:48 -06:00
parent 22fe88873a
commit 2e5426d211
2 changed files with 14 additions and 0 deletions

View File

@ -101,3 +101,16 @@ func Li(attribs ...Attrib) func(children ...Term) *ParentElement {
}
}
}
// Title creates a <title> element.
func Title(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "title",
Attribs: attribs,
},
Children: children,
}
}
}

View File

@ -6,3 +6,4 @@ img empty
span parent
ul parent
li parent
title parent