Skip to content

Commit

Permalink
Add LabelAttr and List attributes (#175)
Browse files Browse the repository at this point in the history
Fixes #168 and fixes #169.
  • Loading branch information
markuswustenberg committed Jun 6, 2024
1 parent 81b2d6a commit b950ec2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions html/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,18 @@ func Integrity(v string) g.Node {
return g.Attr("integrity", v)
}

func LabelAttr(v string) g.Node {
return g.Attr("label", v)
}

func Lang(v string) g.Node {
return g.Attr("lang", v)
}

func List(v string) g.Node {
return g.Attr("list", v)
}

func Loading(v string) g.Node {
return g.Attr("loading", v)
}
Expand Down
2 changes: 2 additions & 0 deletions html/attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ func TestSimpleAttributes(t *testing.T) {
{Name: "href", Func: Href},
{Name: "id", Func: ID},
{Name: "integrity", Func: Integrity},
{Name: "label", Func: LabelAttr},
{Name: "lang", Func: Lang},
{Name: "list", Func: List},
{Name: "loading", Func: Loading},
{Name: "max", Func: Max},
{Name: "maxlength", Func: MaxLength},
Expand Down

0 comments on commit b950ec2

Please sign in to comment.