mirror of
https://github.com/ilyakooo0/reflex-dom.git
synced 2024-09-11 06:35:30 +03:00
19 lines
616 B
Haskell
19 lines
616 B
Haskell
{-# LANGUAGE ForeignFunctionInterface #-}
|
|
{-# LANGUAGE JavaScriptFFI #-}
|
|
|
|
module Foreign.JavaScript.Internal.Utils
|
|
( synchronously
|
|
, freeRequestAnimationFrameCallback
|
|
, js_dataView
|
|
) where
|
|
|
|
import GHCJS.Concurrent
|
|
import GHCJS.DOM.Types (JSM, JSVal, RequestAnimationFrameCallback (..))
|
|
import GHCJS.Foreign.Callback (releaseCallback)
|
|
|
|
freeRequestAnimationFrameCallback :: RequestAnimationFrameCallback -> JSM ()
|
|
freeRequestAnimationFrameCallback (RequestAnimationFrameCallback cb) = releaseCallback cb
|
|
|
|
foreign import javascript safe "new DataView($3,$1,$2)"
|
|
js_dataView :: Int -> Int -> JSVal -> IO JSVal
|