module JSDOM.Generated.Animation
(newAnimation, getEffect, getEffectUnsafe, getEffectUnchecked,
getTimeline, getTimelineUnsafe, getTimelineUnchecked,
Animation(..), gTypeAnimation)
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
newAnimation ::
(MonadDOM m, IsAnimationEffect effect,
IsAnimationTimeline timeline) =>
Maybe effect -> Maybe timeline -> m Animation
newAnimation effect timeline
= liftDOM
(Animation <$>
new (jsg "Animation") [toJSVal effect, toJSVal timeline])
getEffect :: (MonadDOM m) => Animation -> m (Maybe AnimationEffect)
getEffect self = liftDOM ((self ^. js "effect") >>= fromJSVal)
getEffectUnsafe ::
(MonadDOM m, HasCallStack) => Animation -> m AnimationEffect
getEffectUnsafe self
= liftDOM
(((self ^. js "effect") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getEffectUnchecked ::
(MonadDOM m) => Animation -> m AnimationEffect
getEffectUnchecked self
= liftDOM ((self ^. js "effect") >>= fromJSValUnchecked)
getTimeline ::
(MonadDOM m) => Animation -> m (Maybe AnimationTimeline)
getTimeline self = liftDOM ((self ^. js "timeline") >>= fromJSVal)
getTimelineUnsafe ::
(MonadDOM m, HasCallStack) => Animation -> m AnimationTimeline
getTimelineUnsafe self
= liftDOM
(((self ^. js "timeline") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getTimelineUnchecked ::
(MonadDOM m) => Animation -> m AnimationTimeline
getTimelineUnchecked self
= liftDOM ((self ^. js "timeline") >>= fromJSValUnchecked)