ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/PerformanceNavigation.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from navigation-timing-2 (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.PerformanceNavigation
(js_toJSON, js_getType, js_getRedirectCount, toJSON, toJSON_, getType, getRedirectCount, pattern TYPE_NAVIGATE, pattern TYPE_RELOAD, pattern TYPE_BACK_FORWARD, pattern TYPE_RESERVED, PerformanceNavigation(..), gTypePerformanceNavigation)
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 "(($1) => { return $1[\"toJSON\"](); })"
js_toJSON :: PerformanceNavigation -> IO GObject
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceNavigation/toJSON MDN PerformanceNavigation.toJSON documentation>
toJSON :: (MonadDOM m) => PerformanceNavigation -> m GObject
toJSON self = liftDOM ((js_toJSON (self)))
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceNavigation/toJSON MDN PerformanceNavigation.toJSON documentation>
toJSON_ :: (MonadDOM m) => PerformanceNavigation -> m ()
toJSON_ self = liftDOM (void ((js_toJSON (self))))
foreign import javascript unsafe "(($1) => { return $1[\"type\"]; })"
js_getType :: PerformanceNavigation -> IO Word
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceNavigation/type MDN PerformanceNavigation.type documentation>
getType :: (MonadDOM m) => PerformanceNavigation -> m Word
getType self = liftDOM ((js_getType (self)))
foreign import javascript unsafe "(($1) => { return $1[\"redirectCount\"]; })"
js_getRedirectCount :: PerformanceNavigation -> IO Word
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceNavigation/redirectCount MDN PerformanceNavigation.redirectCount documentation>
getRedirectCount :: (MonadDOM m) => PerformanceNavigation -> m Word
getRedirectCount self = liftDOM ((js_getRedirectCount (self)))
pattern TYPE_NAVIGATE = 0
pattern TYPE_RELOAD = 1
pattern TYPE_BACK_FORWARD = 2
pattern TYPE_RESERVED = 255