about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--html/attributes.go4
-rw-r--r--html/attributes_test.go1
2 files changed, 5 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go
index 728807b..98d70ff 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -270,3 +270,7 @@ func Width(v string) g.Node {
 func EncType(v string) g.Node {
 	return g.Attr("enctype", v)
 }
+
+func Dir(v string) g.Node {
+	return g.Attr("dir", v)
+}
diff --git a/html/attributes_test.go b/html/attributes_test.go
index acd17be..0deb06c 100644
--- a/html/attributes_test.go
+++ b/html/attributes_test.go
@@ -55,6 +55,7 @@ func TestSimpleAttributes(t *testing.T) {
 		{Name: "content", Func: Content},
 		{Name: "crossorigin", Func: CrossOrigin},
 		{Name: "enctype", Func: EncType},
+		{Name: "dir", Func: Dir},
 		{Name: "for", Func: For},
 		{Name: "form", Func: FormAttr},
 		{Name: "height", Func: Height},