Skip to content

Commit

Permalink
add datetime attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienTant committed Jun 20, 2024
1 parent dafb3da commit 938ba1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func CrossOrigin(v string) g.Node {
return g.Attr("crossorigin", v)
}

func DateTime(v string) g.Node {
return g.Attr("datetime", v)
}

func Defer() g.Node {
return g.Attr("defer")
}
Expand Down
1 change: 1 addition & 0 deletions html/attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func TestSimpleAttributes(t *testing.T) {
{Name: "colspan", Func: ColSpan},
{Name: "content", Func: Content},
{Name: "crossorigin", Func: CrossOrigin},
{Name: "datetime", Func: DateTime},
{Name: "enctype", Func: EncType},
{Name: "dir", Func: Dir},
{Name: "for", Func: For},
Expand Down

0 comments on commit 938ba1c

Please sign in to comment.