diff options
author | Joris | 2020-08-08 12:49:03 +0200 |
---|---|---|
committer | Joris | 2020-08-08 12:49:03 +0200 |
commit | 081e6aae57719c15bdbc5e973ca7ddba9506a4bb (patch) | |
tree | a8de15bb4165639cf283bde7b7e63eb330e83d88 /src/Lib/Dom/Document.ml | |
parent | 4ee0dfae75fda3a8b6347d55c728b50ce5c210d9 (diff) |
Show context menu to add, modify and delete markers
Diffstat (limited to 'src/Lib/Dom/Document.ml')
-rw-r--r-- | src/Lib/Dom/Document.ml | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Lib/Dom/Document.ml b/src/Lib/Dom/Document.ml index 39c1bb4..46f983a 100644 --- a/src/Lib/Dom/Document.ml +++ b/src/Lib/Dom/Document.ml @@ -1,16 +1,19 @@ -external createElement : string -> Dom.element = "createElement" +external body : Dom.element = "body" [@@bs.val] [@@bs.scope "document"] -external createElementNS : string -> string -> Dom.element = "createElementNS" +external create_element : string -> Dom.element = "createElement" [@@bs.val] [@@bs.scope "document"] -external querySelector : string -> Dom.element Js.Nullable.t = "querySelector" +external create_element_ns : string -> string -> Dom.element = "createElementNS" [@@bs.val] [@@bs.scope "document"] -let querySelectorUnsafe id = - querySelector id |> Js.Nullable.toOption |> Js.Option.getExn +external query_selector : string -> Dom.element Js.Nullable.t = "querySelector" + [@@bs.val] [@@bs.scope "document"] + +let query_selector_unsafe id = + query_selector id |> Js.Nullable.toOption |> Js.Option.getExn -external createTextNode : string -> Dom.element = "createTextNode" +external create_text_node : string -> Dom.element = "createTextNode" [@@bs.val] [@@bs.scope "document"] external location : Location.location = "location" |