diff options
Diffstat (limited to 'src/Lib/Dom/H.ml')
-rw-r--r-- | src/Lib/Dom/H.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Lib/Dom/H.ml b/src/Lib/Dom/H.ml index d547a70..7213daf 100644 --- a/src/Lib/Dom/H.ml +++ b/src/Lib/Dom/H.ml @@ -7,30 +7,30 @@ type attribute = let h tag attributes children = let element = if tag == "svg" || tag == "path" then - Document.createElementNS "http://www.w3.org/2000/svg" tag - else Document.createElement tag + Document.create_element_ns "http://www.w3.org/2000/svg" tag + else Document.create_element tag in let () = Js.Array.forEach (fun attr -> match attr with | TextAttr (name, value) -> - Element.setAttribute element name value + Element.set_attribute element name value | EventAttr (name, eventListener) -> - Element.addEventListener element name eventListener) + Element.add_event_listener element name eventListener) attributes in let () = Js.Array.forEach - (fun child -> Element.appendChild element child) + (fun child -> Element.append_child element child) children in element (* Node creation *) -let text = Document.createTextNode +let text = Document.create_text_node let div = h "div" |