From 33524d683661bf73fd224a76ec62fb88b2b3c767 Mon Sep 17 00:00:00 2001 From: Josep Jesus Bigorra Algaba Date: Tue, 7 Sep 2021 12:09:57 +0200 Subject: Add loading and srcset HTML attributes (#86) Useful for `img` and `picture` elements. Fixes #85. Co-authored-by: Josep Jesus Bigorra Algaba --- 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 b670b05..5a3dc3a 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -126,6 +126,10 @@ func Lang(v string) g.Node { return g.Attr("lang", v) } +func Loading(v string) g.Node { + return g.Attr("loading", v) +} + func Max(v string) g.Node { return g.Attr("max", v) } @@ -182,6 +186,10 @@ func Src(v string) g.Node { return g.Attr("src", v) } +func SrcSet(v string) g.Node { + return g.Attr("srcset", v) +} + func StyleAttr(v string) g.Node { return g.Attr("style", v) } -- cgit 1.4.1