March Docs

Arcade.Web.Glue

Functions

fndevice_pixel_ratiodevice_pixel_ratio() : Float#
fnnownow() : Float#
fnon_visibilityon_visibility(cb : Bool -> ()) : ()#
fnpost_jsonpost_json(url : String, body : String, timeout_ms : Int, reply : (Int, String) -> (), fail : (Bool, String) -> ()) : ()#

POST a JSON body to url, aborted after timeout_ms. reply gets the HTTP status and body of any answer; fail gets (timed out, the browser's message, "" when it gave none) when there was no HTTP answer.

fnrequest_framerequest_frame(cb : Float -> ()) : ()#
fnseed_limbsseed_limbs() : (Int, Int)#

fn size_canvas(canvas : Js.Dom.Node, w : Float, h : Float, dpr : Float) : () do glue_size_canvas(canvas, w, h, dpr) end

fnset_html_keepingset_html_keeping(pane : Js.Dom.Node, html : String) : ()#
fnvibratevibrate(ms : Int) : ()#
fnview_sizeview_size() : (Float, Float)#