{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.Navigator
       (requestMediaKeySystemAccess, requestMediaKeySystemAccess_,
        getGamepads, getGamepads_, getUserMedia, registerProtocolHandler,
        isProtocolHandlerRegistered, isProtocolHandlerRegistered_,
        unregisterProtocolHandler, vibratePattern, vibratePattern_,
        vibrate, vibrate_, javaEnabled, javaEnabled_, getStorageUpdates,
        getGeolocation, getMediaDevices, getWebkitTemporaryStorage,
        getWebkitPersistentStorage, getWebdriver, getPlugins, getMimeTypes,
        getCookieEnabled, Navigator(..), gTypeNavigator)
       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

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.requestMediaKeySystemAccess Mozilla Navigator.requestMediaKeySystemAccess documentation> 
requestMediaKeySystemAccess ::
                            (MonadDOM m, ToJSString keySystem) =>
                              Navigator ->
                                keySystem ->
                                  [MediaKeySystemConfiguration] -> m MediaKeySystemAccess
requestMediaKeySystemAccess :: forall (m :: * -> *) keySystem.
(MonadDOM m, ToJSString keySystem) =>
Navigator
-> keySystem
-> [MediaKeySystemConfiguration]
-> m MediaKeySystemAccess
requestMediaKeySystemAccess Navigator
self keySystem
keySystem [MediaKeySystemConfiguration]
supportedConfiguration
  = DOM MediaKeySystemAccess -> m MediaKeySystemAccess
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"requestMediaKeySystemAccess"
           [keySystem -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal keySystem
keySystem, JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([MediaKeySystemConfiguration] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [MediaKeySystemConfiguration]
supportedConfiguration)])
          JSM JSVal -> (JSVal -> JSM JSVal) -> JSM JSVal
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM JSVal
readPromise)
         JSM JSVal
-> (JSVal -> DOM MediaKeySystemAccess) -> DOM MediaKeySystemAccess
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM MediaKeySystemAccess
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.requestMediaKeySystemAccess Mozilla Navigator.requestMediaKeySystemAccess documentation> 
requestMediaKeySystemAccess_ ::
                             (MonadDOM m, ToJSString keySystem) =>
                               Navigator -> keySystem -> [MediaKeySystemConfiguration] -> m ()
requestMediaKeySystemAccess_ :: forall (m :: * -> *) keySystem.
(MonadDOM m, ToJSString keySystem) =>
Navigator -> keySystem -> [MediaKeySystemConfiguration] -> m ()
requestMediaKeySystemAccess_ Navigator
self keySystem
keySystem [MediaKeySystemConfiguration]
supportedConfiguration
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"requestMediaKeySystemAccess"
            [keySystem -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal keySystem
keySystem, JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([MediaKeySystemConfiguration] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [MediaKeySystemConfiguration]
supportedConfiguration)]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getGamepads Mozilla Navigator.getGamepads documentation> 
getGamepads :: (MonadDOM m) => Navigator -> m [Gamepad]
getGamepads :: forall (m :: * -> *). MonadDOM m => Navigator -> m [Gamepad]
getGamepads Navigator
self
  = DOM [Gamepad] -> m [Gamepad]
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getGamepads" ()) JSM JSVal -> (JSVal -> DOM [Gamepad]) -> DOM [Gamepad]
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM [Gamepad]
forall o. FromJSVal o => JSVal -> JSM [o]
fromJSArrayUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getGamepads Mozilla Navigator.getGamepads documentation> 
getGamepads_ :: (MonadDOM m) => Navigator -> m ()
getGamepads_ :: forall (m :: * -> *). MonadDOM m => Navigator -> m ()
getGamepads_ Navigator
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getGamepads" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia Mozilla Navigator.getUserMedia documentation> 
getUserMedia ::
             (MonadDOM m) =>
               Navigator ->
                 MediaStreamConstraints ->
                   NavigatorUserMediaSuccessCallback ->
                     NavigatorUserMediaErrorCallback -> m ()
getUserMedia :: forall (m :: * -> *).
MonadDOM m =>
Navigator
-> MediaStreamConstraints
-> NavigatorUserMediaSuccessCallback
-> NavigatorUserMediaErrorCallback
-> m ()
getUserMedia Navigator
self MediaStreamConstraints
constraints NavigatorUserMediaSuccessCallback
successCallback NavigatorUserMediaErrorCallback
errorCallback
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getUserMedia"
            [MediaStreamConstraints -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal MediaStreamConstraints
constraints, NavigatorUserMediaSuccessCallback -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal NavigatorUserMediaSuccessCallback
successCallback,
             NavigatorUserMediaErrorCallback -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal NavigatorUserMediaErrorCallback
errorCallback]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.registerProtocolHandler Mozilla Navigator.registerProtocolHandler documentation> 
registerProtocolHandler ::
                        (MonadDOM m, ToJSString scheme, ToJSString url,
                         ToJSString title) =>
                          Navigator -> scheme -> url -> title -> m ()
registerProtocolHandler :: forall (m :: * -> *) scheme url title.
(MonadDOM m, ToJSString scheme, ToJSString url,
 ToJSString title) =>
Navigator -> scheme -> url -> title -> m ()
registerProtocolHandler Navigator
self scheme
scheme url
url title
title
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"registerProtocolHandler"
            [scheme -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal scheme
scheme, url -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal url
url, title -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal title
title]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.isProtocolHandlerRegistered Mozilla Navigator.isProtocolHandlerRegistered documentation> 
isProtocolHandlerRegistered ::
                            (MonadDOM m, ToJSString scheme, ToJSString url,
                             FromJSString result) =>
                              Navigator -> scheme -> url -> m result
isProtocolHandlerRegistered :: forall (m :: * -> *) scheme url result.
(MonadDOM m, ToJSString scheme, ToJSString url,
 FromJSString result) =>
Navigator -> scheme -> url -> m result
isProtocolHandlerRegistered Navigator
self scheme
scheme url
url
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isProtocolHandlerRegistered"
          [scheme -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal scheme
scheme, url -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal url
url])
         JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.isProtocolHandlerRegistered Mozilla Navigator.isProtocolHandlerRegistered documentation> 
isProtocolHandlerRegistered_ ::
                             (MonadDOM m, ToJSString scheme, ToJSString url) =>
                               Navigator -> scheme -> url -> m ()
isProtocolHandlerRegistered_ :: forall (m :: * -> *) scheme url.
(MonadDOM m, ToJSString scheme, ToJSString url) =>
Navigator -> scheme -> url -> m ()
isProtocolHandlerRegistered_ Navigator
self scheme
scheme url
url
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isProtocolHandlerRegistered"
            [scheme -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal scheme
scheme, url -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal url
url]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.unregisterProtocolHandler Mozilla Navigator.unregisterProtocolHandler documentation> 
unregisterProtocolHandler ::
                          (MonadDOM m, ToJSString scheme, ToJSString url) =>
                            Navigator -> scheme -> url -> m ()
unregisterProtocolHandler :: forall (m :: * -> *) scheme url.
(MonadDOM m, ToJSString scheme, ToJSString url) =>
Navigator -> scheme -> url -> m ()
unregisterProtocolHandler Navigator
self scheme
scheme url
url
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"unregisterProtocolHandler"
            [scheme -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal scheme
scheme, url -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal url
url]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.vibrate Mozilla Navigator.vibrate documentation> 
vibratePattern :: (MonadDOM m) => Navigator -> [Word] -> m Bool
vibratePattern :: forall (m :: * -> *). MonadDOM m => Navigator -> [Word] -> m Bool
vibratePattern Navigator
self [Word]
pattern'
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"vibrate" [JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([Word] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [Word]
pattern')]) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.vibrate Mozilla Navigator.vibrate documentation> 
vibratePattern_ :: (MonadDOM m) => Navigator -> [Word] -> m ()
vibratePattern_ :: forall (m :: * -> *). MonadDOM m => Navigator -> [Word] -> m ()
vibratePattern_ Navigator
self [Word]
pattern'
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"vibrate" [JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([Word] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [Word]
pattern')]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.vibrate Mozilla Navigator.vibrate documentation> 
vibrate :: (MonadDOM m) => Navigator -> Word -> m Bool
vibrate :: forall (m :: * -> *). MonadDOM m => Navigator -> Word -> m Bool
vibrate Navigator
self Word
time
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"vibrate" [Word -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Word
time]) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.vibrate Mozilla Navigator.vibrate documentation> 
vibrate_ :: (MonadDOM m) => Navigator -> Word -> m ()
vibrate_ :: forall (m :: * -> *). MonadDOM m => Navigator -> Word -> m ()
vibrate_ Navigator
self Word
time
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"vibrate" [Word -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Word
time]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.javaEnabled Mozilla Navigator.javaEnabled documentation> 
javaEnabled :: (MonadDOM m) => Navigator -> m Bool
javaEnabled :: forall (m :: * -> *). MonadDOM m => Navigator -> m Bool
javaEnabled Navigator
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"javaEnabled" ()) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.javaEnabled Mozilla Navigator.javaEnabled documentation> 
javaEnabled_ :: (MonadDOM m) => Navigator -> m ()
javaEnabled_ :: forall (m :: * -> *). MonadDOM m => Navigator -> m ()
javaEnabled_ Navigator
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"javaEnabled" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getStorageUpdates Mozilla Navigator.getStorageUpdates documentation> 
getStorageUpdates :: (MonadDOM m) => Navigator -> m ()
getStorageUpdates :: forall (m :: * -> *). MonadDOM m => Navigator -> m ()
getStorageUpdates Navigator
self
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getStorageUpdates" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.geolocation Mozilla Navigator.geolocation documentation> 
getGeolocation :: (MonadDOM m) => Navigator -> m Geolocation
getGeolocation :: forall (m :: * -> *). MonadDOM m => Navigator -> m Geolocation
getGeolocation Navigator
self
  = DOM Geolocation -> m Geolocation
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"geolocation") JSM JSVal -> (JSVal -> DOM Geolocation) -> DOM Geolocation
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Geolocation
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.mediaDevices Mozilla Navigator.mediaDevices documentation> 
getMediaDevices :: (MonadDOM m) => Navigator -> m MediaDevices
getMediaDevices :: forall (m :: * -> *). MonadDOM m => Navigator -> m MediaDevices
getMediaDevices Navigator
self
  = DOM MediaDevices -> m MediaDevices
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"mediaDevices") JSM JSVal -> (JSVal -> DOM MediaDevices) -> DOM MediaDevices
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM MediaDevices
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.webkitTemporaryStorage Mozilla Navigator.webkitTemporaryStorage documentation> 
getWebkitTemporaryStorage ::
                          (MonadDOM m) => Navigator -> m StorageQuota
getWebkitTemporaryStorage :: forall (m :: * -> *). MonadDOM m => Navigator -> m StorageQuota
getWebkitTemporaryStorage Navigator
self
  = DOM StorageQuota -> m StorageQuota
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitTemporaryStorage") JSM JSVal -> (JSVal -> DOM StorageQuota) -> DOM StorageQuota
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM StorageQuota
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.webkitPersistentStorage Mozilla Navigator.webkitPersistentStorage documentation> 
getWebkitPersistentStorage ::
                           (MonadDOM m) => Navigator -> m StorageQuota
getWebkitPersistentStorage :: forall (m :: * -> *). MonadDOM m => Navigator -> m StorageQuota
getWebkitPersistentStorage Navigator
self
  = DOM StorageQuota -> m StorageQuota
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitPersistentStorage") JSM JSVal -> (JSVal -> DOM StorageQuota) -> DOM StorageQuota
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM StorageQuota
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.webdriver Mozilla Navigator.webdriver documentation> 
getWebdriver :: (MonadDOM m) => Navigator -> m Bool
getWebdriver :: forall (m :: * -> *). MonadDOM m => Navigator -> m Bool
getWebdriver Navigator
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webdriver") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.plugins Mozilla Navigator.plugins documentation> 
getPlugins :: (MonadDOM m) => Navigator -> m PluginArray
getPlugins :: forall (m :: * -> *). MonadDOM m => Navigator -> m PluginArray
getPlugins Navigator
self
  = DOM PluginArray -> m PluginArray
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"plugins") JSM JSVal -> (JSVal -> DOM PluginArray) -> DOM PluginArray
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM PluginArray
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.mimeTypes Mozilla Navigator.mimeTypes documentation> 
getMimeTypes :: (MonadDOM m) => Navigator -> m MimeTypeArray
getMimeTypes :: forall (m :: * -> *). MonadDOM m => Navigator -> m MimeTypeArray
getMimeTypes Navigator
self
  = DOM MimeTypeArray -> m MimeTypeArray
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"mimeTypes") JSM JSVal -> (JSVal -> DOM MimeTypeArray) -> DOM MimeTypeArray
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM MimeTypeArray
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Navigator.cookieEnabled Mozilla Navigator.cookieEnabled documentation> 
getCookieEnabled :: (MonadDOM m) => Navigator -> m Bool
getCookieEnabled :: forall (m :: * -> *). MonadDOM m => Navigator -> m Bool
getCookieEnabled Navigator
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((Navigator
self Navigator -> Getting (JSM JSVal) Navigator (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter Navigator (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"cookieEnabled") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)