Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8dbfcb9

Browse files
authored
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).
1 parent c951482 commit 8dbfcb9

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

html/elements.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ func OptGroup(children ...g.Node) g.Node {
228228
return g.El("optgroup", children...)
229229
}
230230

231+
func Output(children ...g.Node) g.Node {
232+
return g.El("output", children...)
233+
}
234+
231235
func Option(children ...g.Node) g.Node {
232236
return g.El("option", children...)
233237
}

html/elements_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func TestSimpleElements(t *testing.T) {
9494
{Name: "ol", Func: Ol},
9595
{Name: "optgroup", Func: OptGroup},
9696
{Name: "option", Func: Option},
97+
{Name: "output", Func: Output},
9798
{Name: "p", Func: P},
9899
{Name: "picture", Func: Picture},
99100
{Name: "pre", Func: Pre},

0 commit comments

Comments
 (0)