Safe Haskell | None |
---|---|
Language | Haskell2010 |
- currentWindow :: MonadDOM m => m (Maybe Window)
- currentDocument :: MonadDOM m => m (Maybe Document)
- syncPoint :: JSM ()
- syncAfter :: JSM a -> JSM a
- waitForAnimationFrame :: JSM Double
- nextAnimationFrame :: (Double -> JSM a) -> JSM a
- catch :: Exception e => JSM b -> (e -> JSM b) -> JSM b
- bracket :: JSM a -> (a -> JSM b) -> (a -> JSM c) -> JSM c
Documentation
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.