{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.CSSSupportsRule (js_insertRule, insertRule, js_deleteRule, deleteRule, js_getCssRules, getCssRules, js_getConditionText, getConditionText, CSSSupportsRule, castToCSSSupportsRule, gTypeCSSSupportsRule) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord) import Data.Typeable (Typeable) import GHCJS.Types (JSRef(..), JSString) import GHCJS.Foreign (jsNull) import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..)) import GHCJS.Marshal (ToJSRef(..), FromJSRef(..)) import GHCJS.Marshal.Pure (PToJSRef(..), PFromJSRef(..)) import Control.Monad.IO.Class (MonadIO(..)) import Data.Int (Int64) import Data.Word (Word, Word64) import GHCJS.DOM.Types import Control.Applicative ((<$>)) import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName) import GHCJS.DOM.Enums foreign import javascript unsafe "$1[\"insertRule\"]($2, $3)" js_insertRule :: CSSSupportsRule -> JSString -> Word -> IO Word -- | insertRule :: (MonadIO m, ToJSString rule) => CSSSupportsRule -> rule -> Word -> m Word insertRule self rule index = liftIO (js_insertRule (self) (toJSString rule) index) foreign import javascript unsafe "$1[\"deleteRule\"]($2)" js_deleteRule :: CSSSupportsRule -> Word -> IO () -- | deleteRule :: (MonadIO m) => CSSSupportsRule -> Word -> m () deleteRule self index = liftIO (js_deleteRule (self) index) foreign import javascript unsafe "$1[\"cssRules\"]" js_getCssRules :: CSSSupportsRule -> IO (Nullable CSSRuleList) -- | getCssRules :: (MonadIO m) => CSSSupportsRule -> m (Maybe CSSRuleList) getCssRules self = liftIO (nullableToMaybe <$> (js_getCssRules (self))) foreign import javascript unsafe "$1[\"conditionText\"]" js_getConditionText :: CSSSupportsRule -> IO JSString -- | getConditionText :: (MonadIO m, FromJSString result) => CSSSupportsRule -> m result getConditionText self = liftIO (fromJSString <$> (js_getConditionText (self)))