all repos — gomponents @ 05d56605492cb89bebd80421a6d2afaa947344f0

HTML components in pure Go

Add missing 'hidden' attribute (#224)

Guy-Laurent Subri
commit

05d56605492cb89bebd80421a6d2afaa947344f0

parent

73373c8a290e8f16e0ac59b5aa082ca9a21cec98

3 files changed, 6 insertions(+), 0 deletions(-)

changed files
M CONTRIBUTORS.mdCONTRIBUTORS.md
@@ -7,3 +7,4 @@ in the sidebar, also if you have not contributed code.
- Markus Wüstenberg, @markuswustenberg / @maragudk - Hans Raaf, @oderwat +- Guy-Laurent Subri, @glsubri
M html/attributes.gohtml/attributes.go
@@ -145,6 +145,10 @@ func Height(v string) g.Node {
return g.Attr("height", v) } +func Hidden(v string) g.Node { + return g.Attr("hidden", v) +} + func Href(v string) g.Node { return g.Attr("href", v) }
M html/attributes_test.gohtml/attributes_test.go
@@ -62,6 +62,7 @@ {Name: "dir", Func: Dir},
{Name: "for", Func: For}, {Name: "form", Func: FormAttr}, {Name: "height", Func: Height}, + {Name: "hidden", Func: Hidden}, {Name: "href", Func: Href}, {Name: "id", Func: ID}, {Name: "integrity", Func: Integrity},