Repository: maragudk/gomponents (go)

Issue:
Add svg element

Pull request description:
Add svg element
Also add `cols` and `rows` attributes.

Fixes #43.

Patch:
diff --git a/attr/simple.go b/attr/simple.go
index d7d4ab8..a96c139 100644
--- a/attr/simple.go
+++ b/attr/simple.go
@@ -20,6 +20,10 @@ func Class(v string) g.Node {
 	return g.Attr("class", v)
 }
 
+func Cols(v string) g.Node {
+	return g.Attr("cols", v)
+}
+
 func Content(v string) g.Node {
 	return g.Attr("content", v)
 }
@@ -80,6 +84,10 @@ func Rel(v string) g.Node {
 	return g.Attr("rel", v)
 }
 
+func Rows(v string) g.Node {
+	return g.Attr("rows", v)
+}
+
 func Src(v string) g.Node {
 	return g.Attr("src", v)
 }
diff --git a/el/simple.go b/el/simple.go
index 2fb4c3e..1ebf33f 100644
--- a/el/simple.go
+++ b/el/simple.go
@@ -216,6 +216,10 @@ func Summary(children ...g.Node) g.NodeFunc {
 	return g.El("summary", children...)
 }
 
+func SVG(children ...g.Node) g.NodeFunc {
+	return g.El("svg", children...)
+}
+
 func Table(children ...g.Node) g.NodeFunc {
 	return g.El("table", children...)
 }


Test patch:
diff --git a/attr/simple_test.go b/attr/simple_test.go
index 6181322..d006b76 100644
--- a/attr/simple_test.go
+++ b/attr/simple_test.go
@@ -15,6 +15,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"autocomplete": attr.AutoComplete,
 		"charset":      attr.Charset,
 		"class":        attr.Class,
+		"cols":         attr.Cols,
 		"content":      attr.Content,
 		"form":         attr.Form,
 		"height":       attr.Height,
@@ -30,6 +31,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"preload":      attr.Preload,
 		"placeholder":  attr.Placeholder,
 		"rel":          attr.Rel,
+		"rows":         attr.Rows,
 		"src":          attr.Src,
 		"style":        attr.Style,
 		"tabindex":     attr.TabIndex,
diff --git a/el/simple_test.go b/el/simple_test.go
index f01ba51..2621982 100644
--- a/el/simple_test.go
+++ b/el/simple_test.go
@@ -54,6 +54,7 @@ func TestSimpleElements(t *testing.T) {
 		"span":       el.Span,
 		"style":      el.Style,
 		"summary":    el.Summary,
+		"svg":        el.SVG,
 		"table":      el.Table,
 		"tbody":      el.TBody,
 		"td":         el.Td,