jsaddle-dom-0.10.0.0: src/JSDOM/Generated/NavigationInterceptHandler.hs
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module JSDOM.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 Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import JSDOM.Generated.Enums
newNavigationInterceptHandler :: (MonadDOM m) => (JSM ()) -> m NavigationInterceptHandler
newNavigationInterceptHandler callback = liftDOM (NavigationInterceptHandler . Callback <$> function (\ _ _ args -> case args ++ P.repeat jsUndefined of
_ -> do
callback ))
newNavigationInterceptHandlerSync :: (MonadDOM m) => (JSM ()) -> m NavigationInterceptHandler
newNavigationInterceptHandlerSync callback = liftDOM (NavigationInterceptHandler . Callback <$> function (\ _ _ args -> case args ++ P.repeat jsUndefined of
_ -> do
callback ))
newNavigationInterceptHandlerAsync :: (MonadDOM m) => (JSM ()) -> m NavigationInterceptHandler
newNavigationInterceptHandlerAsync callback = liftDOM (NavigationInterceptHandler . Callback <$> asyncFunction (\ _ _ args -> case args ++ P.repeat jsUndefined of
_ -> do
callback ))