packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/NavigationInterceptHandler.hs

{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.NavigationInterceptHandler
       (newNavigationInterceptHandler, newNavigationInterceptHandlerSync, newNavigationInterceptHandlerAsync, NavigationInterceptHandler)
       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

newNavigationInterceptHandler :: (MonadDOM m) => (IO ()) -> m NavigationInterceptHandler
newNavigationInterceptHandler callback = liftDOM ((NavigationInterceptHandler . coerce) <$> syncCallback ContinueAsync callback)

newNavigationInterceptHandlerSync :: (MonadDOM m) => (IO ()) -> m NavigationInterceptHandler
newNavigationInterceptHandlerSync callback = liftDOM ((NavigationInterceptHandler . coerce) <$> syncCallback ThrowWouldBlock callback)

newNavigationInterceptHandlerAsync :: (MonadDOM m) => (IO ()) -> m NavigationInterceptHandler
newNavigationInterceptHandlerAsync callback = liftDOM ((NavigationInterceptHandler . coerce) <$> asyncCallback callback)