Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing 'hidden' attribute #224

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ in the sidebar, also if you have not contributed code.

- Markus Wüstenberg, @markuswustenberg / @maragudk
- Hans Raaf, @oderwat
- Guy-Laurent Subri, @glsubri
4 changes: 4 additions & 0 deletions html/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ func Height(v string) g.Node {
return g.Attr("height", v)
}

func Hidden(v string) g.Node {
return g.Attr("hidden", v)
}

func Href(v string) g.Node {
return g.Attr("href", v)
}
Expand Down
1 change: 1 addition & 0 deletions html/attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestSimpleAttributes(t *testing.T) {
{Name: "for", Func: For},
{Name: "form", Func: FormAttr},
{Name: "height", Func: Height},
{Name: "hidden", Func: Hidden},
{Name: "href", Func: Href},
{Name: "id", Func: ID},
{Name: "integrity", Func: Integrity},
Expand Down
Loading