all repos — gomponents @ b2475a7680d50740eca93447eb6f8d2454c05656

HTML components in pure Go

Add draggable attribute (#185)

Leonardo Silveira
commit

b2475a7680d50740eca93447eb6f8d2454c05656

parent

8b43a908820fb8c6b8a0f6d68d11bb2596a9e033

2 files changed, 5 insertions(+), 0 deletions(-)

changed files
M html/attributes.gohtml/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") }
M html/attributes_test.gohtml/attributes_test.go
@@ -55,6 +55,7 @@ {Name: "colspan", Func: ColSpan},
{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},