From b950ec2c42bd613fa23625ab6360f58b9ba28e07 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 6 Jun 2024 12:49:01 +0200 Subject: Add LabelAttr and List attributes (#175) Fixes #168 and fixes #169.--- html/attributes.go | 8 ++++++++ html/attributes_test.go | 2 ++ 2 files changed, 10 insertions(+) diff --git a/html/attributes.go b/html/attributes.go index 0bc5268..728807b 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -145,10 +145,18 @@ func Integrity(v string) g.Node { return g.Attr("integrity", v) } +func LabelAttr(v string) g.Node { + return g.Attr("label", v) +} + func Lang(v string) g.Node { return g.Attr("lang", v) } +func List(v string) g.Node { + return g.Attr("list", v) +} + func Loading(v string) g.Node { return g.Attr("loading", v) } diff --git a/html/attributes_test.go b/html/attributes_test.go index 1801428..acd17be 100644 --- a/html/attributes_test.go +++ b/html/attributes_test.go @@ -61,7 +61,9 @@ func TestSimpleAttributes(t *testing.T) { {Name: "href", Func: Href}, {Name: "id", Func: ID}, {Name: "integrity", Func: Integrity}, + {Name: "label", Func: LabelAttr}, {Name: "lang", Func: Lang}, + {Name: "list", Func: List}, {Name: "loading", Func: Loading}, {Name: "max", Func: Max}, {Name: "maxlength", Func: MaxLength}, -- cgit 1.4.1