packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/Document.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from dom (webref). Do not edit.
module JSDOM.Generated.Document
       (newDocument, adoptNode, adoptNode_, captureEvents, caretPositionFromPoint, caretPositionFromPoint_, caretPositionFromPointUnsafe, caretPositionFromPointUnchecked, clear, close, createAttribute, createAttribute_, createAttributeNS, createAttributeNS_, createCDATASection, createCDATASection_, createComment, createComment_, createDocumentFragment, createDocumentFragment_, createElement, createElement_, createElement', createElement'_, createElementNS, createElementNS_, createElementNS', createElementNS'_, createEvent, createEvent_, createNodeIterator, createNodeIterator_, createProcessingInstruction, createProcessingInstruction_, createRange, createRange_, createTextNode, createTextNode_, createTreeWalker, createTreeWalker_, elementFromPoint, elementFromPoint_, elementFromPointUnsafe, elementFromPointUnchecked, elementsFromPoint, elementsFromPoint_, execCommand, execCommand_, exitFullscreen, exitPictureInPicture, exitPointerLock, getElementsByClassName, getElementsByClassName_, getElementsByName, getElementsByName_, getElementsByTagName, getElementsByTagName_, getElementsByTagNameNS, getElementsByTagNameNS_, getSelection, getSelection_, getSelectionUnsafe, getSelectionUnchecked, hasFocus, hasFocus_, hasStorageAccess, hasStorageAccess_, importNode, importNode_, open, open_, openUrlNameFeatures, openUrlNameFeatures_, openUrlNameFeaturesUnsafe, openUrlNameFeaturesUnchecked, queryCommandEnabled, queryCommandEnabled_, queryCommandIndeterm, queryCommandIndeterm_, queryCommandState, queryCommandState_, queryCommandSupported, queryCommandSupported_, queryCommandValue, queryCommandValue_, releaseEvents, requestStorageAccess, startViewTransition, startViewTransition_, write, writeln, parseHTML, parseHTML_, parseHTMLUnsafe, parseHTMLUnsafe_, getImplementation, getURL, getDocumentURI, getCompatMode, getCharacterSet, getCharset, getInputEncoding, getContentType, getDoctype, getDoctypeUnsafe, getDoctypeUnchecked, getDocumentElement, getDocumentElementUnsafe, getDocumentElementUnchecked, getRootElement, getRootElementUnsafe, getRootElementUnchecked, getActiveViewTransition, getActiveViewTransitionUnsafe, getActiveViewTransitionUnchecked, getScrollingElement, getScrollingElementUnsafe, getScrollingElementUnchecked, getFullscreenEnabled, getFullscreen, getLocation, getLocationUnsafe, getLocationUnchecked, setDomain, getDomain, getReferrer, setCookie, getCookie, getLastModified, getReadyState, setTitle, getTitle, setDir, getDir, setBody, getBody, getBodyUnsafe, getBodyUnchecked, getHead, getHeadUnsafe, getHeadUnchecked, getImages, getEmbeds, getPlugins, getLinks, getForms, getScripts, getCurrentScript, getCurrentScriptUnsafe, getCurrentScriptUnchecked, getDefaultView, getDefaultViewUnsafe, getDefaultViewUnchecked, setDesignMode, getDesignMode, getHidden, getVisibilityState, setFgColor, getFgColor, setLinkColor, getLinkColor, setVlinkColor, getVlinkColor, setAlinkColor, getAlinkColor, setBgColor, getBgColor, getAnchors, getApplets, getAll, getPictureInPictureEnabled, getFragmentDirective, getTimeline, fullscreenchange, fullscreenerror, readyStateChange, visibilitychange, pointerlockchange, pointerlockerror, autofill, domContentLoaded, unload, Document(..), gTypeDocument, IsDocument, toDocument)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums

-- | <https://developer.mozilla.org/docs/Web/API/Document/Document MDN Document. documentation>
newDocument :: (MonadDOM m) => m Document
newDocument = liftDOM (((new (jsg "Document") ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/adoptNode MDN Document.adoptNode documentation>
adoptNode :: (MonadDOM m, IsDocument self, IsNode node) => self -> node -> m Node
adoptNode self node = liftDOM ((((Types.toDocument self) ^. jsf "adoptNode" [toJSVal node]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/adoptNode MDN Document.adoptNode documentation>
adoptNode_ :: (MonadDOM m, IsDocument self, IsNode node) => self -> node -> m ()
adoptNode_ self node = liftDOM (void ((Types.toDocument self) ^. jsf "adoptNode" [toJSVal node]))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-captureevents Document.captureEvents specification>
captureEvents :: (MonadDOM m, IsDocument self) => self -> m ()
captureEvents self = liftDOM (void ((Types.toDocument self) ^. jsf "captureEvents" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint MDN Document.caretPositionFromPoint documentation>
caretPositionFromPoint :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> Maybe CaretPositionFromPointOptions -> m (Maybe CaretPosition)
caretPositionFromPoint self x y options = liftDOM ((((Types.toDocument self) ^. jsf "caretPositionFromPoint" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint MDN Document.caretPositionFromPoint documentation>
caretPositionFromPoint_ :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> Maybe CaretPositionFromPointOptions -> m ()
caretPositionFromPoint_ self x y options = liftDOM (void ((Types.toDocument self) ^. jsf "caretPositionFromPoint" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint MDN Document.caretPositionFromPoint documentation>
caretPositionFromPointUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> Double -> Double -> Maybe CaretPositionFromPointOptions -> m CaretPosition
caretPositionFromPointUnsafe self x y options = liftDOM (((((Types.toDocument self) ^. jsf "caretPositionFromPoint" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint MDN Document.caretPositionFromPoint documentation>
caretPositionFromPointUnchecked :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> Maybe CaretPositionFromPointOptions -> m CaretPosition
caretPositionFromPointUnchecked self x y options = liftDOM ((((Types.toDocument self) ^. jsf "caretPositionFromPoint" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/clear MDN Document.clear documentation>
clear :: (MonadDOM m, IsDocument self) => self -> m ()
clear self = liftDOM (void ((Types.toDocument self) ^. jsf "clear" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/close MDN Document.close documentation>
close :: (MonadDOM m, IsDocument self) => self -> m ()
close self = liftDOM (void ((Types.toDocument self) ^. jsf "close" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createAttribute MDN Document.createAttribute documentation>
createAttribute :: (MonadDOM m, IsDocument self, ToJSString localName) => self -> localName -> m Attr
createAttribute self localName = liftDOM ((((Types.toDocument self) ^. jsf "createAttribute" [toJSVal localName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createAttribute MDN Document.createAttribute documentation>
createAttribute_ :: (MonadDOM m, IsDocument self, ToJSString localName) => self -> localName -> m ()
createAttribute_ self localName = liftDOM (void ((Types.toDocument self) ^. jsf "createAttribute" [toJSVal localName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createAttributeNS MDN Document.createAttributeNS documentation>
createAttributeNS :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName) => self -> Maybe namespace -> qualifiedName -> m Attr
createAttributeNS self namespace qualifiedName = liftDOM ((((Types.toDocument self) ^. jsf "createAttributeNS" [toJSVal namespace, toJSVal qualifiedName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createAttributeNS MDN Document.createAttributeNS documentation>
createAttributeNS_ :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName) => self -> Maybe namespace -> qualifiedName -> m ()
createAttributeNS_ self namespace qualifiedName = liftDOM (void ((Types.toDocument self) ^. jsf "createAttributeNS" [toJSVal namespace, toJSVal qualifiedName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createCDATASection MDN Document.createCDATASection documentation>
createCDATASection :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m CDATASection
createCDATASection self data' = liftDOM ((((Types.toDocument self) ^. jsf "createCDATASection" [toJSVal data']) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createCDATASection MDN Document.createCDATASection documentation>
createCDATASection_ :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m ()
createCDATASection_ self data' = liftDOM (void ((Types.toDocument self) ^. jsf "createCDATASection" [toJSVal data']))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createComment MDN Document.createComment documentation>
createComment :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m Comment
createComment self data' = liftDOM ((((Types.toDocument self) ^. jsf "createComment" [toJSVal data']) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createComment MDN Document.createComment documentation>
createComment_ :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m ()
createComment_ self data' = liftDOM (void ((Types.toDocument self) ^. jsf "createComment" [toJSVal data']))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createDocumentFragment MDN Document.createDocumentFragment documentation>
createDocumentFragment :: (MonadDOM m, IsDocument self) => self -> m DocumentFragment
createDocumentFragment self = liftDOM ((((Types.toDocument self) ^. jsf "createDocumentFragment" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createDocumentFragment MDN Document.createDocumentFragment documentation>
createDocumentFragment_ :: (MonadDOM m, IsDocument self) => self -> m ()
createDocumentFragment_ self = liftDOM (void ((Types.toDocument self) ^. jsf "createDocumentFragment" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElement MDN Document.createElement documentation>
createElement :: (MonadDOM m, IsDocument self, ToJSString localName) => self -> localName -> m Element
createElement self localName = liftDOM ((((Types.toDocument self) ^. jsf "createElement" [toJSVal localName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElement MDN Document.createElement documentation>
createElement_ :: (MonadDOM m, IsDocument self, ToJSString localName) => self -> localName -> m ()
createElement_ self localName = liftDOM (void ((Types.toDocument self) ^. jsf "createElement" [toJSVal localName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElement MDN Document.createElement documentation>
createElement' :: (MonadDOM m, IsDocument self, ToJSString localName, IsStringOrElementCreationOptions options) => self -> localName -> Maybe options -> m Element
createElement' self localName options = liftDOM ((((Types.toDocument self) ^. jsf "createElement" [toJSVal localName, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElement MDN Document.createElement documentation>
createElement'_ :: (MonadDOM m, IsDocument self, ToJSString localName, IsStringOrElementCreationOptions options) => self -> localName -> Maybe options -> m ()
createElement'_ self localName options = liftDOM (void ((Types.toDocument self) ^. jsf "createElement" [toJSVal localName, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElementNS MDN Document.createElementNS documentation>
createElementNS :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName) => self -> Maybe namespace -> qualifiedName -> m Element
createElementNS self namespace qualifiedName = liftDOM ((((Types.toDocument self) ^. jsf "createElementNS" [toJSVal namespace, toJSVal qualifiedName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElementNS MDN Document.createElementNS documentation>
createElementNS_ :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName) => self -> Maybe namespace -> qualifiedName -> m ()
createElementNS_ self namespace qualifiedName = liftDOM (void ((Types.toDocument self) ^. jsf "createElementNS" [toJSVal namespace, toJSVal qualifiedName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElementNS MDN Document.createElementNS documentation>
createElementNS' :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName, IsStringOrElementCreationOptions options) => self -> Maybe namespace -> qualifiedName -> Maybe options -> m Element
createElementNS' self namespace qualifiedName options = liftDOM ((((Types.toDocument self) ^. jsf "createElementNS" [toJSVal namespace, toJSVal qualifiedName, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createElementNS MDN Document.createElementNS documentation>
createElementNS'_ :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString qualifiedName, IsStringOrElementCreationOptions options) => self -> Maybe namespace -> qualifiedName -> Maybe options -> m ()
createElementNS'_ self namespace qualifiedName options = liftDOM (void ((Types.toDocument self) ^. jsf "createElementNS" [toJSVal namespace, toJSVal qualifiedName, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createEvent MDN Document.createEvent documentation>
createEvent :: (MonadDOM m, IsDocument self, ToJSString interface) => self -> interface -> m Event
createEvent self interface = liftDOM ((((Types.toDocument self) ^. jsf "createEvent" [toJSVal interface]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createEvent MDN Document.createEvent documentation>
createEvent_ :: (MonadDOM m, IsDocument self, ToJSString interface) => self -> interface -> m ()
createEvent_ self interface = liftDOM (void ((Types.toDocument self) ^. jsf "createEvent" [toJSVal interface]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createNodeIterator MDN Document.createNodeIterator documentation>
createNodeIterator :: (MonadDOM m, IsDocument self, IsNode root) => self -> root -> Maybe Word -> Maybe NodeFilter -> m NodeIterator
createNodeIterator self root whatToShow filter = liftDOM ((((Types.toDocument self) ^. jsf "createNodeIterator" [toJSVal root, P.maybe (P.return jsUndefined) toJSVal whatToShow, toJSVal filter]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createNodeIterator MDN Document.createNodeIterator documentation>
createNodeIterator_ :: (MonadDOM m, IsDocument self, IsNode root) => self -> root -> Maybe Word -> Maybe NodeFilter -> m ()
createNodeIterator_ self root whatToShow filter = liftDOM (void ((Types.toDocument self) ^. jsf "createNodeIterator" [toJSVal root, P.maybe (P.return jsUndefined) toJSVal whatToShow, toJSVal filter]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction MDN Document.createProcessingInstruction documentation>
createProcessingInstruction :: (MonadDOM m, IsDocument self, ToJSString target, ToJSString data') => self -> target -> data' -> m ProcessingInstruction
createProcessingInstruction self target data' = liftDOM ((((Types.toDocument self) ^. jsf "createProcessingInstruction" [toJSVal target, toJSVal data']) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction MDN Document.createProcessingInstruction documentation>
createProcessingInstruction_ :: (MonadDOM m, IsDocument self, ToJSString target, ToJSString data') => self -> target -> data' -> m ()
createProcessingInstruction_ self target data' = liftDOM (void ((Types.toDocument self) ^. jsf "createProcessingInstruction" [toJSVal target, toJSVal data']))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createRange MDN Document.createRange documentation>
createRange :: (MonadDOM m, IsDocument self) => self -> m Range
createRange self = liftDOM ((((Types.toDocument self) ^. jsf "createRange" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createRange MDN Document.createRange documentation>
createRange_ :: (MonadDOM m, IsDocument self) => self -> m ()
createRange_ self = liftDOM (void ((Types.toDocument self) ^. jsf "createRange" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createTextNode MDN Document.createTextNode documentation>
createTextNode :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m Text
createTextNode self data' = liftDOM ((((Types.toDocument self) ^. jsf "createTextNode" [toJSVal data']) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createTextNode MDN Document.createTextNode documentation>
createTextNode_ :: (MonadDOM m, IsDocument self, ToJSString data') => self -> data' -> m ()
createTextNode_ self data' = liftDOM (void ((Types.toDocument self) ^. jsf "createTextNode" [toJSVal data']))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createTreeWalker MDN Document.createTreeWalker documentation>
createTreeWalker :: (MonadDOM m, IsDocument self, IsNode root) => self -> root -> Maybe Word -> Maybe NodeFilter -> m TreeWalker
createTreeWalker self root whatToShow filter = liftDOM ((((Types.toDocument self) ^. jsf "createTreeWalker" [toJSVal root, P.maybe (P.return jsUndefined) toJSVal whatToShow, toJSVal filter]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/createTreeWalker MDN Document.createTreeWalker documentation>
createTreeWalker_ :: (MonadDOM m, IsDocument self, IsNode root) => self -> root -> Maybe Word -> Maybe NodeFilter -> m ()
createTreeWalker_ self root whatToShow filter = liftDOM (void ((Types.toDocument self) ^. jsf "createTreeWalker" [toJSVal root, P.maybe (P.return jsUndefined) toJSVal whatToShow, toJSVal filter]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementFromPoint MDN Document.elementFromPoint documentation>
elementFromPoint :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> m (Maybe Element)
elementFromPoint self x y = liftDOM ((((Types.toDocument self) ^. jsf "elementFromPoint" [toJSVal x, toJSVal y]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementFromPoint MDN Document.elementFromPoint documentation>
elementFromPoint_ :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> m ()
elementFromPoint_ self x y = liftDOM (void ((Types.toDocument self) ^. jsf "elementFromPoint" [toJSVal x, toJSVal y]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementFromPoint MDN Document.elementFromPoint documentation>
elementFromPointUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> Double -> Double -> m Element
elementFromPointUnsafe self x y = liftDOM (((((Types.toDocument self) ^. jsf "elementFromPoint" [toJSVal x, toJSVal y]) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementFromPoint MDN Document.elementFromPoint documentation>
elementFromPointUnchecked :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> m Element
elementFromPointUnchecked self x y = liftDOM ((((Types.toDocument self) ^. jsf "elementFromPoint" [toJSVal x, toJSVal y]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementsFromPoint MDN Document.elementsFromPoint documentation>
elementsFromPoint :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> m [Element]
elementsFromPoint self x y = liftDOM ((((Types.toDocument self) ^. jsf "elementsFromPoint" [toJSVal x, toJSVal y]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/elementsFromPoint MDN Document.elementsFromPoint documentation>
elementsFromPoint_ :: (MonadDOM m, IsDocument self) => self -> Double -> Double -> m ()
elementsFromPoint_ self x y = liftDOM (void ((Types.toDocument self) ^. jsf "elementsFromPoint" [toJSVal x, toJSVal y]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/execCommand MDN Document.execCommand documentation>
execCommand :: (MonadDOM m, IsDocument self, ToJSString commandId, ToJSString value) => self -> commandId -> Maybe Bool -> Maybe value -> m Bool
execCommand self commandId showUI value = liftDOM ((((Types.toDocument self) ^. jsf "execCommand" [toJSVal commandId, P.maybe (P.return jsUndefined) toJSVal showUI, P.maybe (P.return jsUndefined) toJSVal value]) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/execCommand MDN Document.execCommand documentation>
execCommand_ :: (MonadDOM m, IsDocument self, ToJSString commandId, ToJSString value) => self -> commandId -> Maybe Bool -> Maybe value -> m ()
execCommand_ self commandId showUI value = liftDOM (void ((Types.toDocument self) ^. jsf "execCommand" [toJSVal commandId, P.maybe (P.return jsUndefined) toJSVal showUI, P.maybe (P.return jsUndefined) toJSVal value]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/exitFullscreen MDN Document.exitFullscreen documentation>
exitFullscreen :: (MonadDOM m, IsDocument self) => self -> m ()
exitFullscreen self = liftDOM (void ((((Types.toDocument self) ^. jsf "exitFullscreen" ()) >>= readPromise)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/exitPictureInPicture MDN Document.exitPictureInPicture documentation>
exitPictureInPicture :: (MonadDOM m, IsDocument self) => self -> m ()
exitPictureInPicture self = liftDOM (void ((((Types.toDocument self) ^. jsf "exitPictureInPicture" ()) >>= readPromise)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock MDN Document.exitPointerLock documentation>
exitPointerLock :: (MonadDOM m, IsDocument self) => self -> m ()
exitPointerLock self = liftDOM (void ((Types.toDocument self) ^. jsf "exitPointerLock" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName MDN Document.getElementsByClassName documentation>
getElementsByClassName :: (MonadDOM m, IsDocument self, ToJSString classNames) => self -> classNames -> m HTMLCollection
getElementsByClassName self classNames = liftDOM ((((Types.toDocument self) ^. jsf "getElementsByClassName" [toJSVal classNames]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName MDN Document.getElementsByClassName documentation>
getElementsByClassName_ :: (MonadDOM m, IsDocument self, ToJSString classNames) => self -> classNames -> m ()
getElementsByClassName_ self classNames = liftDOM (void ((Types.toDocument self) ^. jsf "getElementsByClassName" [toJSVal classNames]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByName MDN Document.getElementsByName documentation>
getElementsByName :: (MonadDOM m, IsDocument self, ToJSString elementName) => self -> elementName -> m NodeList
getElementsByName self elementName = liftDOM ((((Types.toDocument self) ^. jsf "getElementsByName" [toJSVal elementName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByName MDN Document.getElementsByName documentation>
getElementsByName_ :: (MonadDOM m, IsDocument self, ToJSString elementName) => self -> elementName -> m ()
getElementsByName_ self elementName = liftDOM (void ((Types.toDocument self) ^. jsf "getElementsByName" [toJSVal elementName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByTagName MDN Document.getElementsByTagName documentation>
getElementsByTagName :: (MonadDOM m, IsDocument self, ToJSString qualifiedName) => self -> qualifiedName -> m HTMLCollection
getElementsByTagName self qualifiedName = liftDOM ((((Types.toDocument self) ^. jsf "getElementsByTagName" [toJSVal qualifiedName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByTagName MDN Document.getElementsByTagName documentation>
getElementsByTagName_ :: (MonadDOM m, IsDocument self, ToJSString qualifiedName) => self -> qualifiedName -> m ()
getElementsByTagName_ self qualifiedName = liftDOM (void ((Types.toDocument self) ^. jsf "getElementsByTagName" [toJSVal qualifiedName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByTagNameNS MDN Document.getElementsByTagNameNS documentation>
getElementsByTagNameNS :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString localName) => self -> Maybe namespace -> localName -> m HTMLCollection
getElementsByTagNameNS self namespace localName = liftDOM ((((Types.toDocument self) ^. jsf "getElementsByTagNameNS" [toJSVal namespace, toJSVal localName]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getElementsByTagNameNS MDN Document.getElementsByTagNameNS documentation>
getElementsByTagNameNS_ :: (MonadDOM m, IsDocument self, ToJSString namespace, ToJSString localName) => self -> Maybe namespace -> localName -> m ()
getElementsByTagNameNS_ self namespace localName = liftDOM (void ((Types.toDocument self) ^. jsf "getElementsByTagNameNS" [toJSVal namespace, toJSVal localName]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getSelection MDN Document.getSelection documentation>
getSelection :: (MonadDOM m, IsDocument self) => self -> m (Maybe Selection)
getSelection self = liftDOM ((((Types.toDocument self) ^. jsf "getSelection" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getSelection MDN Document.getSelection documentation>
getSelection_ :: (MonadDOM m, IsDocument self) => self -> m ()
getSelection_ self = liftDOM (void ((Types.toDocument self) ^. jsf "getSelection" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getSelection MDN Document.getSelection documentation>
getSelectionUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m Selection
getSelectionUnsafe self = liftDOM (((((Types.toDocument self) ^. jsf "getSelection" ()) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/getSelection MDN Document.getSelection documentation>
getSelectionUnchecked :: (MonadDOM m, IsDocument self) => self -> m Selection
getSelectionUnchecked self = liftDOM ((((Types.toDocument self) ^. jsf "getSelection" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/hasFocus MDN Document.hasFocus documentation>
hasFocus :: (MonadDOM m, IsDocument self) => self -> m Bool
hasFocus self = liftDOM ((((Types.toDocument self) ^. jsf "hasFocus" ()) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/hasFocus MDN Document.hasFocus documentation>
hasFocus_ :: (MonadDOM m, IsDocument self) => self -> m ()
hasFocus_ self = liftDOM (void ((Types.toDocument self) ^. jsf "hasFocus" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess MDN Document.hasStorageAccess documentation>
hasStorageAccess :: (MonadDOM m, IsDocument self) => self -> m Bool
hasStorageAccess self = liftDOM ((((((Types.toDocument self) ^. jsf "hasStorageAccess" ()) >>= readPromise)) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess MDN Document.hasStorageAccess documentation>
hasStorageAccess_ :: (MonadDOM m, IsDocument self) => self -> m ()
hasStorageAccess_ self = liftDOM (void ((((Types.toDocument self) ^. jsf "hasStorageAccess" ()) >>= readPromise)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/importNode MDN Document.importNode documentation>
importNode :: (MonadDOM m, IsDocument self, IsNode node, IsBoolOrImportNodeOptions options) => self -> node -> Maybe options -> m Node
importNode self node options = liftDOM ((((Types.toDocument self) ^. jsf "importNode" [toJSVal node, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/importNode MDN Document.importNode documentation>
importNode_ :: (MonadDOM m, IsDocument self, IsNode node, IsBoolOrImportNodeOptions options) => self -> node -> Maybe options -> m ()
importNode_ self node options = liftDOM (void ((Types.toDocument self) ^. jsf "importNode" [toJSVal node, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
open :: (MonadDOM m, IsDocument self, ToJSString unused1, ToJSString unused2) => self -> Maybe unused1 -> Maybe unused2 -> m Document
open self unused1 unused2 = liftDOM ((((Types.toDocument self) ^. jsf "open" [P.maybe (P.return jsUndefined) toJSVal unused1, P.maybe (P.return jsUndefined) toJSVal unused2]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
open_ :: (MonadDOM m, IsDocument self, ToJSString unused1, ToJSString unused2) => self -> Maybe unused1 -> Maybe unused2 -> m ()
open_ self unused1 unused2 = liftDOM (void ((Types.toDocument self) ^. jsf "open" [P.maybe (P.return jsUndefined) toJSVal unused1, P.maybe (P.return jsUndefined) toJSVal unused2]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
openUrlNameFeatures :: (MonadDOM m, IsDocument self, ToJSString url, ToJSString name, ToJSString features) => self -> url -> name -> features -> m (Maybe Window)
openUrlNameFeatures self url name features = liftDOM ((((Types.toDocument self) ^. jsf "open" [toJSVal url, toJSVal name, toJSVal features]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
openUrlNameFeatures_ :: (MonadDOM m, IsDocument self, ToJSString url, ToJSString name, ToJSString features) => self -> url -> name -> features -> m ()
openUrlNameFeatures_ self url name features = liftDOM (void ((Types.toDocument self) ^. jsf "open" [toJSVal url, toJSVal name, toJSVal features]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
openUrlNameFeaturesUnsafe :: (MonadDOM m, IsDocument self, ToJSString url, ToJSString name, ToJSString features, HasCallStack) => self -> url -> name -> features -> m Window
openUrlNameFeaturesUnsafe self url name features = liftDOM (((((Types.toDocument self) ^. jsf "open" [toJSVal url, toJSVal name, toJSVal features]) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/open MDN Document.open documentation>
openUrlNameFeaturesUnchecked :: (MonadDOM m, IsDocument self, ToJSString url, ToJSString name, ToJSString features) => self -> url -> name -> features -> m Window
openUrlNameFeaturesUnchecked self url name features = liftDOM ((((Types.toDocument self) ^. jsf "open" [toJSVal url, toJSVal name, toJSVal features]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandEnabled MDN Document.queryCommandEnabled documentation>
queryCommandEnabled :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m Bool
queryCommandEnabled self commandId = liftDOM ((((Types.toDocument self) ^. jsf "queryCommandEnabled" [toJSVal commandId]) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandEnabled MDN Document.queryCommandEnabled documentation>
queryCommandEnabled_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandEnabled_ self commandId = liftDOM (void ((Types.toDocument self) ^. jsf "queryCommandEnabled" [toJSVal commandId]))

queryCommandIndeterm :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m Bool
queryCommandIndeterm self commandId = liftDOM ((((Types.toDocument self) ^. jsf "queryCommandIndeterm" [toJSVal commandId]) >>= valToBool))

queryCommandIndeterm_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandIndeterm_ self commandId = liftDOM (void ((Types.toDocument self) ^. jsf "queryCommandIndeterm" [toJSVal commandId]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandState MDN Document.queryCommandState documentation>
queryCommandState :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m Bool
queryCommandState self commandId = liftDOM ((((Types.toDocument self) ^. jsf "queryCommandState" [toJSVal commandId]) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandState MDN Document.queryCommandState documentation>
queryCommandState_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandState_ self commandId = liftDOM (void ((Types.toDocument self) ^. jsf "queryCommandState" [toJSVal commandId]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandSupported MDN Document.queryCommandSupported documentation>
queryCommandSupported :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m Bool
queryCommandSupported self commandId = liftDOM ((((Types.toDocument self) ^. jsf "queryCommandSupported" [toJSVal commandId]) >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/queryCommandSupported MDN Document.queryCommandSupported documentation>
queryCommandSupported_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandSupported_ self commandId = liftDOM (void ((Types.toDocument self) ^. jsf "queryCommandSupported" [toJSVal commandId]))

queryCommandValue :: (MonadDOM m, IsDocument self, ToJSString commandId, FromJSString result) => self -> commandId -> m result
queryCommandValue self commandId = liftDOM ((((Types.toDocument self) ^. jsf "queryCommandValue" [toJSVal commandId]) >>= fromJSValUnchecked))

queryCommandValue_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandValue_ self commandId = liftDOM (void ((Types.toDocument self) ^. jsf "queryCommandValue" [toJSVal commandId]))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-releaseevents Document.releaseEvents specification>
releaseEvents :: (MonadDOM m, IsDocument self) => self -> m ()
releaseEvents self = liftDOM (void ((Types.toDocument self) ^. jsf "releaseEvents" ()))

-- | <https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess MDN Document.requestStorageAccess documentation>
requestStorageAccess :: (MonadDOM m, IsDocument self) => self -> m ()
requestStorageAccess self = liftDOM (void ((((Types.toDocument self) ^. jsf "requestStorageAccess" ()) >>= readPromise)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/startViewTransition MDN Document.startViewTransition documentation>
startViewTransition :: (MonadDOM m, IsDocument self, IsViewTransitionUpdateCallbackOrStartViewTransitionOptions callbackOptions) => self -> Maybe callbackOptions -> m ViewTransition
startViewTransition self callbackOptions = liftDOM ((((Types.toDocument self) ^. jsf "startViewTransition" [P.maybe (P.return jsUndefined) toJSVal callbackOptions]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/startViewTransition MDN Document.startViewTransition documentation>
startViewTransition_ :: (MonadDOM m, IsDocument self, IsViewTransitionUpdateCallbackOrStartViewTransitionOptions callbackOptions) => self -> Maybe callbackOptions -> m ()
startViewTransition_ self callbackOptions = liftDOM (void ((Types.toDocument self) ^. jsf "startViewTransition" [P.maybe (P.return jsUndefined) toJSVal callbackOptions]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/write MDN Document.write documentation>
write :: (MonadDOM m, IsDocument self, IsTrustedHTMLOrString text) => self -> [text] -> m ()
write self text = liftDOM (void ((Types.toDocument self) ^. jsf "write" ([] ++ P.map toJSVal text)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/writeln MDN Document.writeln documentation>
writeln :: (MonadDOM m, IsDocument self, IsTrustedHTMLOrString text) => self -> [text] -> m ()
writeln self text = liftDOM (void ((Types.toDocument self) ^. jsf "writeln" ([] ++ P.map toJSVal text)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/parseHTML_static MDN Document.parseHTML documentation>
parseHTML :: (MonadDOM m, ToJSString html) => html -> Maybe SetHTMLOptions -> m Document
parseHTML html options = liftDOM ((((jsg "Document") ^. jsf "parseHTML" [toJSVal html, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/parseHTML_static MDN Document.parseHTML documentation>
parseHTML_ :: (MonadDOM m, ToJSString html) => html -> Maybe SetHTMLOptions -> m ()
parseHTML_ html options = liftDOM (void ((jsg "Document") ^. jsf "parseHTML" [toJSVal html, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static MDN Document.parseHTMLUnsafe documentation>
parseHTMLUnsafe :: (MonadDOM m, IsTrustedHTMLOrString html, IsParseHTMLUnsafeOptionsOrTrustedHTMLParserOptions options) => html -> Maybe options -> m Document
parseHTMLUnsafe html options = liftDOM ((((jsg "Document") ^. jsf "parseHTMLUnsafe" [toJSVal html, P.maybe (P.return jsUndefined) toJSVal options]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static MDN Document.parseHTMLUnsafe documentation>
parseHTMLUnsafe_ :: (MonadDOM m, IsTrustedHTMLOrString html, IsParseHTMLUnsafeOptionsOrTrustedHTMLParserOptions options) => html -> Maybe options -> m ()
parseHTMLUnsafe_ html options = liftDOM (void ((jsg "Document") ^. jsf "parseHTMLUnsafe" [toJSVal html, P.maybe (P.return jsUndefined) toJSVal options]))

-- | <https://developer.mozilla.org/docs/Web/API/Document/implementation MDN Document.implementation documentation>
getImplementation :: (MonadDOM m, IsDocument self) => self -> m DOMImplementation
getImplementation self = liftDOM ((((Types.toDocument self) ^. js "implementation") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/URL MDN Document.URL documentation>
getURL :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getURL self = liftDOM ((((Types.toDocument self) ^. js "URL") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/documentURI MDN Document.documentURI documentation>
getDocumentURI :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getDocumentURI self = liftDOM ((((Types.toDocument self) ^. js "documentURI") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/compatMode MDN Document.compatMode documentation>
getCompatMode :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getCompatMode self = liftDOM ((((Types.toDocument self) ^. js "compatMode") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/characterSet MDN Document.characterSet documentation>
getCharacterSet :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getCharacterSet self = liftDOM ((((Types.toDocument self) ^. js "characterSet") >>= fromJSValUnchecked))

-- | <https://dom.spec.whatwg.org/#dom-document-charset Document.charset specification>
getCharset :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getCharset self = liftDOM ((((Types.toDocument self) ^. js "charset") >>= fromJSValUnchecked))

-- | <https://dom.spec.whatwg.org/#dom-document-inputencoding Document.inputEncoding specification>
getInputEncoding :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getInputEncoding self = liftDOM ((((Types.toDocument self) ^. js "inputEncoding") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/contentType MDN Document.contentType documentation>
getContentType :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getContentType self = liftDOM ((((Types.toDocument self) ^. js "contentType") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/doctype MDN Document.doctype documentation>
getDoctype :: (MonadDOM m, IsDocument self) => self -> m (Maybe DocumentType)
getDoctype self = liftDOM ((((Types.toDocument self) ^. js "doctype") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/doctype MDN Document.doctype documentation>
getDoctypeUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m DocumentType
getDoctypeUnsafe self = liftDOM (((((Types.toDocument self) ^. js "doctype") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/doctype MDN Document.doctype documentation>
getDoctypeUnchecked :: (MonadDOM m, IsDocument self) => self -> m DocumentType
getDoctypeUnchecked self = liftDOM ((((Types.toDocument self) ^. js "doctype") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/documentElement MDN Document.documentElement documentation>
getDocumentElement :: (MonadDOM m, IsDocument self) => self -> m (Maybe Element)
getDocumentElement self = liftDOM ((((Types.toDocument self) ^. js "documentElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/documentElement MDN Document.documentElement documentation>
getDocumentElementUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m Element
getDocumentElementUnsafe self = liftDOM (((((Types.toDocument self) ^. js "documentElement") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/documentElement MDN Document.documentElement documentation>
getDocumentElementUnchecked :: (MonadDOM m, IsDocument self) => self -> m Element
getDocumentElementUnchecked self = liftDOM ((((Types.toDocument self) ^. js "documentElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/rootElement MDN Document.rootElement documentation>
getRootElement :: (MonadDOM m, IsDocument self) => self -> m (Maybe SVGSVGElement)
getRootElement self = liftDOM ((((Types.toDocument self) ^. js "rootElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/rootElement MDN Document.rootElement documentation>
getRootElementUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m SVGSVGElement
getRootElementUnsafe self = liftDOM (((((Types.toDocument self) ^. js "rootElement") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/rootElement MDN Document.rootElement documentation>
getRootElementUnchecked :: (MonadDOM m, IsDocument self) => self -> m SVGSVGElement
getRootElementUnchecked self = liftDOM ((((Types.toDocument self) ^. js "rootElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/activeViewTransition MDN Document.activeViewTransition documentation>
getActiveViewTransition :: (MonadDOM m, IsDocument self) => self -> m (Maybe ViewTransition)
getActiveViewTransition self = liftDOM ((((Types.toDocument self) ^. js "activeViewTransition") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/activeViewTransition MDN Document.activeViewTransition documentation>
getActiveViewTransitionUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m ViewTransition
getActiveViewTransitionUnsafe self = liftDOM (((((Types.toDocument self) ^. js "activeViewTransition") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/activeViewTransition MDN Document.activeViewTransition documentation>
getActiveViewTransitionUnchecked :: (MonadDOM m, IsDocument self) => self -> m ViewTransition
getActiveViewTransitionUnchecked self = liftDOM ((((Types.toDocument self) ^. js "activeViewTransition") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/scrollingElement MDN Document.scrollingElement documentation>
getScrollingElement :: (MonadDOM m, IsDocument self) => self -> m (Maybe Element)
getScrollingElement self = liftDOM ((((Types.toDocument self) ^. js "scrollingElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/scrollingElement MDN Document.scrollingElement documentation>
getScrollingElementUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m Element
getScrollingElementUnsafe self = liftDOM (((((Types.toDocument self) ^. js "scrollingElement") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/scrollingElement MDN Document.scrollingElement documentation>
getScrollingElementUnchecked :: (MonadDOM m, IsDocument self) => self -> m Element
getScrollingElementUnchecked self = liftDOM ((((Types.toDocument self) ^. js "scrollingElement") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/fullscreenEnabled MDN Document.fullscreenEnabled documentation>
getFullscreenEnabled :: (MonadDOM m, IsDocument self) => self -> m Bool
getFullscreenEnabled self = liftDOM ((((Types.toDocument self) ^. js "fullscreenEnabled") >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/fullscreen MDN Document.fullscreen documentation>
getFullscreen :: (MonadDOM m, IsDocument self) => self -> m Bool
getFullscreen self = liftDOM ((((Types.toDocument self) ^. js "fullscreen") >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/location MDN Document.location documentation>
getLocation :: (MonadDOM m, IsDocument self) => self -> m (Maybe Location)
getLocation self = liftDOM ((((Types.toDocument self) ^. js "location") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/location MDN Document.location documentation>
getLocationUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m Location
getLocationUnsafe self = liftDOM (((((Types.toDocument self) ^. js "location") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/location MDN Document.location documentation>
getLocationUnchecked :: (MonadDOM m, IsDocument self) => self -> m Location
getLocationUnchecked self = liftDOM ((((Types.toDocument self) ^. js "location") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/domain MDN Document.domain documentation>
setDomain :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setDomain self val = liftDOM (void ((Types.toDocument self) ^. jss "domain" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/domain MDN Document.domain documentation>
getDomain :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getDomain self = liftDOM ((((Types.toDocument self) ^. js "domain") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/referrer MDN Document.referrer documentation>
getReferrer :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getReferrer self = liftDOM ((((Types.toDocument self) ^. js "referrer") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/cookie MDN Document.cookie documentation>
setCookie :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setCookie self val = liftDOM (void ((Types.toDocument self) ^. jss "cookie" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/cookie MDN Document.cookie documentation>
getCookie :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getCookie self = liftDOM ((((Types.toDocument self) ^. js "cookie") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/lastModified MDN Document.lastModified documentation>
getLastModified :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getLastModified self = liftDOM ((((Types.toDocument self) ^. js "lastModified") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/readyState MDN Document.readyState documentation>
getReadyState :: (MonadDOM m, IsDocument self) => self -> m DocumentReadyState
getReadyState self = liftDOM ((((Types.toDocument self) ^. js "readyState") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/title MDN Document.title documentation>
setTitle :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setTitle self val = liftDOM (void ((Types.toDocument self) ^. jss "title" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/title MDN Document.title documentation>
getTitle :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getTitle self = liftDOM ((((Types.toDocument self) ^. js "title") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/dir MDN Document.dir documentation>
setDir :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setDir self val = liftDOM (void ((Types.toDocument self) ^. jss "dir" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/dir MDN Document.dir documentation>
getDir :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getDir self = liftDOM ((((Types.toDocument self) ^. js "dir") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/body MDN Document.body documentation>
setBody :: (MonadDOM m, IsDocument self, IsHTMLElement val) => self -> Maybe val -> m ()
setBody self val = liftDOM (void ((Types.toDocument self) ^. jss "body" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/body MDN Document.body documentation>
getBody :: (MonadDOM m, IsDocument self) => self -> m (Maybe HTMLElement)
getBody self = liftDOM ((((Types.toDocument self) ^. js "body") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/body MDN Document.body documentation>
getBodyUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m HTMLElement
getBodyUnsafe self = liftDOM (((((Types.toDocument self) ^. js "body") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/body MDN Document.body documentation>
getBodyUnchecked :: (MonadDOM m, IsDocument self) => self -> m HTMLElement
getBodyUnchecked self = liftDOM ((((Types.toDocument self) ^. js "body") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/head MDN Document.head documentation>
getHead :: (MonadDOM m, IsDocument self) => self -> m (Maybe HTMLHeadElement)
getHead self = liftDOM ((((Types.toDocument self) ^. js "head") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/head MDN Document.head documentation>
getHeadUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m HTMLHeadElement
getHeadUnsafe self = liftDOM (((((Types.toDocument self) ^. js "head") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/head MDN Document.head documentation>
getHeadUnchecked :: (MonadDOM m, IsDocument self) => self -> m HTMLHeadElement
getHeadUnchecked self = liftDOM ((((Types.toDocument self) ^. js "head") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/images MDN Document.images documentation>
getImages :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getImages self = liftDOM ((((Types.toDocument self) ^. js "images") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/embeds MDN Document.embeds documentation>
getEmbeds :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getEmbeds self = liftDOM ((((Types.toDocument self) ^. js "embeds") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/plugins MDN Document.plugins documentation>
getPlugins :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getPlugins self = liftDOM ((((Types.toDocument self) ^. js "plugins") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/links MDN Document.links documentation>
getLinks :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getLinks self = liftDOM ((((Types.toDocument self) ^. js "links") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/forms MDN Document.forms documentation>
getForms :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getForms self = liftDOM ((((Types.toDocument self) ^. js "forms") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/scripts MDN Document.scripts documentation>
getScripts :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getScripts self = liftDOM ((((Types.toDocument self) ^. js "scripts") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/currentScript MDN Document.currentScript documentation>
getCurrentScript :: (MonadDOM m, IsDocument self) => self -> m (Maybe HTMLOrSVGScriptElement)
getCurrentScript self = liftDOM ((((Types.toDocument self) ^. js "currentScript") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/currentScript MDN Document.currentScript documentation>
getCurrentScriptUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m HTMLOrSVGScriptElement
getCurrentScriptUnsafe self = liftDOM (((((Types.toDocument self) ^. js "currentScript") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/currentScript MDN Document.currentScript documentation>
getCurrentScriptUnchecked :: (MonadDOM m, IsDocument self) => self -> m HTMLOrSVGScriptElement
getCurrentScriptUnchecked self = liftDOM ((((Types.toDocument self) ^. js "currentScript") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/defaultView MDN Document.defaultView documentation>
getDefaultView :: (MonadDOM m, IsDocument self) => self -> m (Maybe Window)
getDefaultView self = liftDOM ((((Types.toDocument self) ^. js "defaultView") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/defaultView MDN Document.defaultView documentation>
getDefaultViewUnsafe :: (MonadDOM m, IsDocument self, HasCallStack) => self -> m Window
getDefaultViewUnsafe self = liftDOM (((((Types.toDocument self) ^. js "defaultView") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/Document/defaultView MDN Document.defaultView documentation>
getDefaultViewUnchecked :: (MonadDOM m, IsDocument self) => self -> m Window
getDefaultViewUnchecked self = liftDOM ((((Types.toDocument self) ^. js "defaultView") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/designMode MDN Document.designMode documentation>
setDesignMode :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setDesignMode self val = liftDOM (void ((Types.toDocument self) ^. jss "designMode" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/designMode MDN Document.designMode documentation>
getDesignMode :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getDesignMode self = liftDOM ((((Types.toDocument self) ^. js "designMode") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/hidden MDN Document.hidden documentation>
getHidden :: (MonadDOM m, IsDocument self) => self -> m Bool
getHidden self = liftDOM ((((Types.toDocument self) ^. js "hidden") >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/visibilityState MDN Document.visibilityState documentation>
getVisibilityState :: (MonadDOM m, IsDocument self) => self -> m DocumentVisibilityState
getVisibilityState self = liftDOM ((((Types.toDocument self) ^. js "visibilityState") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/fgColor MDN Document.fgColor documentation>
setFgColor :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setFgColor self val = liftDOM (void ((Types.toDocument self) ^. jss "fgColor" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/fgColor MDN Document.fgColor documentation>
getFgColor :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getFgColor self = liftDOM ((((Types.toDocument self) ^. js "fgColor") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/linkColor MDN Document.linkColor documentation>
setLinkColor :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setLinkColor self val = liftDOM (void ((Types.toDocument self) ^. jss "linkColor" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/linkColor MDN Document.linkColor documentation>
getLinkColor :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getLinkColor self = liftDOM ((((Types.toDocument self) ^. js "linkColor") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/vlinkColor MDN Document.vlinkColor documentation>
setVlinkColor :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setVlinkColor self val = liftDOM (void ((Types.toDocument self) ^. jss "vlinkColor" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/vlinkColor MDN Document.vlinkColor documentation>
getVlinkColor :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getVlinkColor self = liftDOM ((((Types.toDocument self) ^. js "vlinkColor") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/alinkColor MDN Document.alinkColor documentation>
setAlinkColor :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setAlinkColor self val = liftDOM (void ((Types.toDocument self) ^. jss "alinkColor" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/alinkColor MDN Document.alinkColor documentation>
getAlinkColor :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getAlinkColor self = liftDOM ((((Types.toDocument self) ^. js "alinkColor") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/bgColor MDN Document.bgColor documentation>
setBgColor :: (MonadDOM m, IsDocument self, ToJSString val) => self -> val -> m ()
setBgColor self val = liftDOM (void ((Types.toDocument self) ^. jss "bgColor" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/Document/bgColor MDN Document.bgColor documentation>
getBgColor :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getBgColor self = liftDOM ((((Types.toDocument self) ^. js "bgColor") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/anchors MDN Document.anchors documentation>
getAnchors :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getAnchors self = liftDOM ((((Types.toDocument self) ^. js "anchors") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/applets MDN Document.applets documentation>
getApplets :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getApplets self = liftDOM ((((Types.toDocument self) ^. js "applets") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/all MDN Document.all documentation>
getAll :: (MonadDOM m, IsDocument self) => self -> m HTMLAllCollection
getAll self = liftDOM ((((Types.toDocument self) ^. js "all") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureEnabled MDN Document.pictureInPictureEnabled documentation>
getPictureInPictureEnabled :: (MonadDOM m, IsDocument self) => self -> m Bool
getPictureInPictureEnabled self = liftDOM ((((Types.toDocument self) ^. js "pictureInPictureEnabled") >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/Document/fragmentDirective MDN Document.fragmentDirective documentation>
getFragmentDirective :: (MonadDOM m, IsDocument self) => self -> m FragmentDirective
getFragmentDirective self = liftDOM ((((Types.toDocument self) ^. js "fragmentDirective") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/Document/timeline MDN Document.timeline documentation>
getTimeline :: (MonadDOM m, IsDocument self) => self -> m DocumentTimeline
getTimeline self = liftDOM ((((Types.toDocument self) ^. js "timeline") >>= fromJSValUnchecked))

-- | <https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenchange fullscreenchange event>
fullscreenchange :: (IsDocument self, IsEventTarget self) => EventName self Event
fullscreenchange = unsafeEventName (toJSString "fullscreenchange")

-- | <https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenerror fullscreenerror event>
fullscreenerror :: (IsDocument self, IsEventTarget self) => EventName self Event
fullscreenerror = unsafeEventName (toJSString "fullscreenerror")

-- | <https://html.spec.whatwg.org/multipage/webappapis.html#handler-onreadystatechange readystatechange event>
readyStateChange :: (IsDocument self, IsEventTarget self) => EventName self Event
readyStateChange = unsafeEventNameAsync (toJSString "readystatechange")

-- | <https://html.spec.whatwg.org/multipage/webappapis.html#handler-onvisibilitychange visibilitychange event>
visibilitychange :: (IsDocument self, IsEventTarget self) => EventName self Event
visibilitychange = unsafeEventName (toJSString "visibilitychange")

-- | <https://w3c.github.io/pointerlock/#dom-document-onpointerlockchange pointerlockchange event>
pointerlockchange :: (IsDocument self, IsEventTarget self) => EventName self Event
pointerlockchange = unsafeEventName (toJSString "pointerlockchange")

-- | <https://w3c.github.io/pointerlock/#dom-document-onpointerlockerror pointerlockerror event>
pointerlockerror :: (IsDocument self, IsEventTarget self) => EventName self Event
pointerlockerror = unsafeEventName (toJSString "pointerlockerror")

autofill :: (IsDocument self, IsEventTarget self) => EventName self AutofillEvent
autofill = unsafeEventName (toJSString "autofill")

-- | <https://html.spec.whatwg.org/multipage/indices.html#event-domcontentloaded DOMContentLoaded event>
domContentLoaded :: (IsDocument self, IsEventTarget self) => EventName self Event
domContentLoaded = unsafeEventName (toJSString "DOMContentLoaded")

-- | <https://html.spec.whatwg.org/multipage/indices.html#event-unload unload event>
unload :: (IsDocument self, IsEventTarget self) => EventName self Event
unload = unsafeEventName (toJSString "unload")