ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/CSSPropertyRule.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from css-properties-values-api-1 (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.CSSPropertyRule
(js_getName, js_getSyntax, js_getInherits, js_getInitialValue, getName, getSyntax, getInherits, getInitialValue, getInitialValueUnsafe, getInitialValueUnchecked, CSSPropertyRule(..), gTypeCSSPropertyRule)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript unsafe "(($1) => { return $1[\"name\"]; })"
js_getName :: CSSPropertyRule -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/name MDN CSSPropertyRule.name documentation>
getName :: (MonadDOM m, FromJSString result) => CSSPropertyRule -> m result
getName self = liftDOM ((fromJSString <$> (js_getName (self))))
foreign import javascript unsafe "(($1) => { return $1[\"syntax\"]; })"
js_getSyntax :: CSSPropertyRule -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/syntax MDN CSSPropertyRule.syntax documentation>
getSyntax :: (MonadDOM m, FromJSString result) => CSSPropertyRule -> m result
getSyntax self = liftDOM ((fromJSString <$> (js_getSyntax (self))))
foreign import javascript unsafe "(($1) => { return $1[\"inherits\"]; })"
js_getInherits :: CSSPropertyRule -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/inherits MDN CSSPropertyRule.inherits documentation>
getInherits :: (MonadDOM m) => CSSPropertyRule -> m Bool
getInherits self = liftDOM ((js_getInherits (self)))
foreign import javascript unsafe "(($1) => { return $1[\"initialValue\"]; })"
js_getInitialValue :: CSSPropertyRule -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialValue MDN CSSPropertyRule.initialValue documentation>
getInitialValue :: (MonadDOM m, FromJSString result) => CSSPropertyRule -> m (Maybe result)
getInitialValue self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getInitialValue (self))))
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialValue MDN CSSPropertyRule.initialValue documentation>
getInitialValueUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => CSSPropertyRule -> m result
getInitialValueUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getInitialValue (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialValue MDN CSSPropertyRule.initialValue documentation>
getInitialValueUnchecked :: (MonadDOM m, FromJSString result) => CSSPropertyRule -> m result
getInitialValueUnchecked self = liftDOM ((pFromJSVal <$> (js_getInitialValue (self))))