module JSDOM.Generated.MutationRecord
(getType, getTarget, getAddedNodes, getRemovedNodes,
getPreviousSibling, getPreviousSiblingUnsafe,
getPreviousSiblingUnchecked, getNextSibling, getNextSiblingUnsafe,
getNextSiblingUnchecked, getAttributeName, getAttributeNameUnsafe,
getAttributeNameUnchecked, getAttributeNamespace,
getAttributeNamespaceUnsafe, getAttributeNamespaceUnchecked,
getOldValue, getOldValueUnsafe, getOldValueUnchecked,
MutationRecord(..), gTypeMutationRecord)
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
getType ::
(MonadDOM m, FromJSString result) => MutationRecord -> m result
getType self = liftDOM ((self ^. js "type") >>= fromJSValUnchecked)
getTarget :: (MonadDOM m) => MutationRecord -> m Node
getTarget self
= liftDOM ((self ^. js "target") >>= fromJSValUnchecked)
getAddedNodes :: (MonadDOM m) => MutationRecord -> m NodeList
getAddedNodes self
= liftDOM ((self ^. js "addedNodes") >>= fromJSValUnchecked)
getRemovedNodes :: (MonadDOM m) => MutationRecord -> m NodeList
getRemovedNodes self
= liftDOM ((self ^. js "removedNodes") >>= fromJSValUnchecked)
getPreviousSibling ::
(MonadDOM m) => MutationRecord -> m (Maybe Node)
getPreviousSibling self
= liftDOM ((self ^. js "previousSibling") >>= fromJSVal)
getPreviousSiblingUnsafe ::
(MonadDOM m, HasCallStack) => MutationRecord -> m Node
getPreviousSiblingUnsafe self
= liftDOM
(((self ^. js "previousSibling") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getPreviousSiblingUnchecked ::
(MonadDOM m) => MutationRecord -> m Node
getPreviousSiblingUnchecked self
= liftDOM ((self ^. js "previousSibling") >>= fromJSValUnchecked)
getNextSibling :: (MonadDOM m) => MutationRecord -> m (Maybe Node)
getNextSibling self
= liftDOM ((self ^. js "nextSibling") >>= fromJSVal)
getNextSiblingUnsafe ::
(MonadDOM m, HasCallStack) => MutationRecord -> m Node
getNextSiblingUnsafe self
= liftDOM
(((self ^. js "nextSibling") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getNextSiblingUnchecked :: (MonadDOM m) => MutationRecord -> m Node
getNextSiblingUnchecked self
= liftDOM ((self ^. js "nextSibling") >>= fromJSValUnchecked)
getAttributeName ::
(MonadDOM m, FromJSString result) =>
MutationRecord -> m (Maybe result)
getAttributeName self
= liftDOM ((self ^. js "attributeName") >>= fromJSVal)
getAttributeNameUnsafe ::
(MonadDOM m, HasCallStack, FromJSString result) =>
MutationRecord -> m result
getAttributeNameUnsafe self
= liftDOM
(((self ^. js "attributeName") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getAttributeNameUnchecked ::
(MonadDOM m, FromJSString result) => MutationRecord -> m result
getAttributeNameUnchecked self
= liftDOM ((self ^. js "attributeName") >>= fromJSValUnchecked)
getAttributeNamespace ::
(MonadDOM m, FromJSString result) =>
MutationRecord -> m (Maybe result)
getAttributeNamespace self
= liftDOM ((self ^. js "attributeNamespace") >>= fromJSVal)
getAttributeNamespaceUnsafe ::
(MonadDOM m, HasCallStack, FromJSString result) =>
MutationRecord -> m result
getAttributeNamespaceUnsafe self
= liftDOM
(((self ^. js "attributeNamespace") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getAttributeNamespaceUnchecked ::
(MonadDOM m, FromJSString result) => MutationRecord -> m result
getAttributeNamespaceUnchecked self
= liftDOM
((self ^. js "attributeNamespace") >>= fromJSValUnchecked)
getOldValue ::
(MonadDOM m, FromJSString result) =>
MutationRecord -> m (Maybe result)
getOldValue self = liftDOM ((self ^. js "oldValue") >>= fromJSVal)
getOldValueUnsafe ::
(MonadDOM m, HasCallStack, FromJSString result) =>
MutationRecord -> m result
getOldValueUnsafe self
= liftDOM
(((self ^. js "oldValue") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getOldValueUnchecked ::
(MonadDOM m, FromJSString result) => MutationRecord -> m result
getOldValueUnchecked self
= liftDOM ((self ^. js "oldValue") >>= fromJSValUnchecked)