open
Description
The open of Document for JS causes the Document to be replaced in-place, as if it was a new Document object, but reusing the previous object, which is then returned.
The resulting Document has an HTML parser associated with it, which can be given data to parse using document.write().
The method has no effect if the Document is still being parsed.
Throws an "InvalidStateError" DOMException if the Document is an XML document.
Throws an "InvalidStateError" DOMException if the parser is currently executing a custom element constructor.
Syntax
document = document.open()
Examples
1 · void
Links
Related
Document
- adoptNode
- body
- characterSet
- close
- compatMode
- contentType
- cookie
- createCDATASection
- createComment
- createDocumentFragment
- createElement
- createElementNS
- createProcessingInstruction
- createTextNode
- currentScript
- defaultView
- designMode
- dir
- doctype
- Document
- documentElement
- documentURI
- domain
- embeds
- exitPictureInPicture
- forms
- getElementsByClassName
- getElementsByName
- getElementsByTagName
- getElementsByTagNameNS
- hasFocus
- head
- hidden
- images
- implementation
- importNode
- lastModified
- links
- location
- onreadystatechange
- onvisibilitychange
- parseHTMLUnsafe
- pictureInPictureEnabled
- plugins
- readyState
- referrer
- scripts
- title
- URL
- visibilityState
- write
- writeln