about summary refs log tree commit diff stats
path: root/html/elements.go
diff options
context:
space:
mode:
authorKen Powers2024-10-25 14:34:35 -0400
committerGitHub2024-10-25 20:34:35 +0200
commit2e44d495769421423921bfcb06ebfc53f8370dd3 (patch)
tree73915bb9e056d23f326b740e0ac61fbee3dc9177 /html/elements.go
parent87bb2f37cb56ea53aafb06d5e264935a49e65bd6 (diff)
downloadgomponents-2e44d495769421423921bfcb06ebfc53f8370dd3.tar.lz
gomponents-2e44d495769421423921bfcb06ebfc53f8370dd3.tar.zst
gomponents-2e44d495769421423921bfcb06ebfc53f8370dd3.zip
Add web component elements and slot attribute (#235)
The slot attribute is a standard attribute for use with web components:
https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots
Diffstat (limited to 'html/elements.go')
-rw-r--r--html/elements.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/html/elements.go b/html/elements.go
index efc83df..bf747a1 100644
--- a/html/elements.go
+++ b/html/elements.go
@@ -264,6 +264,10 @@ func Select(children ...g.Node) g.Node {
 	return g.El("select", children...)
 }
 
+func SlotEl(children ...g.Node) g.Node {
+	return g.El("slot", children...)
+}
+
 func Source(children ...g.Node) g.Node {
 	return g.El("source", children...)
 }
@@ -296,6 +300,10 @@ func Td(children ...g.Node) g.Node {
 	return g.El("td", children...)
 }
 
+func Template(children ...g.Node) g.Node {
+	return g.El("template", children...)
+}
+
 func Textarea(children ...g.Node) g.Node {
 	return g.El("textarea", children...)
 }