From 8e4b1319d12e11fe62725fc30ea01b1f274f8c50 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Tue, 17 Jan 2023 13:05:47 +0100 Subject: Add Step attribute (#126) See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step Fixes #120.--- html/attributes.go | 4 ++++ html/attributes_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/html/attributes.go b/html/attributes.go index 5e56683..3c69f94 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -198,6 +198,10 @@ func SrcSet(v string) g.Node { return g.Attr("srcset", v) } +func Step(v string) g.Node { + return g.Attr("step", v) +} + func StyleAttr(v string) g.Node { return g.Attr("style", v) } diff --git a/html/attributes_test.go b/html/attributes_test.go index 4071101..5e2c179 100644 --- a/html/attributes_test.go +++ b/html/attributes_test.go @@ -70,6 +70,7 @@ func TestSimpleAttributes(t *testing.T) { "rowspan": RowSpan, "src": Src, "srcset": SrcSet, + "step": Step, "style": StyleAttr, "tabindex": TabIndex, "target": Target, -- cgit 1.4.1