{-# 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, castRef) 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 :: JSRef CSSSupportsRule -> JSString -> Word -> IO Word -- | insertRule :: (MonadIO m, ToJSString rule) => CSSSupportsRule -> rule -> Word -> m Word insertRule self rule index = liftIO (js_insertRule (unCSSSupportsRule self) (toJSString rule) index) foreign import javascript unsafe "$1[\"deleteRule\"]($2)" js_deleteRule :: JSRef CSSSupportsRule -> Word -> IO () -- | deleteRule :: (MonadIO m) => CSSSupportsRule -> Word -> m () deleteRule self index = liftIO (js_deleteRule (unCSSSupportsRule self) index) foreign import javascript unsafe "$1[\"cssRules\"]" js_getCssRules :: JSRef CSSSupportsRule -> IO (JSRef CSSRuleList) -- | getCssRules :: (MonadIO m) => CSSSupportsRule -> m (Maybe CSSRuleList) getCssRules self = liftIO ((js_getCssRules (unCSSSupportsRule self)) >>= fromJSRef) foreign import javascript unsafe "$1[\"conditionText\"]" js_getConditionText :: JSRef CSSSupportsRule -> IO JSString -- | getConditionText :: (MonadIO m, FromJSString result) => CSSSupportsRule -> m result getConditionText self = liftIO (fromJSString <$> (js_getConditionText (unCSSSupportsRule self)))