ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/PictureInPictureWindow.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from picture-in-picture (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.PictureInPictureWindow
(js_getWidth, js_getHeight, getWidth, getHeight, resize, PictureInPictureWindow(..), gTypePictureInPictureWindow)
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 unsafe "(($1) => { return $1[\"width\"]; })"
js_getWidth :: PictureInPictureWindow -> IO Int
-- | <https://developer.mozilla.org/docs/Web/API/PictureInPictureWindow/width MDN PictureInPictureWindow.width documentation>
getWidth :: (MonadDOM m) => PictureInPictureWindow -> m Int
getWidth self = liftDOM ((js_getWidth (self)))
foreign import javascript unsafe "(($1) => { return $1[\"height\"]; })"
js_getHeight :: PictureInPictureWindow -> IO Int
-- | <https://developer.mozilla.org/docs/Web/API/PictureInPictureWindow/height MDN PictureInPictureWindow.height documentation>
getHeight :: (MonadDOM m) => PictureInPictureWindow -> m Int
getHeight self = liftDOM ((js_getHeight (self)))
-- | <https://w3c.github.io/picture-in-picture/#dom-pictureinpicturewindow-onresize resize event>
resize :: EventName PictureInPictureWindow Event
resize = unsafeEventName (toJSString "resize")