module JSDOM.Generated.XPathException
(toString, toString_, pattern INVALID_EXPRESSION_ERR,
pattern TYPE_ERR, getCode, getName, getMessage, XPathException(..),
gTypeXPathException)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
toString ::
(MonadDOM m, FromJSString result) => XPathException -> m result
toString self
= liftDOM ((self ^. jsf "toString" ()) >>= fromJSValUnchecked)
toString_ :: (MonadDOM m) => XPathException -> m ()
toString_ self = liftDOM (void (self ^. jsf "toString" ()))
pattern INVALID_EXPRESSION_ERR = 51
pattern TYPE_ERR = 52
getCode :: (MonadDOM m) => XPathException -> m Word
getCode self
= liftDOM (round <$> ((self ^. js "code") >>= valToNumber))
getName ::
(MonadDOM m, FromJSString result) => XPathException -> m result
getName self = liftDOM ((self ^. js "name") >>= fromJSValUnchecked)
getMessage ::
(MonadDOM m, FromJSString result) => XPathException -> m result
getMessage self
= liftDOM ((self ^. js "message") >>= fromJSValUnchecked)