ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/NavigationDestination.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.NavigationDestination
(js_getState, js_getUrl, js_getKey, js_getId, js_getIndex, js_getSameDocument, getState, getState_, getUrl, getKey, getId, getIndex, getSameDocument, NavigationDestination(..), gTypeNavigationDestination)
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[\"getState\"](); })"
js_getState :: NavigationDestination -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/getState MDN NavigationDestination.getState documentation>
getState :: (MonadDOM m) => NavigationDestination -> m JSVal
getState self = liftDOM ((js_getState (self)))
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/getState MDN NavigationDestination.getState documentation>
getState_ :: (MonadDOM m) => NavigationDestination -> m ()
getState_ self = liftDOM (void ((js_getState (self))))
foreign import javascript unsafe "(($1) => { return $1[\"url\"]; })"
js_getUrl :: NavigationDestination -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/url MDN NavigationDestination.url documentation>
getUrl :: (MonadDOM m, FromJSString result) => NavigationDestination -> m result
getUrl self = liftDOM ((fromJSString <$> (js_getUrl (self))))
foreign import javascript unsafe "(($1) => { return $1[\"key\"]; })"
js_getKey :: NavigationDestination -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/key MDN NavigationDestination.key documentation>
getKey :: (MonadDOM m, FromJSString result) => NavigationDestination -> m result
getKey self = liftDOM ((fromJSString <$> (js_getKey (self))))
foreign import javascript unsafe "(($1) => { return $1[\"id\"]; })"
js_getId :: NavigationDestination -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/id MDN NavigationDestination.id documentation>
getId :: (MonadDOM m, FromJSString result) => NavigationDestination -> m result
getId self = liftDOM ((fromJSString <$> (js_getId (self))))
foreign import javascript unsafe "(($1) => { return $1[\"index\"]; })"
js_getIndex :: NavigationDestination -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/index MDN NavigationDestination.index documentation>
getIndex :: (MonadDOM m) => NavigationDestination -> m Int53
getIndex self = liftDOM (((js_getIndex (self)) >>= fromJSValUnchecked))
foreign import javascript unsafe "(($1) => { return $1[\"sameDocument\"]; })"
js_getSameDocument :: NavigationDestination -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/NavigationDestination/sameDocument MDN NavigationDestination.sameDocument documentation>
getSameDocument :: (MonadDOM m) => NavigationDestination -> m Bool
getSameDocument self = liftDOM ((js_getSameDocument (self)))