Module Js_of_ocaml.ResizeObserver

ResizeObserver API

A code example:

if (ResizeObserver.is_supported ()) then
  let doc = Dom_html.document in
  let target =
    Js.Opt.get (doc##getElementById (Js.string "observed"))
      (fun () -> assert false)
  let node = (target :> Dom.node Js.t) in
  let f entries observer =
    Firebug.console##debug entries;
    Firebug.console##debug observer
  ResizeObserver.observe ~node ~f
    ~box:(Js.string "content-box")
class type resizeObserverSize = object ... end
class type resizeObserverEntry = object ... end
class type resizeObserverOptions = object ... end
class type resizeObserver = object ... end
val empty_resize_observer_options : unit -> resizeObserverOptions Js.t
val is_supported : unit -> bool

Helper to create a new observer and connect it to a node.