diff options
author | Markus Wüstenberg | 2023-01-17 13:05:47 +0100 |
---|---|---|
committer | GitHub | 2023-01-17 12:05:47 +0000 |
commit | 8e4b1319d12e11fe62725fc30ea01b1f274f8c50 (patch) | |
tree | 87df4fd6c60ce06427698b6efb0a3b122b4bdcb5 | |
parent | e11dcad5185a1fb35a62076d4357c697da108ad7 (diff) | |
download | gomponents-8e4b1319d12e11fe62725fc30ea01b1f274f8c50.tar.lz gomponents-8e4b1319d12e11fe62725fc30ea01b1f274f8c50.tar.zst gomponents-8e4b1319d12e11fe62725fc30ea01b1f274f8c50.zip |
Add Step attribute (#126)
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step Fixes #120.
-rw-r--r-- | html/attributes.go | 4 | ||||
-rw-r--r-- | html/attributes_test.go | 1 |
2 files changed, 5 insertions, 0 deletions
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, |