jsaddle-dom-0.10.0.0: src/JSDOM/Generated/SVGAnimatedBoolean.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from SVG2 (webref). Do not edit.
module JSDOM.Generated.SVGAnimatedBoolean
(setBaseVal, getBaseVal, getAnimVal, SVGAnimatedBoolean(..), gTypeSVGAnimatedBoolean)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums
-- | <https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean/baseVal MDN SVGAnimatedBoolean.baseVal documentation>
setBaseVal :: (MonadDOM m) => SVGAnimatedBoolean -> Bool -> m ()
setBaseVal self val = liftDOM (void (self ^. jss "baseVal" (toJSVal val)))
-- | <https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean/baseVal MDN SVGAnimatedBoolean.baseVal documentation>
getBaseVal :: (MonadDOM m) => SVGAnimatedBoolean -> m Bool
getBaseVal self = liftDOM (((self ^. js "baseVal") >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean/animVal MDN SVGAnimatedBoolean.animVal documentation>
getAnimVal :: (MonadDOM m) => SVGAnimatedBoolean -> m Bool
getAnimVal self = liftDOM (((self ^. js "animVal") >>= valToBool))