diff options
-rw-r--r-- | html/attributes.go | 8 | ||||
-rw-r--r-- | html/attributes_test.go | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go index 6da541d..fb2748b 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -40,6 +40,10 @@ func Disabled() g.Node { return g.Attr("disabled") } +func Download(v string) g.Node { + return g.Attr("download", v) +} + func Draggable(v string) g.Node { return g.Attr("draggable", v) } @@ -253,6 +257,10 @@ func Preload(v string) g.Node { return g.Attr("preload", v) } +func ReferrerPolicy(v string) g.Node { + return g.Attr("referrerpolicy", v) +} + func Rel(v string) g.Node { return g.Attr("rel", v) } diff --git a/html/attributes_test.go b/html/attributes_test.go index 9b668b2..88185b1 100644 --- a/html/attributes_test.go +++ b/html/attributes_test.go @@ -60,6 +60,7 @@ func TestSimpleAttributes(t *testing.T) { {Name: "draggable", Func: Draggable}, {Name: "enctype", Func: EncType}, {Name: "dir", Func: Dir}, + {Name: "download", Func: Download}, {Name: "for", Func: For}, {Name: "form", Func: FormAttr}, {Name: "formaction", Func: FormAction}, @@ -87,6 +88,7 @@ func TestSimpleAttributes(t *testing.T) { {Name: "popovertargetaction", Func: PopoverTargetAction}, {Name: "poster", Func: Poster}, {Name: "preload", Func: Preload}, + {Name: "referrerpolicy", Func: ReferrerPolicy}, {Name: "rel", Func: Rel}, {Name: "role", Func: Role}, {Name: "rows", Func: Rows}, |