external body : Dom.element = "body" [@@bs.val] [@@bs.scope "document"] external create_element : string -> Dom.element = "createElement" [@@bs.val] [@@bs.scope "document"] external create_element_ns : string -> string -> Dom.element = "createElementNS" [@@bs.val] [@@bs.scope "document"] 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 create_text_node : string -> Dom.element = "createTextNode" [@@bs.val] [@@bs.scope "document"] external location : Location.location = "location" [@@bs.val] [@@bs.scope "document"]