diff --git a/Sources/Html/ChildOf.swift b/Sources/Html/ChildOf.swift index dd9b1ce..61b4ddb 100644 --- a/Sources/Html/ChildOf.swift +++ b/Sources/Html/ChildOf.swift @@ -42,6 +42,10 @@ extension ChildOf { public static func script(attributes: [Attribute] = [], unsafe content: String = "") -> ChildOf { return .init(.script(attributes: attributes, unsafe: content)) } + + public static func template(attributes: [Attribute] = [], _ content: Node...) -> ChildOf { + return .init(.template(attributes: attributes, .fragment(content))) + } } extension ChildOf where Element == Tag.Colgroup { diff --git a/Sources/Html/Elements.swift b/Sources/Html/Elements.swift index 2d84368..7e1463f 100644 --- a/Sources/Html/Elements.swift +++ b/Sources/Html/Elements.swift @@ -730,6 +730,10 @@ extension Node { return .element("table", attributes: attributes, ChildOf.fragment(content).rawValue) } + public static func template(attributes: [Attribute] = [], _ content: Node...) -> Node { + return .element("template", attributes: attributes, .fragment(content)) + } + /// The `