about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--html/attributes.go8
-rw-r--r--html/attributes_test.go2
2 files changed, 10 insertions, 0 deletions
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)
 }
diff --git a/html/attributes_test.go b/html/attributes_test.go
index 1388494..76e3390 100644
--- a/html/attributes_test.go
+++ b/html/attributes_test.go
@@ -51,6 +51,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"href":         Href,
 		"id":           ID,
 		"lang":         Lang,
+		"loading":      Loading,
 		"max":          Max,
 		"maxlength":    MaxLength,
 		"method":       Method,
@@ -65,6 +66,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"role":         Role,
 		"rows":         Rows,
 		"src":          Src,
+		"srcset":       SrcSet,
 		"style":        StyleAttr,
 		"tabindex":     TabIndex,
 		"target":       Target,