all repos — gomponents @ 8dbfcb97c09253859ac02abc0c7a46a3635a6f6e

HTML components in pure Go

Add the output HTML element (#279) Hello! I noticed that the `<output>` element was missing from this library. This small PR addresses that. More information about the `<output>` element can be found on [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/output).

Ryan Hendrickson
commit

8dbfcb97c09253859ac02abc0c7a46a3635a6f6e

parent

c9514826afafc6ae626ed77a4531712be0f41770

2 files changed, 5 insertions(+), 0 deletions(-)

changed files
M html/elements.gohtml/elements.go
@@ -228,6 +228,10 @@ func OptGroup(children ...g.Node) g.Node {
return g.El("optgroup", children...) } +func Output(children ...g.Node) g.Node { + return g.El("output", children...) +} + func Option(children ...g.Node) g.Node { return g.El("option", children...) }
M html/elements_test.gohtml/elements_test.go
@@ -94,6 +94,7 @@ {Name: "object", Func: Object},
{Name: "ol", Func: Ol}, {Name: "optgroup", Func: OptGroup}, {Name: "option", Func: Option}, + {Name: "output", Func: Output}, {Name: "p", Func: P}, {Name: "picture", Func: Picture}, {Name: "pre", Func: Pre},