{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.CSSKeyframesRule
(insertRule, appendRule, deleteRule, findRule, findRule_,
findRuleUnsafe, findRuleUnchecked, get, get_, setName, getName,
getCssRules, CSSKeyframesRule(..), gTypeCSSKeyframesRule)
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, unsafeEventNameAsync)
import JSDOM.Enums
insertRule ::
(MonadDOM m, ToJSString rule) => CSSKeyframesRule -> rule -> m ()
insertRule self rule
= liftDOM (void (self ^. jsf "insertRule" [toJSVal rule]))
appendRule ::
(MonadDOM m, ToJSString rule) => CSSKeyframesRule -> rule -> m ()
appendRule self rule
= liftDOM (void (self ^. jsf "appendRule" [toJSVal rule]))
deleteRule ::
(MonadDOM m, ToJSString key) => CSSKeyframesRule -> key -> m ()
deleteRule self key
= liftDOM (void (self ^. jsf "deleteRule" [toJSVal key]))
findRule ::
(MonadDOM m, ToJSString key) =>
CSSKeyframesRule -> key -> m (Maybe CSSKeyframeRule)
findRule self key
= liftDOM ((self ^. jsf "findRule" [toJSVal key]) >>= fromJSVal)
findRule_ ::
(MonadDOM m, ToJSString key) => CSSKeyframesRule -> key -> m ()
findRule_ self key
= liftDOM (void (self ^. jsf "findRule" [toJSVal key]))
findRuleUnsafe ::
(MonadDOM m, ToJSString key, HasCallStack) =>
CSSKeyframesRule -> key -> m CSSKeyframeRule
findRuleUnsafe self key
= liftDOM
(((self ^. jsf "findRule" [toJSVal key]) >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
findRuleUnchecked ::
(MonadDOM m, ToJSString key) =>
CSSKeyframesRule -> key -> m CSSKeyframeRule
findRuleUnchecked self key
= liftDOM
((self ^. jsf "findRule" [toJSVal key]) >>= fromJSValUnchecked)
get ::
(MonadDOM m) => CSSKeyframesRule -> Word -> m CSSKeyframeRule
get self index
= liftDOM
((self ^. jsf "get" [toJSVal index]) >>= fromJSValUnchecked)
get_ :: (MonadDOM m) => CSSKeyframesRule -> Word -> m ()
get_ self index
= liftDOM (void (self ^. jsf "get" [toJSVal index]))
setName ::
(MonadDOM m, ToJSString val) => CSSKeyframesRule -> val -> m ()
setName self val = liftDOM (self ^. jss "name" (toJSVal val))
getName ::
(MonadDOM m, FromJSString result) => CSSKeyframesRule -> m result
getName self = liftDOM ((self ^. js "name") >>= fromJSValUnchecked)
getCssRules :: (MonadDOM m) => CSSKeyframesRule -> m CSSRuleList
getCssRules self
= liftDOM ((self ^. js "cssRules") >>= fromJSValUnchecked)