From 0368e39c137c7f1ab37c84c0787fd6cc9da0c34b Mon Sep 17 00:00:00 2001
From: Stéphane Legrand
Date: Thu, 6 Feb 2025 10:32:15 +0100
Subject: Add 'download' and 'referrerpolicy' attributes for anchor element
(#242)
Hello,
A patch to add
[`download`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download)
and
[`referrerpolicy`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy)
for the anchor `` element.---
html/attributes.go | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'html/attributes.go')
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)
}
--
cgit 1.4.1