{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.IntersectionObserverEntry
(newIntersectionObserverEntry, getTime, getRootBounds,
getBoundingClientRect, getIntersectionRect, getIntersectionRatio,
getTarget, IntersectionObserverEntry(..),
gTypeIntersectionObserverEntry)
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
newIntersectionObserverEntry ::
(MonadDOM m) =>
IntersectionObserverEntryInit -> m IntersectionObserverEntry
newIntersectionObserverEntry intersectionObserverEntryInit
= liftDOM
(IntersectionObserverEntry <$>
new (jsg "IntersectionObserverEntry")
[toJSVal intersectionObserverEntryInit])
getTime ::
(MonadDOM m) => IntersectionObserverEntry -> m DOMHighResTimeStamp
getTime self = liftDOM ((self ^. js "time") >>= fromJSValUnchecked)
getRootBounds ::
(MonadDOM m) => IntersectionObserverEntry -> m DOMRectReadOnly
getRootBounds self
= liftDOM ((self ^. js "rootBounds") >>= fromJSValUnchecked)
getBoundingClientRect ::
(MonadDOM m) => IntersectionObserverEntry -> m DOMRectReadOnly
getBoundingClientRect self
= liftDOM
((self ^. js "boundingClientRect") >>= fromJSValUnchecked)
getIntersectionRect ::
(MonadDOM m) => IntersectionObserverEntry -> m DOMRectReadOnly
getIntersectionRect self
= liftDOM ((self ^. js "intersectionRect") >>= fromJSValUnchecked)
getIntersectionRatio ::
(MonadDOM m) => IntersectionObserverEntry -> m Double
getIntersectionRatio self
= liftDOM ((self ^. js "intersectionRatio") >>= valToNumber)
getTarget :: (MonadDOM m) => IntersectionObserverEntry -> m Element
getTarget self
= liftDOM ((self ^. js "target") >>= fromJSValUnchecked)