blob: 867e28cf506e463a68c7458628f7fd46864a3b6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
external createElement : string -> Dom.element = "createElement"
[@@bs.val] [@@bs.scope "document"]
external createElementNS : string -> string -> Dom.element = "createElementNS"
[@@bs.val] [@@bs.scope "document"]
external querySelector : string -> Dom.element Js.Nullable.t = "querySelector"
[@@bs.val] [@@bs.scope "document"]
let querySelectorUnsafe id =
querySelector id |> Js.Nullable.toOption |> Js.Option.getExn
external createTextNode : string -> Dom.element = "createTextNode"
[@@bs.val] [@@bs.scope "document"]
|