aboutsummaryrefslogtreecommitdiff
path: root/src/Lib/Dom/H.ml
diff options
context:
space:
mode:
authorJoris2020-08-08 12:49:03 +0200
committerJoris2020-08-08 12:49:03 +0200
commit081e6aae57719c15bdbc5e973ca7ddba9506a4bb (patch)
treea8de15bb4165639cf283bde7b7e63eb330e83d88 /src/Lib/Dom/H.ml
parent4ee0dfae75fda3a8b6347d55c728b50ce5c210d9 (diff)
downloadmap-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.tar.gz
map-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.tar.bz2
map-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.zip
Show context menu to add, modify and delete markers
Diffstat (limited to 'src/Lib/Dom/H.ml')
-rw-r--r--src/Lib/Dom/H.ml12
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"