ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/CacheQueryOptions.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from service-workers (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.CacheQueryOptions
(js_newCacheQueryOptions, js_setIgnoreSearch, js_getIgnoreSearch, js_setIgnoreMethod, js_getIgnoreMethod, js_setIgnoreVary, js_getIgnoreVary, newCacheQueryOptions, setIgnoreSearch, getIgnoreSearch, getIgnoreSearchUnsafe, getIgnoreSearchUnchecked, setIgnoreMethod, getIgnoreMethod, getIgnoreMethodUnsafe, getIgnoreMethodUnchecked, setIgnoreVary, getIgnoreVary, getIgnoreVaryUnsafe, getIgnoreVaryUnchecked, CacheQueryOptions(..), gTypeCacheQueryOptions, IsCacheQueryOptions, toCacheQueryOptions)
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 safe "(() => { return ({}); })"
js_newCacheQueryOptions :: IO CacheQueryOptions
-- | <https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions CacheQueryOptions specification>
newCacheQueryOptions :: (MonadDOM m) => m CacheQueryOptions
newCacheQueryOptions = liftDOM ((js_newCacheQueryOptions))
foreign import javascript safe "(($1, $2) => { $1[\"ignoreSearch\"] = $2; })"
js_setIgnoreSearch :: CacheQueryOptions -> Bool -> IO ()
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoresearch CacheQueryOptions.ignoreSearch specification>
setIgnoreSearch :: (MonadDOM m, IsCacheQueryOptions self) => self -> Bool -> m ()
setIgnoreSearch self val = liftDOM (void ((js_setIgnoreSearch ((Types.toCacheQueryOptions self)) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"ignoreSearch\"]; })"
js_getIgnoreSearch :: CacheQueryOptions -> IO JSVal
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoresearch CacheQueryOptions.ignoreSearch specification>
getIgnoreSearch :: (MonadDOM m, IsCacheQueryOptions self) => self -> m (Maybe Bool)
getIgnoreSearch self = liftDOM (((js_getIgnoreSearch ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoresearch CacheQueryOptions.ignoreSearch specification>
getIgnoreSearchUnsafe :: (MonadDOM m, IsCacheQueryOptions self, HasCallStack) => self -> m Bool
getIgnoreSearchUnsafe self = liftDOM ((((js_getIgnoreSearch ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoresearch CacheQueryOptions.ignoreSearch specification>
getIgnoreSearchUnchecked :: (MonadDOM m, IsCacheQueryOptions self) => self -> m Bool
getIgnoreSearchUnchecked self = liftDOM ((pFromJSVal <$> (js_getIgnoreSearch ((Types.toCacheQueryOptions self)))))
foreign import javascript safe "(($1, $2) => { $1[\"ignoreMethod\"] = $2; })"
js_setIgnoreMethod :: CacheQueryOptions -> Bool -> IO ()
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoremethod CacheQueryOptions.ignoreMethod specification>
setIgnoreMethod :: (MonadDOM m, IsCacheQueryOptions self) => self -> Bool -> m ()
setIgnoreMethod self val = liftDOM (void ((js_setIgnoreMethod ((Types.toCacheQueryOptions self)) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"ignoreMethod\"]; })"
js_getIgnoreMethod :: CacheQueryOptions -> IO JSVal
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoremethod CacheQueryOptions.ignoreMethod specification>
getIgnoreMethod :: (MonadDOM m, IsCacheQueryOptions self) => self -> m (Maybe Bool)
getIgnoreMethod self = liftDOM (((js_getIgnoreMethod ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoremethod CacheQueryOptions.ignoreMethod specification>
getIgnoreMethodUnsafe :: (MonadDOM m, IsCacheQueryOptions self, HasCallStack) => self -> m Bool
getIgnoreMethodUnsafe self = liftDOM ((((js_getIgnoreMethod ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignoremethod CacheQueryOptions.ignoreMethod specification>
getIgnoreMethodUnchecked :: (MonadDOM m, IsCacheQueryOptions self) => self -> m Bool
getIgnoreMethodUnchecked self = liftDOM ((pFromJSVal <$> (js_getIgnoreMethod ((Types.toCacheQueryOptions self)))))
foreign import javascript safe "(($1, $2) => { $1[\"ignoreVary\"] = $2; })"
js_setIgnoreVary :: CacheQueryOptions -> Bool -> IO ()
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignorevary CacheQueryOptions.ignoreVary specification>
setIgnoreVary :: (MonadDOM m, IsCacheQueryOptions self) => self -> Bool -> m ()
setIgnoreVary self val = liftDOM (void ((js_setIgnoreVary ((Types.toCacheQueryOptions self)) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"ignoreVary\"]; })"
js_getIgnoreVary :: CacheQueryOptions -> IO JSVal
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignorevary CacheQueryOptions.ignoreVary specification>
getIgnoreVary :: (MonadDOM m, IsCacheQueryOptions self) => self -> m (Maybe Bool)
getIgnoreVary self = liftDOM (((js_getIgnoreVary ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignorevary CacheQueryOptions.ignoreVary specification>
getIgnoreVaryUnsafe :: (MonadDOM m, IsCacheQueryOptions self, HasCallStack) => self -> m Bool
getIgnoreVaryUnsafe self = liftDOM ((((js_getIgnoreVary ((Types.toCacheQueryOptions self))) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/ServiceWorker/#dom-cachequeryoptions-ignorevary CacheQueryOptions.ignoreVary specification>
getIgnoreVaryUnchecked :: (MonadDOM m, IsCacheQueryOptions self) => self -> m Bool
getIgnoreVaryUnchecked self = liftDOM ((pFromJSVal <$> (js_getIgnoreVary ((Types.toCacheQueryOptions self)))))