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 8a1d11e..edaf85e 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -40,6 +40,10 @@ func Disabled() g.Node {
 	return g.Attr("disabled")
 }
 
+func Draggable(v string) g.Node {
+	return g.Attr("draggable", v)
+}
+
 func Loop() g.Node {
 	return g.Attr("loop")
 }
diff --git a/html/attributes_test.go b/html/attributes_test.go
index aba185e..92ce0d6 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: "datetime", Func: DateTime},
+		{Name: "draggable", Func: Draggable},
 		{Name: "enctype", Func: EncType},
 		{Name: "dir", Func: Dir},
 		{Name: "for", Func: For},