ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/CSSImportRule.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from cssom-1 (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.CSSImportRule
(js_getHref, js_getMedia, js_getStyleSheet, js_getLayerName, js_getSupportsText, getHref, getMedia, getStyleSheet, getStyleSheetUnsafe, getStyleSheetUnchecked, getLayerName, getLayerNameUnsafe, getLayerNameUnchecked, getSupportsText, getSupportsTextUnsafe, getSupportsTextUnchecked, CSSImportRule(..), gTypeCSSImportRule)
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[\"href\"]; })"
js_getHref :: CSSImportRule -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/href MDN CSSImportRule.href documentation>
getHref :: (MonadDOM m, FromJSString result) => CSSImportRule -> m result
getHref self = liftDOM ((fromJSString <$> (js_getHref (self))))
foreign import javascript unsafe "(($1) => { return $1[\"media\"]; })"
js_getMedia :: CSSImportRule -> IO MediaList
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/media MDN CSSImportRule.media documentation>
getMedia :: (MonadDOM m) => CSSImportRule -> m MediaList
getMedia self = liftDOM ((js_getMedia (self)))
foreign import javascript unsafe "(($1) => { return $1[\"styleSheet\"]; })"
js_getStyleSheet :: CSSImportRule -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet MDN CSSImportRule.styleSheet documentation>
getStyleSheet :: (MonadDOM m) => CSSImportRule -> m (Maybe CSSStyleSheet)
getStyleSheet self = liftDOM (((js_getStyleSheet (self)) >>= fromJSValUnchecked))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet MDN CSSImportRule.styleSheet documentation>
getStyleSheetUnsafe :: (MonadDOM m, HasCallStack) => CSSImportRule -> m CSSStyleSheet
getStyleSheetUnsafe self = liftDOM ((((js_getStyleSheet (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet MDN CSSImportRule.styleSheet documentation>
getStyleSheetUnchecked :: (MonadDOM m) => CSSImportRule -> m CSSStyleSheet
getStyleSheetUnchecked self = liftDOM ((pFromJSVal <$> (js_getStyleSheet (self))))
foreign import javascript unsafe "(($1) => { return $1[\"layerName\"]; })"
js_getLayerName :: CSSImportRule -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/layerName MDN CSSImportRule.layerName documentation>
getLayerName :: (MonadDOM m, FromJSString result) => CSSImportRule -> m (Maybe result)
getLayerName self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getLayerName (self))))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/layerName MDN CSSImportRule.layerName documentation>
getLayerNameUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => CSSImportRule -> m result
getLayerNameUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getLayerName (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/layerName MDN CSSImportRule.layerName documentation>
getLayerNameUnchecked :: (MonadDOM m, FromJSString result) => CSSImportRule -> m result
getLayerNameUnchecked self = liftDOM ((pFromJSVal <$> (js_getLayerName (self))))
foreign import javascript unsafe "(($1) => { return $1[\"supportsText\"]; })"
js_getSupportsText :: CSSImportRule -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText MDN CSSImportRule.supportsText documentation>
getSupportsText :: (MonadDOM m, FromJSString result) => CSSImportRule -> m (Maybe result)
getSupportsText self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getSupportsText (self))))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText MDN CSSImportRule.supportsText documentation>
getSupportsTextUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => CSSImportRule -> m result
getSupportsTextUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getSupportsText (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText MDN CSSImportRule.supportsText documentation>
getSupportsTextUnchecked :: (MonadDOM m, FromJSString result) => CSSImportRule -> m result
getSupportsTextUnchecked self = liftDOM ((pFromJSVal <$> (js_getSupportsText (self))))