diff options
-rw-r--r-- | html/attributes.go | 4 | ||||
-rw-r--r-- | html/attributes_test.go | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go index 98d70ff..8a1d11e 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -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") } diff --git a/html/attributes_test.go b/html/attributes_test.go index 0deb06c..aba185e 100644 --- a/html/attributes_test.go +++ b/html/attributes_test.go @@ -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}, |