Js_of_ocaml.PerformanceObserverPerformanceObserver API
A code example:
if (PerformanceObserver.is_supported()) then
let entry_types = [ "measure" ] in
let f entries observer =
let entries = entries##getEntries in
Console.console##debug entries ;
Console.console##debug observer
in
PerformanceObserver.observe ~entry_types ~f
()class type performanceObserverInit = object ... endclass type performanceEntry = object ... endclass type performanceObserverEntryList = object ... endclass type performanceObserver = object ... endval performanceObserver :
((performanceObserverEntryList Js.t ->
performanceObserver Js.t ->
unit)
Js.callback ->
performanceObserver Js.t)
Js.constrval observe :
entry_types:string list ->
f:(performanceObserverEntryList Js.t -> performanceObserver Js.t -> unit) ->
performanceObserver Js.t