packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/Document.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from dom (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.Document
       (js_newDocument, js_adoptNode, js_captureEvents, js_caretPositionFromPoint, js_clear, js_close, js_createAttribute, js_createAttributeNS, js_createCDATASection, js_createComment, js_createDocumentFragment, js_createElement, js_createElement', js_createElementNS, js_createElementNS', js_createEvent, js_createNodeIterator, js_createProcessingInstruction, js_createRange, js_createTextNode, js_createTreeWalker, js_elementFromPoint, js_elementsFromPoint, js_execCommand, js_exitFullscreen, js_exitPictureInPicture, js_exitPointerLock, js_getElementsByClassName, js_getElementsByName, js_getElementsByTagName, js_getElementsByTagNameNS, js_getSelection, js_hasFocus, js_hasStorageAccess, js_importNode, js_open, js_openUrlNameFeatures, js_queryCommandEnabled, js_queryCommandIndeterm, js_queryCommandState, js_queryCommandSupported, js_queryCommandValue, js_releaseEvents, js_requestStorageAccess, js_startViewTransition, js_write, js_writeln, js_parseHTML, js_parseHTMLUnsafe, js_getImplementation, js_getURL, js_getDocumentURI, js_getCompatMode, js_getCharacterSet, js_getCharset, js_getInputEncoding, js_getContentType, js_getDoctype, js_getDocumentElement, js_getRootElement, js_getActiveViewTransition, js_getScrollingElement, js_getFullscreenEnabled, js_getFullscreen, js_getLocation, js_setDomain, js_getDomain, js_getReferrer, js_setCookie, js_getCookie, js_getLastModified, js_getReadyState, js_setTitle, js_getTitle, js_setDir, js_getDir, js_setBody, js_getBody, js_getHead, js_getImages, js_getEmbeds, js_getPlugins, js_getLinks, js_getForms, js_getScripts, js_getCurrentScript, js_getDefaultView, js_setDesignMode, js_getDesignMode, js_getHidden, js_getVisibilityState, js_setFgColor, js_getFgColor, js_setLinkColor, js_getLinkColor, js_setVlinkColor, js_getVlinkColor, js_setAlinkColor, js_getAlinkColor, js_setBgColor, js_getBgColor, js_getAnchors, js_getApplets, js_getAll, js_getPictureInPictureEnabled, js_getFragmentDirective, js_getTimeline, 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 GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums

foreign import javascript safe "(() => { return new globalThis[\"Document\"](); })"
        js_newDocument :: IO Document
-- | <https://developer.mozilla.org/docs/Web/API/Document/Document MDN Document. documentation>
newDocument :: (MonadDOM m) => m Document
newDocument = liftDOM ((js_newDocument))

foreign import javascript safe "(($1, $2) => { return $1[\"adoptNode\"]($2); })"
        js_adoptNode :: Document -> Node -> IO Node
-- | <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 ((js_adoptNode ((Types.toDocument self)) (Types.toNode node)))

-- | <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 ((js_adoptNode ((Types.toDocument self)) (Types.toNode node))))

foreign import javascript safe "(($1) => { return $1[\"captureEvents\"](); })"
        js_captureEvents :: Document -> IO ()
-- | <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 ((js_captureEvents ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"caretPositionFromPoint\"]($2, $3, $4); })"
        js_caretPositionFromPoint :: Document -> Double -> Double -> JSVal -> IO JSVal
-- | <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 ((((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_caretPositionFromPoint ((Types.toDocument self)) (x) (y) a4') >>= 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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_caretPositionFromPoint ((Types.toDocument self)) (x) (y) a4')))

-- | <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 (((((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_caretPositionFromPoint ((Types.toDocument self)) (x) (y) a4') >>= 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 ((pFromJSVal <$> ((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_caretPositionFromPoint ((Types.toDocument self)) (x) (y) a4')))

foreign import javascript safe "(($1) => { return $1[\"clear\"](); })"
        js_clear :: Document -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/Document/clear MDN Document.clear documentation>
clear :: (MonadDOM m, IsDocument self) => self -> m ()
clear self = liftDOM (void ((js_clear ((Types.toDocument self)))))

foreign import javascript safe "(($1) => { return $1[\"close\"](); })"
        js_close :: Document -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/Document/close MDN Document.close documentation>
close :: (MonadDOM m, IsDocument self) => self -> m ()
close self = liftDOM (void ((js_close ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { return $1[\"createAttribute\"]($2); })"
        js_createAttribute :: Document -> JSString -> IO Attr
-- | <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 ((js_createAttribute ((Types.toDocument self)) (toJSString localName)))

-- | <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 ((js_createAttribute ((Types.toDocument self)) (toJSString localName))))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"createAttributeNS\"]($2, $3); })"
        js_createAttributeNS :: Document -> (Nullable JSString) -> JSString -> IO Attr
-- | <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 ((js_createAttributeNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName)))

-- | <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 ((js_createAttributeNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName))))

foreign import javascript safe "(($1, $2) => { return $1[\"createCDATASection\"]($2); })"
        js_createCDATASection :: Document -> JSString -> IO CDATASection
-- | <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 ((js_createCDATASection ((Types.toDocument self)) (toJSString data')))

-- | <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 ((js_createCDATASection ((Types.toDocument self)) (toJSString data'))))

foreign import javascript safe "(($1, $2) => { return $1[\"createComment\"]($2); })"
        js_createComment :: Document -> JSString -> IO Comment
-- | <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 ((js_createComment ((Types.toDocument self)) (toJSString data')))

-- | <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 ((js_createComment ((Types.toDocument self)) (toJSString data'))))

foreign import javascript safe "(($1) => { return $1[\"createDocumentFragment\"](); })"
        js_createDocumentFragment :: Document -> IO DocumentFragment
-- | <https://developer.mozilla.org/docs/Web/API/Document/createDocumentFragment MDN Document.createDocumentFragment documentation>
createDocumentFragment :: (MonadDOM m, IsDocument self) => self -> m DocumentFragment
createDocumentFragment self = liftDOM ((js_createDocumentFragment ((Types.toDocument self))))

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

foreign import javascript safe "(($1, $2) => { return $1[\"createElement\"]($2); })"
        js_createElement :: Document -> JSString -> IO Element
-- | <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 ((js_createElement ((Types.toDocument self)) (toJSString localName)))

-- | <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 ((js_createElement ((Types.toDocument self)) (toJSString localName))))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"createElement\"]($2, $3); })"
        js_createElement' :: Document -> JSString -> JSVal -> IO Element
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a3' -> js_createElement' ((Types.toDocument self)) (toJSString localName) a3'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a3' -> js_createElement' ((Types.toDocument self)) (toJSString localName) a3')))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"createElementNS\"]($2, $3); })"
        js_createElementNS :: Document -> (Nullable JSString) -> JSString -> IO Element
-- | <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 ((js_createElementNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName)))

-- | <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 ((js_createElementNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"createElementNS\"]($2, $3, $4); })"
        js_createElementNS' :: Document -> (Nullable JSString) -> JSString -> JSVal -> IO Element
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_createElementNS' ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName) a4'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a4' -> js_createElementNS' ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString qualifiedName) a4')))

foreign import javascript safe "(($1, $2) => { return $1[\"createEvent\"]($2); })"
        js_createEvent :: Document -> JSString -> IO Event
-- | <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 ((js_createEvent ((Types.toDocument self)) (toJSString interface)))

-- | <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 ((js_createEvent ((Types.toDocument self)) (toJSString interface))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"createNodeIterator\"]($2, $3, $4); })"
        js_createNodeIterator :: Document -> Node -> JSVal -> JSVal -> IO NodeIterator
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal whatToShow) >>= \a3' -> (toJSVal filter) >>= \a4' -> js_createNodeIterator ((Types.toDocument self)) (Types.toNode root) a3' a4'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal whatToShow) >>= \a3' -> (toJSVal filter) >>= \a4' -> js_createNodeIterator ((Types.toDocument self)) (Types.toNode root) a3' a4')))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"createProcessingInstruction\"]($2, $3); })"
        js_createProcessingInstruction :: Document -> JSString -> JSString -> IO ProcessingInstruction
-- | <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 ((js_createProcessingInstruction ((Types.toDocument self)) (toJSString target) (toJSString data')))

-- | <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 ((js_createProcessingInstruction ((Types.toDocument self)) (toJSString target) (toJSString data'))))

foreign import javascript safe "(($1) => { return $1[\"createRange\"](); })"
        js_createRange :: Document -> IO Range
-- | <https://developer.mozilla.org/docs/Web/API/Document/createRange MDN Document.createRange documentation>
createRange :: (MonadDOM m, IsDocument self) => self -> m Range
createRange self = liftDOM ((js_createRange ((Types.toDocument self))))

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

foreign import javascript safe "(($1, $2) => { return $1[\"createTextNode\"]($2); })"
        js_createTextNode :: Document -> JSString -> IO Text
-- | <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 ((js_createTextNode ((Types.toDocument self)) (toJSString data')))

-- | <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 ((js_createTextNode ((Types.toDocument self)) (toJSString data'))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"createTreeWalker\"]($2, $3, $4); })"
        js_createTreeWalker :: Document -> Node -> JSVal -> JSVal -> IO TreeWalker
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal whatToShow) >>= \a3' -> (toJSVal filter) >>= \a4' -> js_createTreeWalker ((Types.toDocument self)) (Types.toNode root) a3' a4'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal whatToShow) >>= \a3' -> (toJSVal filter) >>= \a4' -> js_createTreeWalker ((Types.toDocument self)) (Types.toNode root) a3' a4')))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"elementFromPoint\"]($2, $3); })"
        js_elementFromPoint :: Document -> Double -> Double -> IO JSVal
-- | <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 (((js_elementFromPoint ((Types.toDocument self)) (x) (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 ((js_elementFromPoint ((Types.toDocument self)) (x) (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 ((((js_elementFromPoint ((Types.toDocument self)) (x) (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 ((pFromJSVal <$> (js_elementFromPoint ((Types.toDocument self)) (x) (y))))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"elementsFromPoint\"]($2, $3); })"
        js_elementsFromPoint :: Document -> Double -> Double -> IO JSVal
-- | <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 (((js_elementsFromPoint ((Types.toDocument self)) (x) (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 ((js_elementsFromPoint ((Types.toDocument self)) (x) (y))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"execCommand\"]($2, $3, $4); })"
        js_execCommand :: Document -> JSString -> JSVal -> (Optional JSString) -> IO Bool
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal showUI) >>= \a3' -> js_execCommand ((Types.toDocument self)) (toJSString commandId) a3' (toOptionalJSString value)))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal showUI) >>= \a3' -> js_execCommand ((Types.toDocument self)) (toJSString commandId) a3' (toOptionalJSString value))))

foreign import javascript interruptible "(($1, $c) => { return $1[\"exitFullscreen\"]().then(function(s) { $c(null, s);}, function(e) { $c(e, null);}); })"
        js_exitFullscreen :: Document -> IO (JSVal, ())
-- | <https://developer.mozilla.org/docs/Web/API/Document/exitFullscreen MDN Document.exitFullscreen documentation>
exitFullscreen :: (MonadDOM m, IsDocument self) => self -> m ()
exitFullscreen self = liftDOM (void (((js_exitFullscreen ((Types.toDocument self))) >>= checkPromiseResult)))

foreign import javascript interruptible "(($1, $c) => { return $1[\"exitPictureInPicture\"]().then(function(s) { $c(null, s);}, function(e) { $c(e, null);}); })"
        js_exitPictureInPicture :: Document -> IO (JSVal, ())
-- | <https://developer.mozilla.org/docs/Web/API/Document/exitPictureInPicture MDN Document.exitPictureInPicture documentation>
exitPictureInPicture :: (MonadDOM m, IsDocument self) => self -> m ()
exitPictureInPicture self = liftDOM (void (((js_exitPictureInPicture ((Types.toDocument self))) >>= checkPromiseResult)))

foreign import javascript safe "(($1) => { return $1[\"exitPointerLock\"](); })"
        js_exitPointerLock :: Document -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock MDN Document.exitPointerLock documentation>
exitPointerLock :: (MonadDOM m, IsDocument self) => self -> m ()
exitPointerLock self = liftDOM (void ((js_exitPointerLock ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { return $1[\"getElementsByClassName\"]($2); })"
        js_getElementsByClassName :: Document -> JSString -> IO HTMLCollection
-- | <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 ((js_getElementsByClassName ((Types.toDocument self)) (toJSString classNames)))

-- | <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 ((js_getElementsByClassName ((Types.toDocument self)) (toJSString classNames))))

foreign import javascript safe "(($1, $2) => { return $1[\"getElementsByName\"]($2); })"
        js_getElementsByName :: Document -> JSString -> IO NodeList
-- | <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 ((js_getElementsByName ((Types.toDocument self)) (toJSString elementName)))

-- | <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 ((js_getElementsByName ((Types.toDocument self)) (toJSString elementName))))

foreign import javascript safe "(($1, $2) => { return $1[\"getElementsByTagName\"]($2); })"
        js_getElementsByTagName :: Document -> JSString -> IO HTMLCollection
-- | <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 ((js_getElementsByTagName ((Types.toDocument self)) (toJSString qualifiedName)))

-- | <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 ((js_getElementsByTagName ((Types.toDocument self)) (toJSString qualifiedName))))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"getElementsByTagNameNS\"]($2, $3); })"
        js_getElementsByTagNameNS :: Document -> (Nullable JSString) -> JSString -> IO HTMLCollection
-- | <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 ((js_getElementsByTagNameNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString localName)))

-- | <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 ((js_getElementsByTagNameNS ((Types.toDocument self)) (toMaybeJSString namespace) (toJSString localName))))

foreign import javascript safe "(($1) => { return $1[\"getSelection\"](); })"
        js_getSelection :: Document -> IO JSVal
-- | <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 (((js_getSelection ((Types.toDocument self))) >>= 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 ((js_getSelection ((Types.toDocument self)))))

-- | <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 ((((js_getSelection ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getSelection ((Types.toDocument self)))))

foreign import javascript safe "(($1) => { return $1[\"hasFocus\"](); })"
        js_hasFocus :: Document -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/Document/hasFocus MDN Document.hasFocus documentation>
hasFocus :: (MonadDOM m, IsDocument self) => self -> m Bool
hasFocus self = liftDOM ((js_hasFocus ((Types.toDocument self))))

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

foreign import javascript interruptible "(($1, $c) => { return $1[\"hasStorageAccess\"]().then(function(s) { $c(null, s);}, function(e) { $c(e, null);}); })"
        js_hasStorageAccess :: Document -> IO (JSVal, Bool)
-- | <https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess MDN Document.hasStorageAccess documentation>
hasStorageAccess :: (MonadDOM m, IsDocument self) => self -> m Bool
hasStorageAccess self = liftDOM (((js_hasStorageAccess ((Types.toDocument self))) >>= checkPromiseResult))

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

foreign import javascript safe "(($1, $2, $3) => { return $1[\"importNode\"]($2, $3); })"
        js_importNode :: Document -> Node -> JSVal -> IO Node
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a3' -> js_importNode ((Types.toDocument self)) (Types.toNode node) a3'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a3' -> js_importNode ((Types.toDocument self)) (Types.toNode node) a3')))

foreign import javascript safe "(($1, $2, $3) => { return $1[\"open\"]($2, $3); })"
        js_open :: Document -> (Optional JSString) -> (Optional JSString) -> IO Document
-- | <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 ((js_open ((Types.toDocument self)) (toOptionalJSString unused1) (toOptionalJSString unused2)))

-- | <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 ((js_open ((Types.toDocument self)) (toOptionalJSString unused1) (toOptionalJSString unused2))))

foreign import javascript safe "(($1, $2, $3, $4) => { return $1[\"open\"]($2, $3, $4); })"
        js_openUrlNameFeatures :: Document -> JSString -> JSString -> JSString -> IO JSVal
-- | <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 (((js_openUrlNameFeatures ((Types.toDocument self)) (toJSString url) (toJSString name) (toJSString 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 ((js_openUrlNameFeatures ((Types.toDocument self)) (toJSString url) (toJSString name) (toJSString 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 ((((js_openUrlNameFeatures ((Types.toDocument self)) (toJSString url) (toJSString name) (toJSString 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 ((pFromJSVal <$> (js_openUrlNameFeatures ((Types.toDocument self)) (toJSString url) (toJSString name) (toJSString features))))

foreign import javascript safe "(($1, $2) => { return $1[\"queryCommandEnabled\"]($2); })"
        js_queryCommandEnabled :: Document -> JSString -> IO Bool
-- | <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 ((js_queryCommandEnabled ((Types.toDocument self)) (toJSString commandId)))

-- | <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 ((js_queryCommandEnabled ((Types.toDocument self)) (toJSString commandId))))

foreign import javascript safe "(($1, $2) => { return $1[\"queryCommandIndeterm\"]($2); })"
        js_queryCommandIndeterm :: Document -> JSString -> IO Bool
queryCommandIndeterm :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m Bool
queryCommandIndeterm self commandId = liftDOM ((js_queryCommandIndeterm ((Types.toDocument self)) (toJSString commandId)))

queryCommandIndeterm_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandIndeterm_ self commandId = liftDOM (void ((js_queryCommandIndeterm ((Types.toDocument self)) (toJSString commandId))))

foreign import javascript safe "(($1, $2) => { return $1[\"queryCommandState\"]($2); })"
        js_queryCommandState :: Document -> JSString -> IO Bool
-- | <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 ((js_queryCommandState ((Types.toDocument self)) (toJSString commandId)))

-- | <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 ((js_queryCommandState ((Types.toDocument self)) (toJSString commandId))))

foreign import javascript safe "(($1, $2) => { return $1[\"queryCommandSupported\"]($2); })"
        js_queryCommandSupported :: Document -> JSString -> IO Bool
-- | <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 ((js_queryCommandSupported ((Types.toDocument self)) (toJSString commandId)))

-- | <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 ((js_queryCommandSupported ((Types.toDocument self)) (toJSString commandId))))

foreign import javascript safe "(($1, $2) => { return $1[\"queryCommandValue\"]($2); })"
        js_queryCommandValue :: Document -> JSString -> IO JSString
queryCommandValue :: (MonadDOM m, IsDocument self, ToJSString commandId, FromJSString result) => self -> commandId -> m result
queryCommandValue self commandId = liftDOM ((fromJSString <$> (js_queryCommandValue ((Types.toDocument self)) (toJSString commandId))))

queryCommandValue_ :: (MonadDOM m, IsDocument self, ToJSString commandId) => self -> commandId -> m ()
queryCommandValue_ self commandId = liftDOM (void ((js_queryCommandValue ((Types.toDocument self)) (toJSString commandId))))

foreign import javascript safe "(($1) => { return $1[\"releaseEvents\"](); })"
        js_releaseEvents :: Document -> IO ()
-- | <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 ((js_releaseEvents ((Types.toDocument self)))))

foreign import javascript interruptible "(($1, $c) => { return $1[\"requestStorageAccess\"]().then(function(s) { $c(null, s);}, function(e) { $c(e, null);}); })"
        js_requestStorageAccess :: Document -> IO (JSVal, ())
-- | <https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess MDN Document.requestStorageAccess documentation>
requestStorageAccess :: (MonadDOM m, IsDocument self) => self -> m ()
requestStorageAccess self = liftDOM (void (((js_requestStorageAccess ((Types.toDocument self))) >>= checkPromiseResult)))

foreign import javascript safe "(($1, $2) => { return $1[\"startViewTransition\"]($2); })"
        js_startViewTransition :: Document -> JSVal -> IO ViewTransition
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal callbackOptions) >>= \a2' -> js_startViewTransition ((Types.toDocument self)) a2'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal callbackOptions) >>= \a2' -> js_startViewTransition ((Types.toDocument self)) a2')))

foreign import javascript safe "(($1, $2) => { return $1[\"write\"](...$2); })"
        js_write :: Document -> JSVal -> IO ()
-- | <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 (((toJSVal text) >>= \a2' -> js_write ((Types.toDocument self)) a2')))

foreign import javascript safe "(($1, $2) => { return $1[\"writeln\"](...$2); })"
        js_writeln :: Document -> JSVal -> IO ()
-- | <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 (((toJSVal text) >>= \a2' -> js_writeln ((Types.toDocument self)) a2')))

foreign import javascript safe "(($1, $2) => { return globalThis[\"Document\"][\"parseHTML\"]($1, $2); })"
        js_parseHTML :: JSString -> JSVal -> IO Document
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_parseHTML (toJSString html) a2'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_parseHTML (toJSString html) a2')))

foreign import javascript safe "(($1, $2) => { return globalThis[\"Document\"][\"parseHTMLUnsafe\"]($1, $2); })"
        js_parseHTMLUnsafe :: TrustedHTMLOrString -> JSVal -> IO Document
-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_parseHTMLUnsafe (Types.toTrustedHTMLOrString html) a2'))

-- | <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 (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_parseHTMLUnsafe (Types.toTrustedHTMLOrString html) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"implementation\"]; })"
        js_getImplementation :: Document -> IO DOMImplementation
-- | <https://developer.mozilla.org/docs/Web/API/Document/implementation MDN Document.implementation documentation>
getImplementation :: (MonadDOM m, IsDocument self) => self -> m DOMImplementation
getImplementation self = liftDOM ((js_getImplementation ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"URL\"]; })"
        js_getURL :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getURL ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"documentURI\"]; })"
        js_getDocumentURI :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getDocumentURI ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"compatMode\"]; })"
        js_getCompatMode :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getCompatMode ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"characterSet\"]; })"
        js_getCharacterSet :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getCharacterSet ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"charset\"]; })"
        js_getCharset :: Document -> IO JSString
-- | <https://dom.spec.whatwg.org/#dom-document-charset Document.charset specification>
getCharset :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getCharset self = liftDOM ((fromJSString <$> (js_getCharset ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"inputEncoding\"]; })"
        js_getInputEncoding :: Document -> IO JSString
-- | <https://dom.spec.whatwg.org/#dom-document-inputencoding Document.inputEncoding specification>
getInputEncoding :: (MonadDOM m, IsDocument self, FromJSString result) => self -> m result
getInputEncoding self = liftDOM ((fromJSString <$> (js_getInputEncoding ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"contentType\"]; })"
        js_getContentType :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getContentType ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"doctype\"]; })"
        js_getDoctype :: Document -> IO JSVal
-- | <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 (((js_getDoctype ((Types.toDocument self))) >>= 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 ((((js_getDoctype ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getDoctype ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"documentElement\"]; })"
        js_getDocumentElement :: Document -> IO JSVal
-- | <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 (((js_getDocumentElement ((Types.toDocument self))) >>= 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 ((((js_getDocumentElement ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getDocumentElement ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"rootElement\"]; })"
        js_getRootElement :: Document -> IO JSVal
-- | <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 (((js_getRootElement ((Types.toDocument self))) >>= 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 ((((js_getRootElement ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getRootElement ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"activeViewTransition\"]; })"
        js_getActiveViewTransition :: Document -> IO JSVal
-- | <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 (((js_getActiveViewTransition ((Types.toDocument self))) >>= 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 ((((js_getActiveViewTransition ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getActiveViewTransition ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"scrollingElement\"]; })"
        js_getScrollingElement :: Document -> IO JSVal
-- | <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 (((js_getScrollingElement ((Types.toDocument self))) >>= 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 ((((js_getScrollingElement ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getScrollingElement ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"fullscreenEnabled\"]; })"
        js_getFullscreenEnabled :: Document -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/Document/fullscreenEnabled MDN Document.fullscreenEnabled documentation>
getFullscreenEnabled :: (MonadDOM m, IsDocument self) => self -> m Bool
getFullscreenEnabled self = liftDOM ((js_getFullscreenEnabled ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"fullscreen\"]; })"
        js_getFullscreen :: Document -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/Document/fullscreen MDN Document.fullscreen documentation>
getFullscreen :: (MonadDOM m, IsDocument self) => self -> m Bool
getFullscreen self = liftDOM ((js_getFullscreen ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"location\"]; })"
        js_getLocation :: Document -> IO JSVal
-- | <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 (((js_getLocation ((Types.toDocument self))) >>= 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 ((((js_getLocation ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getLocation ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"domain\"] = $2; })"
        js_setDomain :: Document -> JSString -> IO ()
-- | <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 ((js_setDomain ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"domain\"]; })"
        js_getDomain :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getDomain ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"referrer\"]; })"
        js_getReferrer :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getReferrer ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"cookie\"] = $2; })"
        js_setCookie :: Document -> JSString -> IO ()
-- | <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 ((js_setCookie ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"cookie\"]; })"
        js_getCookie :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getCookie ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"lastModified\"]; })"
        js_getLastModified :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getLastModified ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"readyState\"]; })"
        js_getReadyState :: Document -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/Document/readyState MDN Document.readyState documentation>
getReadyState :: (MonadDOM m, IsDocument self) => self -> m DocumentReadyState
getReadyState self = liftDOM (((js_getReadyState ((Types.toDocument self))) >>= fromJSValUnchecked))

foreign import javascript safe "(($1, $2) => { $1[\"title\"] = $2; })"
        js_setTitle :: Document -> JSString -> IO ()
-- | <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 ((js_setTitle ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"title\"]; })"
        js_getTitle :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getTitle ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"dir\"] = $2; })"
        js_setDir :: Document -> JSString -> IO ()
-- | <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 ((js_setDir ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"dir\"]; })"
        js_getDir :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getDir ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"body\"] = $2; })"
        js_setBody :: Document -> JSVal -> IO ()
-- | <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 (((toJSVal val) >>= \a2' -> js_setBody ((Types.toDocument self)) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"body\"]; })"
        js_getBody :: Document -> IO JSVal
-- | <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 (((js_getBody ((Types.toDocument self))) >>= 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 ((((js_getBody ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getBody ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"head\"]; })"
        js_getHead :: Document -> IO JSVal
-- | <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 (((js_getHead ((Types.toDocument self))) >>= 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 ((((js_getHead ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getHead ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"images\"]; })"
        js_getImages :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/images MDN Document.images documentation>
getImages :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getImages self = liftDOM ((js_getImages ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"embeds\"]; })"
        js_getEmbeds :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/embeds MDN Document.embeds documentation>
getEmbeds :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getEmbeds self = liftDOM ((js_getEmbeds ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"plugins\"]; })"
        js_getPlugins :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/plugins MDN Document.plugins documentation>
getPlugins :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getPlugins self = liftDOM ((js_getPlugins ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"links\"]; })"
        js_getLinks :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/links MDN Document.links documentation>
getLinks :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getLinks self = liftDOM ((js_getLinks ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"forms\"]; })"
        js_getForms :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/forms MDN Document.forms documentation>
getForms :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getForms self = liftDOM ((js_getForms ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"scripts\"]; })"
        js_getScripts :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/scripts MDN Document.scripts documentation>
getScripts :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getScripts self = liftDOM ((js_getScripts ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"currentScript\"]; })"
        js_getCurrentScript :: Document -> IO JSVal
-- | <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 (((js_getCurrentScript ((Types.toDocument self))) >>= 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 ((((js_getCurrentScript ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getCurrentScript ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"defaultView\"]; })"
        js_getDefaultView :: Document -> IO JSVal
-- | <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 (((js_getDefaultView ((Types.toDocument self))) >>= 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 ((((js_getDefaultView ((Types.toDocument self))) >>= 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 ((pFromJSVal <$> (js_getDefaultView ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"designMode\"] = $2; })"
        js_setDesignMode :: Document -> JSString -> IO ()
-- | <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 ((js_setDesignMode ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"designMode\"]; })"
        js_getDesignMode :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getDesignMode ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"hidden\"]; })"
        js_getHidden :: Document -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/Document/hidden MDN Document.hidden documentation>
getHidden :: (MonadDOM m, IsDocument self) => self -> m Bool
getHidden self = liftDOM ((js_getHidden ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"visibilityState\"]; })"
        js_getVisibilityState :: Document -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/Document/visibilityState MDN Document.visibilityState documentation>
getVisibilityState :: (MonadDOM m, IsDocument self) => self -> m DocumentVisibilityState
getVisibilityState self = liftDOM (((js_getVisibilityState ((Types.toDocument self))) >>= fromJSValUnchecked))

foreign import javascript safe "(($1, $2) => { $1[\"fgColor\"] = $2; })"
        js_setFgColor :: Document -> JSString -> IO ()
-- | <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 ((js_setFgColor ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"fgColor\"]; })"
        js_getFgColor :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getFgColor ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"linkColor\"] = $2; })"
        js_setLinkColor :: Document -> JSString -> IO ()
-- | <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 ((js_setLinkColor ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"linkColor\"]; })"
        js_getLinkColor :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getLinkColor ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"vlinkColor\"] = $2; })"
        js_setVlinkColor :: Document -> JSString -> IO ()
-- | <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 ((js_setVlinkColor ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"vlinkColor\"]; })"
        js_getVlinkColor :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getVlinkColor ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"alinkColor\"] = $2; })"
        js_setAlinkColor :: Document -> JSString -> IO ()
-- | <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 ((js_setAlinkColor ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"alinkColor\"]; })"
        js_getAlinkColor :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getAlinkColor ((Types.toDocument self)))))

foreign import javascript safe "(($1, $2) => { $1[\"bgColor\"] = $2; })"
        js_setBgColor :: Document -> JSString -> IO ()
-- | <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 ((js_setBgColor ((Types.toDocument self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"bgColor\"]; })"
        js_getBgColor :: Document -> IO JSString
-- | <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 ((fromJSString <$> (js_getBgColor ((Types.toDocument self)))))

foreign import javascript unsafe "(($1) => { return $1[\"anchors\"]; })"
        js_getAnchors :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/anchors MDN Document.anchors documentation>
getAnchors :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getAnchors self = liftDOM ((js_getAnchors ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"applets\"]; })"
        js_getApplets :: Document -> IO HTMLCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/applets MDN Document.applets documentation>
getApplets :: (MonadDOM m, IsDocument self) => self -> m HTMLCollection
getApplets self = liftDOM ((js_getApplets ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"all\"]; })"
        js_getAll :: Document -> IO HTMLAllCollection
-- | <https://developer.mozilla.org/docs/Web/API/Document/all MDN Document.all documentation>
getAll :: (MonadDOM m, IsDocument self) => self -> m HTMLAllCollection
getAll self = liftDOM ((js_getAll ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"pictureInPictureEnabled\"]; })"
        js_getPictureInPictureEnabled :: Document -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/Document/pictureInPictureEnabled MDN Document.pictureInPictureEnabled documentation>
getPictureInPictureEnabled :: (MonadDOM m, IsDocument self) => self -> m Bool
getPictureInPictureEnabled self = liftDOM ((js_getPictureInPictureEnabled ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"fragmentDirective\"]; })"
        js_getFragmentDirective :: Document -> IO FragmentDirective
-- | <https://developer.mozilla.org/docs/Web/API/Document/fragmentDirective MDN Document.fragmentDirective documentation>
getFragmentDirective :: (MonadDOM m, IsDocument self) => self -> m FragmentDirective
getFragmentDirective self = liftDOM ((js_getFragmentDirective ((Types.toDocument self))))

foreign import javascript unsafe "(($1) => { return $1[\"timeline\"]; })"
        js_getTimeline :: Document -> IO DocumentTimeline
-- | <https://developer.mozilla.org/docs/Web/API/Document/timeline MDN Document.timeline documentation>
getTimeline :: (MonadDOM m, IsDocument self) => self -> m DocumentTimeline
getTimeline self = liftDOM ((js_getTimeline ((Types.toDocument self))))

-- | <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")