Add loading and srcset HTML attributes (#86) Useful for `img` and `picture` elements. Fixes #85. Co-authored-by: Josep Jesus Bigorra Algaba <josep@prowarehouse.nl>
1 file changed, 8 insertions(+), 0 deletions(-)
changed files
M html/attributes.go → 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) }@@ -180,6 +184,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 {