all repos — gomponents @ 600b6c34df94ad0917970669680629260394ce7d

HTML components in pure Go

add script's integrity and crossorigin attributes

Julien Tant
commit

600b6c34df94ad0917970669680629260394ce7d

parent

5fa128bc8f245386539edf6002874aa4c2979ea6

2 files changed, 10 insertions(+), 0 deletions(-)

changed files
M html/attributes.gohtml/attributes.go
@@ -24,6 +24,10 @@ func Controls() g.Node {
return g.Attr("controls") } +func CrossOrigin(v string) g.Node { + return g.Attr("crossorigin", v) +} + func Defer() g.Node { return g.Attr("defer") }
@@ -128,6 +132,10 @@ }
func ID(v string) g.Node { return g.Attr("id", v) +} + +func Integrity(v string) g.Node { + return g.Attr("integrity", v) } func Lang(v string) g.Node {
M html/attributes_test.gohtml/attributes_test.go
@@ -47,12 +47,14 @@ "class": Class,
"cols": Cols, "colspan": ColSpan, "content": Content, + "crossorigin": CrossOrigin, "enctype": EncType, "for": For, "form": FormAttr, "height": Height, "href": Href, "id": ID, + "integrity": Integrity, "lang": Lang, "loading": Loading, "max": Max,