packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/CSSTransformComponent.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from css-typed-om-1 (webref). Do not edit.
module JSDOM.Generated.CSSTransformComponent
       (toMatrix, toMatrix_, setIs2D, getIs2D, CSSTransformComponent(..), gTypeCSSTransformComponent, IsCSSTransformComponent, toCSSTransformComponent)
       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/CSSTransformComponent/toMatrix MDN CSSTransformComponent.toMatrix documentation>
toMatrix :: (MonadDOM m, IsCSSTransformComponent self) => self -> m DOMMatrix
toMatrix self = liftDOM ((((Types.toCSSTransformComponent self) ^. jsf "toMatrix" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/toMatrix MDN CSSTransformComponent.toMatrix documentation>
toMatrix_ :: (MonadDOM m, IsCSSTransformComponent self) => self -> m ()
toMatrix_ self = liftDOM (void ((Types.toCSSTransformComponent self) ^. jsf "toMatrix" ()))

-- | <https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/is2D MDN CSSTransformComponent.is2D documentation>
setIs2D :: (MonadDOM m, IsCSSTransformComponent self) => self -> Bool -> m ()
setIs2D self val = liftDOM (void ((Types.toCSSTransformComponent self) ^. jss "is2D" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/is2D MDN CSSTransformComponent.is2D documentation>
getIs2D :: (MonadDOM m, IsCSSTransformComponent self) => self -> m Bool
getIs2D self = liftDOM ((((Types.toCSSTransformComponent self) ^. js "is2D") >>= valToBool))