jsaddle-dom-0.10.0.0: src/JSDOM/Generated/StylePropertyMapReadOnly.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.StylePropertyMapReadOnly
(get, get_, getAll, getAll_, has, has_, getSize, StylePropertyMapReadOnly(..), gTypeStylePropertyMapReadOnly, IsStylePropertyMapReadOnly, toStylePropertyMapReadOnly)
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/StylePropertyMapReadOnly/get MDN StylePropertyMapReadOnly.get documentation>
get :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m UndefinedOrCSSStyleValue
get self property = liftDOM ((((Types.toStylePropertyMapReadOnly self) ^. jsf "get" [toJSVal property]) >>= fromJSValUnchecked))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/get MDN StylePropertyMapReadOnly.get documentation>
get_ :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m ()
get_ self property = liftDOM (void ((Types.toStylePropertyMapReadOnly self) ^. jsf "get" [toJSVal property]))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll MDN StylePropertyMapReadOnly.getAll documentation>
getAll :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m [CSSStyleValue]
getAll self property = liftDOM ((((Types.toStylePropertyMapReadOnly self) ^. jsf "getAll" [toJSVal property]) >>= fromJSValUnchecked))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll MDN StylePropertyMapReadOnly.getAll documentation>
getAll_ :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m ()
getAll_ self property = liftDOM (void ((Types.toStylePropertyMapReadOnly self) ^. jsf "getAll" [toJSVal property]))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has MDN StylePropertyMapReadOnly.has documentation>
has :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m Bool
has self property = liftDOM ((((Types.toStylePropertyMapReadOnly self) ^. jsf "has" [toJSVal property]) >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has MDN StylePropertyMapReadOnly.has documentation>
has_ :: (MonadDOM m, IsStylePropertyMapReadOnly self, ToJSString property) => self -> property -> m ()
has_ self property = liftDOM (void ((Types.toStylePropertyMapReadOnly self) ^. jsf "has" [toJSVal property]))
-- | <https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size MDN StylePropertyMapReadOnly.size documentation>
getSize :: (MonadDOM m, IsStylePropertyMapReadOnly self) => self -> m Word
getSize self = liftDOM ((P.round <$> (((Types.toStylePropertyMapReadOnly self) ^. js "size") >>= valToNumber)))