{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.DocumentOrShadowRoot
(elementFromPoint, elementFromPoint_, elementFromPointUnsafe,
elementFromPointUnchecked, getActiveElement,
getActiveElementUnsafe, getActiveElementUnchecked,
getPointerLockElement, getPointerLockElementUnsafe,
getPointerLockElementUnchecked, DocumentOrShadowRoot(..),
gTypeDocumentOrShadowRoot, IsDocumentOrShadowRoot,
toDocumentOrShadowRoot)
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
elementFromPoint ::
(MonadDOM m, IsDocumentOrShadowRoot self) =>
self -> Double -> Double -> m (Maybe Element)
elementFromPoint self x y
= liftDOM
(((toDocumentOrShadowRoot self) ^. jsf "elementFromPoint"
[toJSVal x, toJSVal y])
>>= fromJSVal)
elementFromPoint_ ::
(MonadDOM m, IsDocumentOrShadowRoot self) =>
self -> Double -> Double -> m ()
elementFromPoint_ self x y
= liftDOM
(void
((toDocumentOrShadowRoot self) ^. jsf "elementFromPoint"
[toJSVal x, toJSVal y]))
elementFromPointUnsafe ::
(MonadDOM m, IsDocumentOrShadowRoot self, HasCallStack) =>
self -> Double -> Double -> m Element
elementFromPointUnsafe self x y
= liftDOM
((((toDocumentOrShadowRoot self) ^. jsf "elementFromPoint"
[toJSVal x, toJSVal y])
>>= fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
elementFromPointUnchecked ::
(MonadDOM m, IsDocumentOrShadowRoot self) =>
self -> Double -> Double -> m Element
elementFromPointUnchecked self x y
= liftDOM
(((toDocumentOrShadowRoot self) ^. jsf "elementFromPoint"
[toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
getActiveElement ::
(MonadDOM m, IsDocumentOrShadowRoot self) =>
self -> m (Maybe Element)
getActiveElement self
= liftDOM
(((toDocumentOrShadowRoot self) ^. js "activeElement") >>=
fromJSVal)
getActiveElementUnsafe ::
(MonadDOM m, IsDocumentOrShadowRoot self, HasCallStack) =>
self -> m Element
getActiveElementUnsafe self
= liftDOM
((((toDocumentOrShadowRoot self) ^. js "activeElement") >>=
fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
getActiveElementUnchecked ::
(MonadDOM m, IsDocumentOrShadowRoot self) => self -> m Element
getActiveElementUnchecked self
= liftDOM
(((toDocumentOrShadowRoot self) ^. js "activeElement") >>=
fromJSValUnchecked)
getPointerLockElement ::
(MonadDOM m, IsDocumentOrShadowRoot self) =>
self -> m (Maybe Element)
getPointerLockElement self
= liftDOM
(((toDocumentOrShadowRoot self) ^. js "pointerLockElement") >>=
fromJSVal)
getPointerLockElementUnsafe ::
(MonadDOM m, IsDocumentOrShadowRoot self, HasCallStack) =>
self -> m Element
getPointerLockElementUnsafe self
= liftDOM
((((toDocumentOrShadowRoot self) ^. js "pointerLockElement") >>=
fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
getPointerLockElementUnchecked ::
(MonadDOM m, IsDocumentOrShadowRoot self) => self -> m Element
getPointerLockElementUnchecked self
= liftDOM
(((toDocumentOrShadowRoot self) ^. js "pointerLockElement") >>=
fromJSValUnchecked)