ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/XPathNSResolver.hs
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from dom (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.XPathNSResolver
(newXPathNSResolver, newXPathNSResolverSync, newXPathNSResolverAsync, XPathNSResolver)
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(..), syncCallback1, asyncCallback1)
import GHCJS.DOM.Types
import GHCJS.DOM.JSFFI.Generated.Enums
newXPathNSResolver :: (MonadDOM m) => (Maybe JSString -> IO ()) -> m XPathNSResolver
newXPathNSResolver callback = liftDOM ((XPathNSResolver . coerce) <$> syncCallback1 ContinueAsync (\ prefix -> do
prefix' <- fromJSValUnchecked prefix
callback prefix'))
newXPathNSResolverSync :: (MonadDOM m) => (Maybe JSString -> IO ()) -> m XPathNSResolver
newXPathNSResolverSync callback = liftDOM ((XPathNSResolver . coerce) <$> syncCallback1 ThrowWouldBlock (\ prefix -> do
prefix' <- fromJSValUnchecked prefix
callback prefix'))
newXPathNSResolverAsync :: (MonadDOM m) => (Maybe JSString -> IO ()) -> m XPathNSResolver
newXPathNSResolverAsync callback = liftDOM ((XPathNSResolver . coerce) <$> asyncCallback1 (\ prefix -> do
prefix' <- fromJSValUnchecked prefix
callback prefix'))