module JSDOM.Generated.Window
(decodeURI, decodeURI_, decodeURIComponent, decodeURIComponent_,
encodeURI, encodeURI_, encodeURIComponent, encodeURIComponent_,
fetch, fetch_, openDatabase, openDatabase_, openDatabaseUnsafe,
openDatabaseUnchecked, close, stop, focus, blur, open, open_,
openUnsafe, openUnchecked, alertNoMessage, alert, confirm,
confirm_, prompt, prompt_, promptUnsafe, promptUnchecked, print,
requestAnimationFrame, requestAnimationFrame_,
cancelAnimationFrame, postMessage, captureEvents, releaseEvents,
getComputedStyle, getComputedStyle_, matchMedia, matchMedia_,
moveTo, moveBy, resizeTo, resizeBy, scrollOpt, scroll, scrollToOpt,
scrollTo, scrollByOpt, scrollBy, getSelection, getSelection_,
getSelectionUnsafe, getSelectionUnchecked, find, find_,
webkitRequestAnimationFrame, webkitRequestAnimationFrame_,
webkitCancelAnimationFrame, webkitCancelRequestAnimationFrame,
getMatchedCSSRules, getMatchedCSSRules_, showModalDialog,
showModalDialog_, webkitConvertPointFromPageToNode,
webkitConvertPointFromPageToNode_,
webkitConvertPointFromNodeToPage,
webkitConvertPointFromNodeToPage_,
collectMatchingElementsInFlatTree,
collectMatchingElementsInFlatTree_, matchingElementInFlatTree,
matchingElementInFlatTree_, matchingElementInFlatTreeUnsafe,
matchingElementInFlatTreeUnchecked, getIndexedDB,
getWebkitIndexedDB, getWebkitStorageInfo, getSpeechSynthesis,
getWindow, getSelf, getDocument, setName, getName, getLocation,
getHistory, getCustomElements, getLocationbar, getMenubar,
getPersonalbar, getScrollbars, getStatusbar, getToolbar, setStatus,
getStatus, getClosed, getFrames, getLength, getTop, getTopUnsafe,
getTopUnchecked, getOpener, getOpenerUnsafe, getOpenerUnchecked,
getParent, getParentUnsafe, getParentUnchecked, getFrameElement,
getFrameElementUnsafe, getFrameElementUnchecked, getNavigator,
getApplicationCache, getSessionStorage, getLocalStorage, getScreen,
getInnerHeight, getInnerWidth, getScrollX, getPageXOffset,
getScrollY, getPageYOffset, getScreenX, getScreenY, getOuterWidth,
getOuterHeight, getDevicePixelRatio, getOrientation, getEvent,
setDefaultStatus, getDefaultStatus, setDefaultstatus,
getDefaultstatus, getOffscreenBuffering, getScreenLeft,
getScreenTop, getClientInformation, getStyleMedia, gestureChange,
gestureEnd, gestureStart, deviceMotion, deviceOrientation,
webKitDeviceProximity, webKitAnimationEnd,
webKitAnimationIteration, webKitAnimationStart,
webKitTransitionEnd, Window(..), gTypeWindow)
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)
import JSDOM.Enums
decodeURI ::
(MonadDOM m, ToJSString uri, FromJSString result) =>
Window -> uri -> m result
decodeURI self uri
= liftDOM
((self ^. jsf "decodeURI" [toJSVal uri]) >>= fromJSValUnchecked)
decodeURI_ :: (MonadDOM m, ToJSString uri) => Window -> uri -> m ()
decodeURI_ self uri
= liftDOM (void (self ^. jsf "decodeURI" [toJSVal uri]))
decodeURIComponent ::
(MonadDOM m, ToJSString uri, FromJSString result) =>
Window -> uri -> m result
decodeURIComponent self uri
= liftDOM
((self ^. jsf "decodeURIComponent" [toJSVal uri]) >>=
fromJSValUnchecked)
decodeURIComponent_ ::
(MonadDOM m, ToJSString uri) => Window -> uri -> m ()
decodeURIComponent_ self uri
= liftDOM (void (self ^. jsf "decodeURIComponent" [toJSVal uri]))
encodeURI ::
(MonadDOM m, ToJSString uri, FromJSString result) =>
Window -> uri -> m result
encodeURI self uri
= liftDOM
((self ^. jsf "encodeURI" [toJSVal uri]) >>= fromJSValUnchecked)
encodeURI_ :: (MonadDOM m, ToJSString uri) => Window -> uri -> m ()
encodeURI_ self uri
= liftDOM (void (self ^. jsf "encodeURI" [toJSVal uri]))
encodeURIComponent ::
(MonadDOM m, ToJSString uri, FromJSString result) =>
Window -> uri -> m result
encodeURIComponent self uri
= liftDOM
((self ^. jsf "encodeURIComponent" [toJSVal uri]) >>=
fromJSValUnchecked)
encodeURIComponent_ ::
(MonadDOM m, ToJSString uri) => Window -> uri -> m ()
encodeURIComponent_ self uri
= liftDOM (void (self ^. jsf "encodeURIComponent" [toJSVal uri]))
fetch ::
(MonadDOM m, ToJSVal input) =>
Window -> input -> Maybe RequestInit -> m Response
fetch self input init
= liftDOM
(((self ^. jsf "fetch" [toJSVal input, toJSVal init]) >>=
readPromise)
>>= fromJSValUnchecked)
fetch_ ::
(MonadDOM m, ToJSVal input) =>
Window -> input -> Maybe RequestInit -> m ()
fetch_ self input init
= liftDOM
(void (self ^. jsf "fetch" [toJSVal input, toJSVal init]))
openDatabase ::
(MonadDOM m, ToJSString name, ToJSString version,
ToJSString displayName) =>
Window ->
name ->
version ->
displayName -> Word -> Maybe DatabaseCallback -> m (Maybe Database)
openDatabase self name version displayName estimatedSize
creationCallback
= liftDOM
((self ^. jsf "openDatabase"
[toJSVal name, toJSVal version, toJSVal displayName,
toJSVal estimatedSize, toJSVal creationCallback])
>>= fromJSVal)
openDatabase_ ::
(MonadDOM m, ToJSString name, ToJSString version,
ToJSString displayName) =>
Window ->
name ->
version -> displayName -> Word -> Maybe DatabaseCallback -> m ()
openDatabase_ self name version displayName estimatedSize
creationCallback
= liftDOM
(void
(self ^. jsf "openDatabase"
[toJSVal name, toJSVal version, toJSVal displayName,
toJSVal estimatedSize, toJSVal creationCallback]))
openDatabaseUnsafe ::
(MonadDOM m, ToJSString name, ToJSString version,
ToJSString displayName, HasCallStack) =>
Window ->
name ->
version ->
displayName -> Word -> Maybe DatabaseCallback -> m Database
openDatabaseUnsafe self name version displayName estimatedSize
creationCallback
= liftDOM
(((self ^. jsf "openDatabase"
[toJSVal name, toJSVal version, toJSVal displayName,
toJSVal estimatedSize, toJSVal creationCallback])
>>= fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
openDatabaseUnchecked ::
(MonadDOM m, ToJSString name, ToJSString version,
ToJSString displayName) =>
Window ->
name ->
version ->
displayName -> Word -> Maybe DatabaseCallback -> m Database
openDatabaseUnchecked self name version displayName estimatedSize
creationCallback
= liftDOM
((self ^. jsf "openDatabase"
[toJSVal name, toJSVal version, toJSVal displayName,
toJSVal estimatedSize, toJSVal creationCallback])
>>= fromJSValUnchecked)
close :: (MonadDOM m) => Window -> m ()
close self = liftDOM (void (self ^. jsf "close" ()))
stop :: (MonadDOM m) => Window -> m ()
stop self = liftDOM (void (self ^. jsf "stop" ()))
focus :: (MonadDOM m) => Window -> m ()
focus self = liftDOM (void (self ^. jsf "focus" ()))
blur :: (MonadDOM m) => Window -> m ()
blur self = liftDOM (void (self ^. jsf "blur" ()))
open ::
(MonadDOM m, ToJSString url, ToJSString target,
ToJSString features) =>
Window ->
Maybe url -> Maybe target -> Maybe features -> m (Maybe Window)
open self url target features
= liftDOM
((self ^. jsf "open"
[toJSVal url, toJSVal target, toJSVal features])
>>= fromJSVal)
open_ ::
(MonadDOM m, ToJSString url, ToJSString target,
ToJSString features) =>
Window -> Maybe url -> Maybe target -> Maybe features -> m ()
open_ self url target features
= liftDOM
(void
(self ^. jsf "open"
[toJSVal url, toJSVal target, toJSVal features]))
openUnsafe ::
(MonadDOM m, ToJSString url, ToJSString target,
ToJSString features, HasCallStack) =>
Window -> Maybe url -> Maybe target -> Maybe features -> m Window
openUnsafe self url target features
= liftDOM
(((self ^. jsf "open"
[toJSVal url, toJSVal target, toJSVal features])
>>= fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
openUnchecked ::
(MonadDOM m, ToJSString url, ToJSString target,
ToJSString features) =>
Window -> Maybe url -> Maybe target -> Maybe features -> m Window
openUnchecked self url target features
= liftDOM
((self ^. jsf "open"
[toJSVal url, toJSVal target, toJSVal features])
>>= fromJSValUnchecked)
alertNoMessage :: (MonadDOM m) => Window -> m ()
alertNoMessage self = liftDOM (void (self ^. jsf "alert" ()))
alert ::
(MonadDOM m, ToJSString message) => Window -> message -> m ()
alert self message
= liftDOM (void (self ^. jsf "alert" [toJSVal message]))
confirm ::
(MonadDOM m, ToJSString message) =>
Window -> Maybe message -> m Bool
confirm self message
= liftDOM ((self ^. jsf "confirm" [toJSVal message]) >>= valToBool)
confirm_ ::
(MonadDOM m, ToJSString message) => Window -> Maybe message -> m ()
confirm_ self message
= liftDOM (void (self ^. jsf "confirm" [toJSVal message]))
prompt ::
(MonadDOM m, ToJSString message, ToJSString defaultValue,
FromJSString result) =>
Window -> Maybe message -> Maybe defaultValue -> m (Maybe result)
prompt self message defaultValue
= liftDOM
((self ^. jsf "prompt" [toJSVal message, toJSVal defaultValue]) >>=
fromJSVal)
prompt_ ::
(MonadDOM m, ToJSString message, ToJSString defaultValue) =>
Window -> Maybe message -> Maybe defaultValue -> m ()
prompt_ self message defaultValue
= liftDOM
(void
(self ^. jsf "prompt" [toJSVal message, toJSVal defaultValue]))
promptUnsafe ::
(MonadDOM m, ToJSString message, ToJSString defaultValue,
HasCallStack, FromJSString result) =>
Window -> Maybe message -> Maybe defaultValue -> m result
promptUnsafe self message defaultValue
= liftDOM
(((self ^. jsf "prompt" [toJSVal message, toJSVal defaultValue])
>>= fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
promptUnchecked ::
(MonadDOM m, ToJSString message, ToJSString defaultValue,
FromJSString result) =>
Window -> Maybe message -> Maybe defaultValue -> m result
promptUnchecked self message defaultValue
= liftDOM
((self ^. jsf "prompt" [toJSVal message, toJSVal defaultValue]) >>=
fromJSValUnchecked)
print :: (MonadDOM m) => Window -> m ()
print self = liftDOM (void (self ^. jsf "print" ()))
requestAnimationFrame ::
(MonadDOM m) => Window -> RequestAnimationFrameCallback -> m Int
requestAnimationFrame self callback
= liftDOM
(round <$>
((self ^. jsf "requestAnimationFrame" [toJSVal callback]) >>=
valToNumber))
requestAnimationFrame_ ::
(MonadDOM m) => Window -> RequestAnimationFrameCallback -> m ()
requestAnimationFrame_ self callback
= liftDOM
(void (self ^. jsf "requestAnimationFrame" [toJSVal callback]))
cancelAnimationFrame :: (MonadDOM m) => Window -> Int -> m ()
cancelAnimationFrame self handle
= liftDOM
(void (self ^. jsf "cancelAnimationFrame" [toJSVal handle]))
postMessage ::
(MonadDOM m, ToJSVal message, ToJSString targetOrigin,
IsGObject transfer) =>
Window -> message -> targetOrigin -> [transfer] -> m ()
postMessage self message targetOrigin transfer
= liftDOM
(void
(self ^. jsf "postMessage"
[toJSVal message, toJSVal targetOrigin, toJSVal (array transfer)]))
captureEvents :: (MonadDOM m) => Window -> m ()
captureEvents self
= liftDOM (void (self ^. jsf "captureEvents" ()))
releaseEvents :: (MonadDOM m) => Window -> m ()
releaseEvents self
= liftDOM (void (self ^. jsf "releaseEvents" ()))
getComputedStyle ::
(MonadDOM m, IsElement element, ToJSString pseudoElement) =>
Window -> element -> Maybe pseudoElement -> m CSSStyleDeclaration
getComputedStyle self element pseudoElement
= liftDOM
((self ^. jsf "getComputedStyle"
[toJSVal element, toJSVal pseudoElement])
>>= fromJSValUnchecked)
getComputedStyle_ ::
(MonadDOM m, IsElement element, ToJSString pseudoElement) =>
Window -> element -> Maybe pseudoElement -> m ()
getComputedStyle_ self element pseudoElement
= liftDOM
(void
(self ^. jsf "getComputedStyle"
[toJSVal element, toJSVal pseudoElement]))
matchMedia ::
(MonadDOM m, ToJSString query) =>
Window -> query -> m MediaQueryList
matchMedia self query
= liftDOM
((self ^. jsf "matchMedia" [toJSVal query]) >>= fromJSValUnchecked)
matchMedia_ ::
(MonadDOM m, ToJSString query) => Window -> query -> m ()
matchMedia_ self query
= liftDOM (void (self ^. jsf "matchMedia" [toJSVal query]))
moveTo ::
(MonadDOM m) => Window -> Maybe Float -> Maybe Float -> m ()
moveTo self x y
= liftDOM (void (self ^. jsf "moveTo" [toJSVal x, toJSVal y]))
moveBy ::
(MonadDOM m) => Window -> Maybe Float -> Maybe Float -> m ()
moveBy self x y
= liftDOM (void (self ^. jsf "moveBy" [toJSVal x, toJSVal y]))
resizeTo ::
(MonadDOM m) => Window -> Maybe Float -> Maybe Float -> m ()
resizeTo self width height
= liftDOM
(void (self ^. jsf "resizeTo" [toJSVal width, toJSVal height]))
resizeBy ::
(MonadDOM m) => Window -> Maybe Float -> Maybe Float -> m ()
resizeBy self x y
= liftDOM (void (self ^. jsf "resizeBy" [toJSVal x, toJSVal y]))
scrollOpt ::
(MonadDOM m) => Window -> Maybe ScrollToOptions -> m ()
scrollOpt self options
= liftDOM (void (self ^. jsf "scroll" [toJSVal options]))
scroll :: (MonadDOM m) => Window -> Double -> Double -> m ()
scroll self x y
= liftDOM (void (self ^. jsf "scroll" [toJSVal x, toJSVal y]))
scrollToOpt ::
(MonadDOM m) => Window -> Maybe ScrollToOptions -> m ()
scrollToOpt self options
= liftDOM (void (self ^. jsf "scrollTo" [toJSVal options]))
scrollTo :: (MonadDOM m) => Window -> Double -> Double -> m ()
scrollTo self x y
= liftDOM (void (self ^. jsf "scrollTo" [toJSVal x, toJSVal y]))
scrollByOpt ::
(MonadDOM m) => Window -> Maybe ScrollToOptions -> m ()
scrollByOpt self option
= liftDOM (void (self ^. jsf "scrollBy" [toJSVal option]))
scrollBy :: (MonadDOM m) => Window -> Double -> Double -> m ()
scrollBy self x y
= liftDOM (void (self ^. jsf "scrollBy" [toJSVal x, toJSVal y]))
getSelection :: (MonadDOM m) => Window -> m (Maybe Selection)
getSelection self
= liftDOM ((self ^. jsf "getSelection" ()) >>= fromJSVal)
getSelection_ :: (MonadDOM m) => Window -> m ()
getSelection_ self = liftDOM (void (self ^. jsf "getSelection" ()))
getSelectionUnsafe ::
(MonadDOM m, HasCallStack) => Window -> m Selection
getSelectionUnsafe self
= liftDOM
(((self ^. jsf "getSelection" ()) >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getSelectionUnchecked :: (MonadDOM m) => Window -> m Selection
getSelectionUnchecked self
= liftDOM ((self ^. jsf "getSelection" ()) >>= fromJSValUnchecked)
find ::
(MonadDOM m, ToJSString string) =>
Window ->
Maybe string ->
Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> m Bool
find self string caseSensitive backwards wrap wholeWord
searchInFrames showDialog
= liftDOM
((self ^. jsf "find"
[toJSVal string, toJSVal caseSensitive, toJSVal backwards,
toJSVal wrap, toJSVal wholeWord, toJSVal searchInFrames,
toJSVal showDialog])
>>= valToBool)
find_ ::
(MonadDOM m, ToJSString string) =>
Window ->
Maybe string ->
Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> m ()
find_ self string caseSensitive backwards wrap wholeWord
searchInFrames showDialog
= liftDOM
(void
(self ^. jsf "find"
[toJSVal string, toJSVal caseSensitive, toJSVal backwards,
toJSVal wrap, toJSVal wholeWord, toJSVal searchInFrames,
toJSVal showDialog]))
webkitRequestAnimationFrame ::
(MonadDOM m) => Window -> RequestAnimationFrameCallback -> m Int
webkitRequestAnimationFrame self callback
= liftDOM
(round <$>
((self ^. jsf "webkitRequestAnimationFrame" [toJSVal callback]) >>=
valToNumber))
webkitRequestAnimationFrame_ ::
(MonadDOM m) => Window -> RequestAnimationFrameCallback -> m ()
webkitRequestAnimationFrame_ self callback
= liftDOM
(void
(self ^. jsf "webkitRequestAnimationFrame" [toJSVal callback]))
webkitCancelAnimationFrame :: (MonadDOM m) => Window -> Int -> m ()
webkitCancelAnimationFrame self id
= liftDOM
(void (self ^. jsf "webkitCancelAnimationFrame" [toJSVal id]))
webkitCancelRequestAnimationFrame ::
(MonadDOM m) => Window -> Int -> m ()
webkitCancelRequestAnimationFrame self id
= liftDOM
(void
(self ^. jsf "webkitCancelRequestAnimationFrame" [toJSVal id]))
getMatchedCSSRules ::
(MonadDOM m, IsElement element, ToJSString pseudoElement) =>
Window -> Maybe element -> Maybe pseudoElement -> m CSSRuleList
getMatchedCSSRules self element pseudoElement
= liftDOM
((self ^. jsf "getMatchedCSSRules"
[toJSVal element, toJSVal pseudoElement])
>>= fromJSValUnchecked)
getMatchedCSSRules_ ::
(MonadDOM m, IsElement element, ToJSString pseudoElement) =>
Window -> Maybe element -> Maybe pseudoElement -> m ()
getMatchedCSSRules_ self element pseudoElement
= liftDOM
(void
(self ^. jsf "getMatchedCSSRules"
[toJSVal element, toJSVal pseudoElement]))
showModalDialog ::
(MonadDOM m, ToJSString url, ToJSVal dialogArgs,
ToJSString featureArgs) =>
Window -> url -> Maybe dialogArgs -> Maybe featureArgs -> m JSVal
showModalDialog self url dialogArgs featureArgs
= liftDOM
((self ^. jsf "showModalDialog"
[toJSVal url, toJSVal dialogArgs, toJSVal featureArgs])
>>= toJSVal)
showModalDialog_ ::
(MonadDOM m, ToJSString url, ToJSVal dialogArgs,
ToJSString featureArgs) =>
Window -> url -> Maybe dialogArgs -> Maybe featureArgs -> m ()
showModalDialog_ self url dialogArgs featureArgs
= liftDOM
(void
(self ^. jsf "showModalDialog"
[toJSVal url, toJSVal dialogArgs, toJSVal featureArgs]))
webkitConvertPointFromPageToNode ::
(MonadDOM m, IsNode node) =>
Window -> Maybe node -> Maybe WebKitPoint -> m WebKitPoint
webkitConvertPointFromPageToNode self node p
= liftDOM
((self ^. jsf "webkitConvertPointFromPageToNode"
[toJSVal node, toJSVal p])
>>= fromJSValUnchecked)
webkitConvertPointFromPageToNode_ ::
(MonadDOM m, IsNode node) =>
Window -> Maybe node -> Maybe WebKitPoint -> m ()
webkitConvertPointFromPageToNode_ self node p
= liftDOM
(void
(self ^. jsf "webkitConvertPointFromPageToNode"
[toJSVal node, toJSVal p]))
webkitConvertPointFromNodeToPage ::
(MonadDOM m, IsNode node) =>
Window -> Maybe node -> Maybe WebKitPoint -> m WebKitPoint
webkitConvertPointFromNodeToPage self node p
= liftDOM
((self ^. jsf "webkitConvertPointFromNodeToPage"
[toJSVal node, toJSVal p])
>>= fromJSValUnchecked)
webkitConvertPointFromNodeToPage_ ::
(MonadDOM m, IsNode node) =>
Window -> Maybe node -> Maybe WebKitPoint -> m ()
webkitConvertPointFromNodeToPage_ self node p
= liftDOM
(void
(self ^. jsf "webkitConvertPointFromNodeToPage"
[toJSVal node, toJSVal p]))
collectMatchingElementsInFlatTree ::
(MonadDOM m, IsNode scope, ToJSString selectors) =>
Window -> scope -> selectors -> m NodeList
collectMatchingElementsInFlatTree self scope selectors
= liftDOM
((self ^. jsf "collectMatchingElementsInFlatTree"
[toJSVal scope, toJSVal selectors])
>>= fromJSValUnchecked)
collectMatchingElementsInFlatTree_ ::
(MonadDOM m, IsNode scope, ToJSString selectors) =>
Window -> scope -> selectors -> m ()
collectMatchingElementsInFlatTree_ self scope selectors
= liftDOM
(void
(self ^. jsf "collectMatchingElementsInFlatTree"
[toJSVal scope, toJSVal selectors]))
matchingElementInFlatTree ::
(MonadDOM m, IsNode scope, ToJSString selectors) =>
Window -> scope -> selectors -> m (Maybe Element)
matchingElementInFlatTree self scope selectors
= liftDOM
((self ^. jsf "matchingElementInFlatTree"
[toJSVal scope, toJSVal selectors])
>>= fromJSVal)
matchingElementInFlatTree_ ::
(MonadDOM m, IsNode scope, ToJSString selectors) =>
Window -> scope -> selectors -> m ()
matchingElementInFlatTree_ self scope selectors
= liftDOM
(void
(self ^. jsf "matchingElementInFlatTree"
[toJSVal scope, toJSVal selectors]))
matchingElementInFlatTreeUnsafe ::
(MonadDOM m, IsNode scope, ToJSString selectors, HasCallStack) =>
Window -> scope -> selectors -> m Element
matchingElementInFlatTreeUnsafe self scope selectors
= liftDOM
(((self ^. jsf "matchingElementInFlatTree"
[toJSVal scope, toJSVal selectors])
>>= fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
matchingElementInFlatTreeUnchecked ::
(MonadDOM m, IsNode scope, ToJSString selectors) =>
Window -> scope -> selectors -> m Element
matchingElementInFlatTreeUnchecked self scope selectors
= liftDOM
((self ^. jsf "matchingElementInFlatTree"
[toJSVal scope, toJSVal selectors])
>>= fromJSValUnchecked)
getIndexedDB :: (MonadDOM m) => Window -> m IDBFactory
getIndexedDB self
= liftDOM ((self ^. js "indexedDB") >>= fromJSValUnchecked)
getWebkitIndexedDB :: (MonadDOM m) => Window -> m IDBFactory
getWebkitIndexedDB self
= liftDOM ((self ^. js "webkitIndexedDB") >>= fromJSValUnchecked)
getWebkitStorageInfo :: (MonadDOM m) => Window -> m StorageInfo
getWebkitStorageInfo self
= liftDOM ((self ^. js "webkitStorageInfo") >>= fromJSValUnchecked)
getSpeechSynthesis :: (MonadDOM m) => Window -> m SpeechSynthesis
getSpeechSynthesis self
= liftDOM ((self ^. js "speechSynthesis") >>= fromJSValUnchecked)
getWindow :: (MonadDOM m) => Window -> m Window
getWindow self
= liftDOM ((self ^. js "window") >>= fromJSValUnchecked)
getSelf :: (MonadDOM m) => Window -> m Window
getSelf self = liftDOM ((self ^. js "self") >>= fromJSValUnchecked)
getDocument :: (MonadDOM m) => Window -> m Document
getDocument self
= liftDOM ((self ^. js "document") >>= fromJSValUnchecked)
setName :: (MonadDOM m, ToJSString val) => Window -> val -> m ()
setName self val = liftDOM (self ^. jss "name" (toJSVal val))
getName :: (MonadDOM m, FromJSString result) => Window -> m result
getName self = liftDOM ((self ^. js "name") >>= fromJSValUnchecked)
getLocation :: (MonadDOM m) => Window -> m Location
getLocation self
= liftDOM ((self ^. js "location") >>= fromJSValUnchecked)
getHistory :: (MonadDOM m) => Window -> m History
getHistory self
= liftDOM ((self ^. js "history") >>= fromJSValUnchecked)
getCustomElements ::
(MonadDOM m) => Window -> m CustomElementRegistry
getCustomElements self
= liftDOM ((self ^. js "customElements") >>= fromJSValUnchecked)
getLocationbar :: (MonadDOM m) => Window -> m BarProp
getLocationbar self
= liftDOM ((self ^. js "locationbar") >>= fromJSValUnchecked)
getMenubar :: (MonadDOM m) => Window -> m BarProp
getMenubar self
= liftDOM ((self ^. js "menubar") >>= fromJSValUnchecked)
getPersonalbar :: (MonadDOM m) => Window -> m BarProp
getPersonalbar self
= liftDOM ((self ^. js "personalbar") >>= fromJSValUnchecked)
getScrollbars :: (MonadDOM m) => Window -> m BarProp
getScrollbars self
= liftDOM ((self ^. js "scrollbars") >>= fromJSValUnchecked)
getStatusbar :: (MonadDOM m) => Window -> m BarProp
getStatusbar self
= liftDOM ((self ^. js "statusbar") >>= fromJSValUnchecked)
getToolbar :: (MonadDOM m) => Window -> m BarProp
getToolbar self
= liftDOM ((self ^. js "toolbar") >>= fromJSValUnchecked)
setStatus :: (MonadDOM m, ToJSString val) => Window -> val -> m ()
setStatus self val = liftDOM (self ^. jss "status" (toJSVal val))
getStatus ::
(MonadDOM m, FromJSString result) => Window -> m result
getStatus self
= liftDOM ((self ^. js "status") >>= fromJSValUnchecked)
getClosed :: (MonadDOM m) => Window -> m Bool
getClosed self = liftDOM ((self ^. js "closed") >>= valToBool)
getFrames :: (MonadDOM m) => Window -> m Window
getFrames self
= liftDOM ((self ^. js "frames") >>= fromJSValUnchecked)
getLength :: (MonadDOM m) => Window -> m Word
getLength self
= liftDOM (round <$> ((self ^. js "length") >>= valToNumber))
getTop :: (MonadDOM m) => Window -> m (Maybe Window)
getTop self = liftDOM ((self ^. js "top") >>= fromJSVal)
getTopUnsafe :: (MonadDOM m, HasCallStack) => Window -> m Window
getTopUnsafe self
= liftDOM
(((self ^. js "top") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getTopUnchecked :: (MonadDOM m) => Window -> m Window
getTopUnchecked self
= liftDOM ((self ^. js "top") >>= fromJSValUnchecked)
getOpener :: (MonadDOM m) => Window -> m (Maybe Window)
getOpener self = liftDOM ((self ^. js "opener") >>= fromJSVal)
getOpenerUnsafe :: (MonadDOM m, HasCallStack) => Window -> m Window
getOpenerUnsafe self
= liftDOM
(((self ^. js "opener") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getOpenerUnchecked :: (MonadDOM m) => Window -> m Window
getOpenerUnchecked self
= liftDOM ((self ^. js "opener") >>= fromJSValUnchecked)
getParent :: (MonadDOM m) => Window -> m (Maybe Window)
getParent self = liftDOM ((self ^. js "parent") >>= fromJSVal)
getParentUnsafe :: (MonadDOM m, HasCallStack) => Window -> m Window
getParentUnsafe self
= liftDOM
(((self ^. js "parent") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getParentUnchecked :: (MonadDOM m) => Window -> m Window
getParentUnchecked self
= liftDOM ((self ^. js "parent") >>= fromJSValUnchecked)
getFrameElement :: (MonadDOM m) => Window -> m (Maybe Element)
getFrameElement self
= liftDOM ((self ^. js "frameElement") >>= fromJSVal)
getFrameElementUnsafe ::
(MonadDOM m, HasCallStack) => Window -> m Element
getFrameElementUnsafe self
= liftDOM
(((self ^. js "frameElement") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getFrameElementUnchecked :: (MonadDOM m) => Window -> m Element
getFrameElementUnchecked self
= liftDOM ((self ^. js "frameElement") >>= fromJSValUnchecked)
getNavigator :: (MonadDOM m) => Window -> m Navigator
getNavigator self
= liftDOM ((self ^. js "navigator") >>= fromJSValUnchecked)
getApplicationCache :: (MonadDOM m) => Window -> m ApplicationCache
getApplicationCache self
= liftDOM ((self ^. js "applicationCache") >>= fromJSValUnchecked)
getSessionStorage :: (MonadDOM m) => Window -> m Storage
getSessionStorage self
= liftDOM ((self ^. js "sessionStorage") >>= fromJSValUnchecked)
getLocalStorage :: (MonadDOM m) => Window -> m Storage
getLocalStorage self
= liftDOM ((self ^. js "localStorage") >>= fromJSValUnchecked)
getScreen :: (MonadDOM m) => Window -> m Screen
getScreen self
= liftDOM ((self ^. js "screen") >>= fromJSValUnchecked)
getInnerHeight :: (MonadDOM m) => Window -> m Int
getInnerHeight self
= liftDOM (round <$> ((self ^. js "innerHeight") >>= valToNumber))
getInnerWidth :: (MonadDOM m) => Window -> m Int
getInnerWidth self
= liftDOM (round <$> ((self ^. js "innerWidth") >>= valToNumber))
getScrollX :: (MonadDOM m) => Window -> m Double
getScrollX self = liftDOM ((self ^. js "scrollX") >>= valToNumber)
getPageXOffset :: (MonadDOM m) => Window -> m Double
getPageXOffset self
= liftDOM ((self ^. js "pageXOffset") >>= valToNumber)
getScrollY :: (MonadDOM m) => Window -> m Double
getScrollY self = liftDOM ((self ^. js "scrollY") >>= valToNumber)
getPageYOffset :: (MonadDOM m) => Window -> m Double
getPageYOffset self
= liftDOM ((self ^. js "pageYOffset") >>= valToNumber)
getScreenX :: (MonadDOM m) => Window -> m Int
getScreenX self
= liftDOM (round <$> ((self ^. js "screenX") >>= valToNumber))
getScreenY :: (MonadDOM m) => Window -> m Int
getScreenY self
= liftDOM (round <$> ((self ^. js "screenY") >>= valToNumber))
getOuterWidth :: (MonadDOM m) => Window -> m Int
getOuterWidth self
= liftDOM (round <$> ((self ^. js "outerWidth") >>= valToNumber))
getOuterHeight :: (MonadDOM m) => Window -> m Int
getOuterHeight self
= liftDOM (round <$> ((self ^. js "outerHeight") >>= valToNumber))
getDevicePixelRatio :: (MonadDOM m) => Window -> m Double
getDevicePixelRatio self
= liftDOM ((self ^. js "devicePixelRatio") >>= valToNumber)
getOrientation :: (MonadDOM m) => Window -> m Int
getOrientation self
= liftDOM (round <$> ((self ^. js "orientation") >>= valToNumber))
getEvent :: (MonadDOM m) => Window -> m Event
getEvent self
= liftDOM ((self ^. js "event") >>= fromJSValUnchecked)
setDefaultStatus ::
(MonadDOM m, ToJSString val) => Window -> val -> m ()
setDefaultStatus self val
= liftDOM (self ^. jss "defaultStatus" (toJSVal val))
getDefaultStatus ::
(MonadDOM m, FromJSString result) => Window -> m result
getDefaultStatus self
= liftDOM ((self ^. js "defaultStatus") >>= fromJSValUnchecked)
setDefaultstatus ::
(MonadDOM m, ToJSString val) => Window -> val -> m ()
setDefaultstatus self val
= liftDOM (self ^. jss "defaultstatus" (toJSVal val))
getDefaultstatus ::
(MonadDOM m, FromJSString result) => Window -> m result
getDefaultstatus self
= liftDOM ((self ^. js "defaultstatus") >>= fromJSValUnchecked)
getOffscreenBuffering :: (MonadDOM m) => Window -> m Bool
getOffscreenBuffering self
= liftDOM ((self ^. js "offscreenBuffering") >>= valToBool)
getScreenLeft :: (MonadDOM m) => Window -> m Int
getScreenLeft self
= liftDOM (round <$> ((self ^. js "screenLeft") >>= valToNumber))
getScreenTop :: (MonadDOM m) => Window -> m Int
getScreenTop self
= liftDOM (round <$> ((self ^. js "screenTop") >>= valToNumber))
getClientInformation :: (MonadDOM m) => Window -> m Navigator
getClientInformation self
= liftDOM ((self ^. js "clientInformation") >>= fromJSValUnchecked)
getStyleMedia :: (MonadDOM m) => Window -> m StyleMedia
getStyleMedia self
= liftDOM ((self ^. js "styleMedia") >>= fromJSValUnchecked)
gestureChange :: EventName Window UIEvent
gestureChange = unsafeEventName (toJSString "gesturechange")
gestureEnd :: EventName Window UIEvent
gestureEnd = unsafeEventName (toJSString "gestureend")
gestureStart :: EventName Window UIEvent
gestureStart = unsafeEventName (toJSString "gesturestart")
deviceMotion :: EventName Window DeviceMotionEvent
deviceMotion = unsafeEventName (toJSString "devicemotion")
deviceOrientation :: EventName Window DeviceOrientationEvent
deviceOrientation
= unsafeEventName (toJSString "deviceorientation")
webKitDeviceProximity :: EventName Window DeviceProximityEvent
webKitDeviceProximity
= unsafeEventName (toJSString "webkitdeviceproximity")
webKitAnimationEnd :: EventName Window AnimationEvent
webKitAnimationEnd
= unsafeEventName (toJSString "webkitanimationend")
webKitAnimationIteration :: EventName Window AnimationEvent
webKitAnimationIteration
= unsafeEventName (toJSString "webkitanimationiteration")
webKitAnimationStart :: EventName Window AnimationEvent
webKitAnimationStart
= unsafeEventName (toJSString "webkitanimationstart")
webKitTransitionEnd :: EventName Window TransitionEvent
webKitTransitionEnd
= unsafeEventName (toJSString "webkittransitionend")