jsaddle-dom-0.9.2.0: DOM library that uses jsaddle to support both GHCJS and GHC

Safe HaskellNone
LanguageHaskell2010

JSDOM

Synopsis

Documentation

syncPoint :: JSM () #

Forces execution of pending asyncronous code

syncAfter :: JSM a -> JSM a #

Forces execution of pending asyncronous code after performing f

waitForAnimationFrame :: JSM Double #

On GHCJS this is waitForAnimationFrame. On GHC it will delay the execution of the current batch of asynchronous command when they are sent to JavaScript. It will not delay the Haskell code execution. The time returned will be based on the Haskell clock (not the JavaScript clock).

nextAnimationFrame :: (Double -> JSM a) -> JSM a #

Tries to executes the given code in the next animation frame callback. Avoid synchronous opperations where possible.

inAnimationFrame Source #

Arguments

:: OnBlocked

what to do when encountering a blocking call

-> (Double -> JSM ())

the action to run

-> JSM AnimationFrameHandle 

Run the action in an animationframe callback. The action runs in a synchronous thread, and is passed the high-performance clock time stamp for that frame.

inAnimationFrame' Source #

Arguments

:: (Double -> JSM ())

the action to run

-> JSM AnimationFrameHandle 

Run the action in an animationframe callback. The action runs in a synchronous thread, and is passed the high-performance clock time stamp for that frame. On GHCJS this version will continue asynchronously if it is not possible to complete the callback synchronously.

catch :: Exception e => JSM b -> (e -> JSM b) -> JSM b #

Wrapped version of catch that runs in a MonadIO that works a bit better with JSM

bracket :: JSM a -> (a -> JSM b) -> (a -> JSM c) -> JSM c #

Wrapped version of bracket that runs in a MonadIO that works a bit better with JSM