{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.StyleSheet
(getType, getTypeUnsafe, getTypeUnchecked, setDisabled,
getDisabled, getOwnerNode, getParentStyleSheet, getHref,
getHrefUnsafe, getHrefUnchecked, getTitle, getTitleUnsafe,
getTitleUnchecked, getMedia, StyleSheet(..), gTypeStyleSheet,
IsStyleSheet, toStyleSheet)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Enums
getType ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m (Maybe result)
getType self
= liftDOM
(((toStyleSheet self) ^. js "type") >>= fromMaybeJSString)
getTypeUnsafe ::
(MonadDOM m, IsStyleSheet self, HasCallStack,
FromJSString result) =>
self -> m result
getTypeUnsafe self
= liftDOM
((((toStyleSheet self) ^. js "type") >>= fromMaybeJSString) >>=
maybe (Prelude.error "Nothing to return") return)
getTypeUnchecked ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m result
getTypeUnchecked self
= liftDOM
(((toStyleSheet self) ^. js "type") >>= fromJSValUnchecked)
setDisabled ::
(MonadDOM m, IsStyleSheet self) => self -> Bool -> m ()
setDisabled self val
= liftDOM ((toStyleSheet self) ^. jss "disabled" (toJSVal val))
getDisabled :: (MonadDOM m, IsStyleSheet self) => self -> m Bool
getDisabled self
= liftDOM (((toStyleSheet self) ^. js "disabled") >>= valToBool)
getOwnerNode :: (MonadDOM m, IsStyleSheet self) => self -> m Node
getOwnerNode self
= liftDOM
(((toStyleSheet self) ^. js "ownerNode") >>= fromJSValUnchecked)
getParentStyleSheet ::
(MonadDOM m, IsStyleSheet self) => self -> m StyleSheet
getParentStyleSheet self
= liftDOM
(((toStyleSheet self) ^. js "parentStyleSheet") >>=
fromJSValUnchecked)
getHref ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m (Maybe result)
getHref self
= liftDOM
(((toStyleSheet self) ^. js "href") >>= fromMaybeJSString)
getHrefUnsafe ::
(MonadDOM m, IsStyleSheet self, HasCallStack,
FromJSString result) =>
self -> m result
getHrefUnsafe self
= liftDOM
((((toStyleSheet self) ^. js "href") >>= fromMaybeJSString) >>=
maybe (Prelude.error "Nothing to return") return)
getHrefUnchecked ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m result
getHrefUnchecked self
= liftDOM
(((toStyleSheet self) ^. js "href") >>= fromJSValUnchecked)
getTitle ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m (Maybe result)
getTitle self
= liftDOM
(((toStyleSheet self) ^. js "title") >>= fromMaybeJSString)
getTitleUnsafe ::
(MonadDOM m, IsStyleSheet self, HasCallStack,
FromJSString result) =>
self -> m result
getTitleUnsafe self
= liftDOM
((((toStyleSheet self) ^. js "title") >>= fromMaybeJSString) >>=
maybe (Prelude.error "Nothing to return") return)
getTitleUnchecked ::
(MonadDOM m, IsStyleSheet self, FromJSString result) =>
self -> m result
getTitleUnchecked self
= liftDOM
(((toStyleSheet self) ^. js "title") >>= fromJSValUnchecked)
getMedia :: (MonadDOM m, IsStyleSheet self) => self -> m MediaList
getMedia self
= liftDOM
(((toStyleSheet self) ^. js "media") >>= fromJSValUnchecked)