ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/VoidFunction.hs
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webidl (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.VoidFunction
(newVoidFunction, newVoidFunctionSync, newVoidFunctionAsync, VoidFunction)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import Data.Coerce (coerce)
import GHC.JS.Foreign.Callback (OnBlocked(..), syncCallback, asyncCallback)
import GHCJS.DOM.Types
import GHCJS.DOM.JSFFI.Generated.Enums
newVoidFunction :: (MonadDOM m) => (IO ()) -> m VoidFunction
newVoidFunction callback = liftDOM ((VoidFunction . coerce) <$> syncCallback ContinueAsync callback)
newVoidFunctionSync :: (MonadDOM m) => (IO ()) -> m VoidFunction
newVoidFunctionSync callback = liftDOM ((VoidFunction . coerce) <$> syncCallback ThrowWouldBlock callback)
newVoidFunctionAsync :: (MonadDOM m) => (IO ()) -> m VoidFunction
newVoidFunctionAsync callback = liftDOM ((VoidFunction . coerce) <$> asyncCallback callback)