1
0
Fork 0
mirror of https://github.com/MillironX/Kelpie.jl.git synced 2025-01-15 09:19:07 -05:00

Add root node constructor

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2022-03-31 19:23:47 -05:00
parent 926f286091
commit 73de5d39ea
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -2,6 +2,8 @@ module Kelpie
import EzXML: link!, EzXML import EzXML: link!, EzXML
export html
export html_element export html_element
""" """
@ -75,4 +77,15 @@ function html_element(name::AbstractString, content=nothing; kwargs...)
return el return el
end #function end #function
"""
html(content)
Creates a new HTML document filled with `content`.
"""
function html(content)
doc = EzXML.HTMLDocumentNode(nothing, nothing)
link_or_text!(doc, content)
return doc
end #function
end #module end #module