all repos — gomponents @ 33524d683661bf73fd224a76ec62fb88b2b3c767

HTML components in pure Go

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>

commit

33524d683661bf73fd224a76ec62fb88b2b3c767

parent

bd722def2798c8a5a53d0fa87755efefd146198d

1 file changed, 8 insertions(+), 0 deletions(-)

changed files
M html/attributes.gohtml/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 {