all repos — gomponents @ 6e5081e5671191475bf5cc858cda66a07cabd1d5

HTML components in pure Go

Add Open boolean attribute for HTML details element (#270) Fixes #268 Adds the "Open" boolean attribute helper for HTML <details> elements, as specified in https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details#open ## Changes - Added `Open()` function to attributes.go - Added test case in attributes_test.go 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Markus Wüstenberg <markuswustenberg@users.noreply.github.com>

Markus Wüstenberg
commit

6e5081e5671191475bf5cc858cda66a07cabd1d5

parent

e9e1e9069bf365851becfbd5099d844c6ce9e171

1 file changed, 4 insertions(+), 0 deletions(-)

changed files
M html/attributes.gohtml/attributes.go
@@ -60,6 +60,10 @@ func Muted() g.Node {
return g.Attr("muted") } +func Open() g.Node { + return g.Attr("open") +} + func PlaysInline() g.Node { return g.Attr("playsinline") }