XMLDocument extension type

The XMLDocument interface represents an XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Properties

activeElement Element?
The activeElement read-only property of the Document interface returns the Element within the DOM that currently has focus.
no setterinherited
adoptedStyleSheets JSArray<CSSStyleSheet>
The adoptedStyleSheets property of the Document interface is used for setting an array of constructed stylesheets to be used by the document.
getter/setter pairinherited
alinkColor String
Returns or sets the color of an active link in the document body. A link is active during the time between mousedown and mouseup events.
getter/setter pairinherited
all HTMLAllCollection
The Document interface's read-only all property returns an HTMLAllCollection rooted at the document node.
no setterinherited
anchors HTMLCollection
The anchors read-only property of the Document interface returns a list of all of the anchors in the document.
no setterinherited
applets HTMLCollection
The applets property of the Document returns an empty HTMLCollection. This property is kept only for compatibility reasons; in older versions of browsers, it returned a list of the applets within a document.
no setterinherited
baseURI String
The read-only baseURI property of the Node interface returns the absolute base URL of the document containing the node.
no setterinherited
bgColor String
The deprecated bgColor property gets or sets the background color of the current document.
getter/setter pairinherited
body HTMLElement?
The Document.body property represents the body or frameset node of the current document, or null if no such element exists.
getter/setter pairinherited
characterSet String
The Document.characterSet read-only property returns the character encoding of the document that it's currently rendered with.
no setterinherited
childElementCount int
The Document.childElementCount read-only property returns the number of child elements of the document.
no setterinherited
childNodes NodeList
The read-only childNodes property of the Node interface returns a live NodeList of child Node of the given element where the first child node is assigned index 0. Child nodes include elements, text and comments.
no setterinherited
children HTMLCollection
The read-only children property returns a live HTMLCollection which contains all of the child Element of the document upon which it was called.
no setterinherited
compatMode String
The Document.compatMode read-only property indicates whether the document is rendered in Quirks mode or Standards mode.
no setterinherited
contentType String
The Document.contentType read-only property returns the MIME type that the document is being rendered as. This may come from HTTP headers or other sources of MIME information, and might be affected by automatic type conversions performed by either the browser or extensions.
no setterinherited
The Document property cookie lets you read and write cookies associated with the document. It serves as a getter and setter for the actual values of the cookies.
getter/setter pairinherited
currentScript HTMLOrSVGScriptElement?
The Document.currentScript property returns the script element whose script is currently being processed and isn't a JavaScript module. (For modules use import.meta instead.)
no setterinherited
defaultView Window?
In browsers, document.defaultView returns the Window object associated with , or null if none is available.
no setterinherited
designMode String
document.designMode controls whether the entire document is editable. Valid values are "on" and "off". According to the specification, this property is meant to default to "off". Firefox follows this standard. The earlier versions of Chrome and IE default to "inherit". Starting in Chrome 43, the default is "off" and "inherit" is no longer supported. In IE6-10, the value is capitalized.
getter/setter pairinherited
dir String
The Document.dir property is a string representing the directionality of the text of the document, whether left to right (default) or right to left. Possible values are 'rtl', right to left, and 'ltr', left to right.
getter/setter pairinherited
doctype DocumentType?
The doctype read-only property of the Document interface is a DocumentType object representing the the associated with the current document.
no setterinherited
documentElement Element?
The documentElement read-only property of the Document interface returns the Element that is the root element of the document (for example, the html element for HTML documents).
no setterinherited
documentURI String
The documentURI read-only property of the Document interface returns the document location as a string.
no setterinherited
domain String
The domain property of the Document interface gets/sets the domain portion of the of the current document, as used by the same-origin policy.
getter/setter pairinherited
embeds HTMLCollection
The embeds read-only property of the Document interface returns a list of the embedded embed elements within the current document.
no setterinherited
fgColor String
fgColor gets/sets the foreground color, or text color, of the current document.
getter/setter pairinherited
firstChild Node?
The read-only firstChild property of the Node interface returns the node's first child in the tree, or null if the node has no children.
no setterinherited
firstElementChild Element?
The Document.firstElementChild read-only property returns the document's first child Element, or null if there are no child elements.
no setterinherited
fonts FontFaceSet
The fonts property of the Document interface returns the FontFaceSet interface of the document.
no setterinherited
forms HTMLCollection
The forms read-only property of the Document interface returns an HTMLCollection listing all the form elements contained in the document.
no setterinherited
fullscreen bool
The obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.
no setterinherited
fullscreenElement Element?
The Document.fullscreenElement read-only property returns the Element that is currently being presented in fullscreen mode in this document, or null if fullscreen mode is not currently in use.
no setterinherited
fullscreenEnabled bool
The read-only fullscreenEnabled property on the Document interface indicates whether or not fullscreen mode is available.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
The head read-only property of the Document interface returns the head element of the current document.
no setterinherited
hidden bool
The Document.hidden read-only property returns a Boolean value indicating if the page is considered hidden or not.
no setterinherited
images HTMLCollection
The images read-only property of the Document interface returns a collection of the images in the current HTML document.
no setterinherited
implementation DOMImplementation
The Document.implementation property returns a DOMImplementation object associated with the current document.
no setterinherited
isConnected bool
The read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.
no setterinherited
isDefinedAndNotNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
isNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript null.
no setter
isTruthy JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !!this in JavaScript.
no setter
isUndefined bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript undefined.
no setter
isUndefinedOrNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
lastChild Node?
The read-only lastChild property of the Node interface returns the last child of the node, or null if there are no child nodes.
no setterinherited
lastElementChild Element?
The Document.lastElementChild read-only property returns the document's last child Element, or null if there are no child elements.
no setterinherited
lastModified String
The lastModified property of the Document interface returns a string containing the date and local time on which the current document was last modified.
no setterinherited
linkColor String
The Document.linkColor property gets/sets the color of links within the document.
getter/setter pairinherited
The links read-only property of the Document interface returns a collection of all area elements and a elements in a document with a value for the href attribute.
no setterinherited
location Location?
The Document.location read-only property returns a Location object, which contains information about the URL of the document and provides methods for changing that URL and loading another URL.
no setterinherited
nextSibling Node?
The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null if the specified node is the last child in the parent element.
no setterinherited
nodeName String
The read-only nodeName property of Node returns the name of the current node as a string.
no setterinherited
nodeType int
The read-only nodeType property of a Node interface is an integer that identifies what the node is. It distinguishes different kind of nodes from each other, such as Element, Text and Comment.
no setterinherited
nodeValue String?
The nodeValue property of the Node interface returns or sets the value of the current node.
getter/setter pairinherited
not JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
onabort EventHandler?
getter/setter pairinherited
onanimationcancel EventHandler?
getter/setter pairinherited
onanimationend EventHandler?
getter/setter pairinherited
onanimationiteration EventHandler?
getter/setter pairinherited
onanimationstart EventHandler?
getter/setter pairinherited
onauxclick EventHandler?
getter/setter pairinherited
onbeforeinput EventHandler?
getter/setter pairinherited
onbeforetoggle EventHandler?
getter/setter pairinherited
onblur EventHandler?
getter/setter pairinherited
oncancel EventHandler?
getter/setter pairinherited
oncanplay EventHandler?
getter/setter pairinherited
oncanplaythrough EventHandler?
getter/setter pairinherited
onchange EventHandler?
getter/setter pairinherited
onclick EventHandler?
getter/setter pairinherited
onclose EventHandler?
getter/setter pairinherited
oncontextlost EventHandler?
getter/setter pairinherited
oncontextmenu EventHandler?
getter/setter pairinherited
oncontextrestored EventHandler?
getter/setter pairinherited
oncopy EventHandler?
getter/setter pairinherited
oncuechange EventHandler?
getter/setter pairinherited
oncut EventHandler?
getter/setter pairinherited
ondblclick EventHandler?
getter/setter pairinherited
ondrag EventHandler?
getter/setter pairinherited
ondragend EventHandler?
getter/setter pairinherited
ondragenter EventHandler?
getter/setter pairinherited
ondragleave EventHandler?
getter/setter pairinherited
ondragover EventHandler?
getter/setter pairinherited
ondragstart EventHandler?
getter/setter pairinherited
ondrop EventHandler?
getter/setter pairinherited
ondurationchange EventHandler?
getter/setter pairinherited
onemptied EventHandler?
getter/setter pairinherited
onended EventHandler?
getter/setter pairinherited
onerror OnErrorEventHandler?
getter/setter pairinherited
onfocus EventHandler?
getter/setter pairinherited
onformdata EventHandler?
getter/setter pairinherited
onfullscreenchange EventHandler?
getter/setter pairinherited
onfullscreenerror EventHandler?
getter/setter pairinherited
ongotpointercapture EventHandler?
getter/setter pairinherited
oninput EventHandler?
getter/setter pairinherited
oninvalid EventHandler?
getter/setter pairinherited
onkeydown EventHandler?
getter/setter pairinherited
onkeypress EventHandler?
getter/setter pairinherited
onkeyup EventHandler?
getter/setter pairinherited
onLoad Stream<Event>

Available on Document, provided by the DocumentCustomEvents extension

no setter
onload EventHandler?
getter/setter pairinherited
onloadeddata EventHandler?
getter/setter pairinherited
onloadedmetadata EventHandler?
getter/setter pairinherited
onloadstart EventHandler?
getter/setter pairinherited
onlostpointercapture EventHandler?
getter/setter pairinherited
onmousedown EventHandler?
getter/setter pairinherited
onmouseenter EventHandler?
getter/setter pairinherited
onmouseleave EventHandler?
getter/setter pairinherited
onmousemove EventHandler?
getter/setter pairinherited
onmouseout EventHandler?
getter/setter pairinherited
onmouseover EventHandler?
getter/setter pairinherited
onmouseup EventHandler?
getter/setter pairinherited
onMouseWheel Stream<WheelEvent>

Available on Document, provided by the DocumentCustomEvents extension

no setter
onpaste EventHandler?
getter/setter pairinherited
onpause EventHandler?
getter/setter pairinherited
onplay EventHandler?
getter/setter pairinherited
onplaying EventHandler?
getter/setter pairinherited
onpointercancel EventHandler?
getter/setter pairinherited
onpointerdown EventHandler?
getter/setter pairinherited
onpointerenter EventHandler?
getter/setter pairinherited
onpointerleave EventHandler?
getter/setter pairinherited
onpointerlockchange EventHandler?
getter/setter pairinherited
onpointerlockerror EventHandler?
getter/setter pairinherited
onpointermove EventHandler?
getter/setter pairinherited
onpointerout EventHandler?
getter/setter pairinherited
onpointerover EventHandler?
getter/setter pairinherited
onpointerup EventHandler?
getter/setter pairinherited
onprogress EventHandler?
getter/setter pairinherited
onratechange EventHandler?
getter/setter pairinherited
onreadystatechange EventHandler?
getter/setter pairinherited
onreset EventHandler?
getter/setter pairinherited
onresize EventHandler?
getter/setter pairinherited
onscroll EventHandler?
getter/setter pairinherited
onscrollend EventHandler?
getter/setter pairinherited
onsecuritypolicyviolation EventHandler?
getter/setter pairinherited
onseeked EventHandler?
getter/setter pairinherited
onseeking EventHandler?
getter/setter pairinherited
onselect EventHandler?
getter/setter pairinherited
onselectionchange EventHandler?
getter/setter pairinherited
onselectstart EventHandler?
getter/setter pairinherited
onslotchange EventHandler?
getter/setter pairinherited
onstalled EventHandler?
getter/setter pairinherited
onsubmit EventHandler?
getter/setter pairinherited
onsuspend EventHandler?
getter/setter pairinherited
ontimeupdate EventHandler?
getter/setter pairinherited
ontoggle EventHandler?
getter/setter pairinherited
ontouchcancel EventHandler?
getter/setter pairinherited
ontouchend EventHandler?
getter/setter pairinherited
ontouchmove EventHandler?
getter/setter pairinherited
ontouchstart EventHandler?
getter/setter pairinherited
ontransitioncancel EventHandler?
getter/setter pairinherited
ontransitionend EventHandler?
getter/setter pairinherited
ontransitionrun EventHandler?
getter/setter pairinherited
ontransitionstart EventHandler?
getter/setter pairinherited
onVisibilityChange Stream<Event>

Available on Document, provided by the DocumentCustomEvents extension

no setter
onvisibilitychange EventHandler?
getter/setter pairinherited
onvolumechange EventHandler?
getter/setter pairinherited
onwaiting EventHandler?
getter/setter pairinherited
onwheel EventHandler?
getter/setter pairinherited
ownerDocument Document?
The read-only ownerDocument property of the Node interface returns the top-level document object of the node.
no setterinherited
parentElement Element?
The read-only parentElement property of Node interface returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element.
no setterinherited
parentNode Node?
The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.
no setterinherited
pictureInPictureElement Element?
The read-only pictureInPictureElement property of the Document interface returns the Element that is currently being presented in picture-in-picture mode in this document, or null if picture-in-picture mode is not currently in use.
no setterinherited
pictureInPictureEnabled bool
The read-only pictureInPictureEnabled property of the Document interface indicates whether or not picture-in-picture mode is available.
no setterinherited
plugins HTMLCollection
The plugins read-only property of the Document interface returns an HTMLCollection object containing one or more HTMLEmbedElements representing the embed elements in the current document.
no setterinherited
pointerLockElement Element?
The pointerLockElement read-only property of the Document interface provides the element set as the target for mouse events while the pointer is locked. It is null if lock is pending, pointer is unlocked, or the target is in another document.
no setterinherited
previousSibling Node?
The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's Node.childNodes list, or null if the specified node is the first in that list.
no setterinherited
readyState DocumentReadyState
The Document.readyState property describes the loading state of the document. When the value of this property changes, a Document.readystatechange_event event fires on the document object.
no setterinherited
referrer String
The Document.referrer property returns the URI of the page that linked to this page.
no setterinherited
rootElement SVGSVGElement?
Document.rootElement returns the Element that is the root element of the document if it is an element, otherwise null. It is deprecated in favor of Document.documentElement, which returns the root element for all documents.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scripts HTMLCollection
The scripts property of the Document interface returns a list of the script elements in the document. The returned object is an HTMLCollection.
no setterinherited
scrollingElement Element?
The scrollingElement read-only property of the Document interface returns a reference to the Element that scrolls the document. In standards mode, this is the root element of the document, document.documentElement.
no setterinherited
styleSheets StyleSheetList
The styleSheets read-only property of the Document interface returns a StyleSheetList of CSSStyleSheet objects, for stylesheets explicitly linked into or embedded in a document.
no setterinherited
text String

Available on Node, provided by the NodeGlue extension

no getter
textContent String?
The textContent property of the Node interface represents the text content of the node and its descendants.
getter/setter pairinherited
timeline DocumentTimeline
The timeline readonly property of the Document interface represents the default timeline of the current document. This timeline is a special instance of DocumentTimeline.
no setterinherited
title String
The document.title property gets or sets the current title of the document. When present, it defaults to the value of the <title>.
getter/setter pairinherited
URL String
The URL read-only property of the Document interface returns the document location as a string.
no setterinherited
visibilityState DocumentVisibilityState
The Document.visibilityState read-only property returns the visibility of the document. It can be used to check whether the document is in the background or in a minimized window, or is otherwise not visible to the user.
no setterinherited
vlinkColor String
The Document.vlinkColor property gets/sets the color of links that the user has visited in the document.
getter/setter pairinherited

Methods

add(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this + any in JavaScript.
addEventListener(String type, EventListener? callback, [JSAny options]) → void
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
inherited
adoptNode(Node node) Node
Document.adoptNode() transfers a from another Document into the method's document. The adopted node and its subtree are removed from their original document (if any), and their Node.ownerDocument is changed to the current document. The node can then be inserted into the current document.
inherited
and(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this && any in JavaScript.
append(Node other) Node

Available on Node, provided by the NodeGlue extension

append(JSAny nodes) → void
The Document.append() method inserts a set of Node objects or string objects after the last child of the document. String objects are inserted as equivalent Text nodes.
inherited
appendChild(Node node) Node
The appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node.
inherited
callMethod<R extends JSAny?>(JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with up to four arguments.
callMethodVarArgs<R extends JSAny?>(JSAny method, [List<JSAny?>? arguments]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with a variable number of arguments.
captureEvents() → void
inherited
caretPositionFromPoint(num x, num y, [CaretPositionFromPointOptions options]) JSObject?
The caretPositionFromPoint() method of the Document interface returns a CaretPosition object, containing the DOM node, along with the caret and caret's character offset within that node.
inherited
clear() → void
The Document.clear() method does nothing, but doesn't raise any error.
inherited
clone(bool? deep) Node

Available on Node, provided by the NodeGlue extension

cloneNode([bool deep]) Node
The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called. Its parameter controls if the subtree contained in a node is also cloned or not.
inherited
close() → void
The Document.close() method finishes writing to a document, opened with Document.open.
inherited
compareDocumentPosition(Node other) int
The compareDocumentPosition() method of the Node interface reports the position of its argument node relative to the node on which it is called.
inherited
contains(Node? other) bool
The contains() method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.
inherited
createAttribute(String localName) Attr
The Document.createAttribute() method creates a new attribute node, and returns it. The object created is a node implementing the Attr interface. The DOM does not enforce what sort of attributes can be added to a particular element in this manner.
inherited
createAttributeNS(String? namespace, String qualifiedName) Attr
The Document.createAttributeNS() method creates a new attribute node with the specified namespace URI and qualified name, and returns it. The object created is a node implementing the Attr interface. The DOM does not enforce what sort of attributes can be added to a particular element in this manner.
inherited
createCDATASection(String data) CDATASection
createCDATASection() creates a new CDATA section node, and returns it.
inherited
createComment(String data) Comment
createComment() creates a new comment node, and returns it.
inherited
createDocumentFragment() DocumentFragment
Creates a new empty DocumentFragment into which DOM nodes can be added to build an offscreen DOM tree.
inherited
createElement(String localName, [JSAny options]) Element
In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.
inherited
createElementNS(String? namespace, String qualifiedName, [JSAny options]) Element
Creates an element with the specified namespace URI and qualified name.
inherited
createEvent(String interface) Event

Warning: Many methods used with createEvent, such as initCustomEvent, are deprecated. Use event constructors instead.

inherited
createExpression(String expression, [XPathNSResolver? resolver]) XPathExpression
This method compiles an XPathExpression which can then be used for (repeated) evaluations.
inherited
createNodeIterator(Node root, [int whatToShow, NodeFilter? filter]) NodeIterator
The Document.createNodeIterator() method returns a new NodeIterator object.
inherited
createNSResolver(Node nodeResolver) Node
Creates an XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node.
inherited
createProcessingInstruction(String target, String data) ProcessingInstruction
createProcessingInstruction() generates a new processing instruction node and returns it.
inherited
createRange() Range
The Document.createRange() method returns a new Range object.
inherited
createTextNode(String data) Text
Creates a new Text node. This method can be used to escape HTML characters.
inherited
createTreeWalker(Node root, [int whatToShow, NodeFilter? filter]) TreeWalker
The Document.createTreeWalker() creator method returns a newly created TreeWalker object.
inherited
dartify() Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript value to the Dart equivalent if possible.
delete(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Deletes the property with key property from this JSObject.
dispatchEvent(Event event) bool
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
inherited
divide(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this / any in JavaScript.
elementFromPoint(num x, num y) Element?
The elementFromPoint() method, available on the Document object, returns the topmost Element at the specified coordinates (relative to the viewport).
inherited
elementsFromPoint(num x, num y) JSArray<Element>
The elementsFromPoint() method of the Document interface returns an array of all elements at the specified coordinates (relative to the viewport). The elements are ordered from the topmost to the bottommost box of the viewport.
inherited
equals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this == any in JavaScript.
evaluate(String expression, Node contextNode, [XPathNSResolver? resolver, int type, XPathResult? result]) XPathResult
The evaluate() method of the Document interface selects elements based on the XPath expression given in parameters.
inherited
execCommand(String commandId, [bool showUI, String value]) bool
The execCommand method implements multiple different commands. Some of them provide access to the clipboard, while others are for editing form inputs, contenteditable elements or entire documents (when switched to design mode).
inherited
exitFullscreen() JSPromise<JSAny?>
The Document method exitFullscreen() requests that the element on this document which is currently being presented in fullscreen mode be taken out of fullscreen mode, restoring the previous state of the screen. This usually reverses the effects of a previous call to Element.requestFullscreen.
inherited
exitPictureInPicture() JSPromise<JSAny?>
The exitPictureInPicture() method of the Document interface requests that a video contained in this document, which is currently floating, be taken out of picture-in-picture mode, restoring the previous state of the screen. This usually reverses the effects of a previous call to HTMLVideoElement.requestPictureInPicture.
inherited
exitPointerLock() → void
The exitPointerLock() method of the Document interface asynchronously releases a pointer lock previously requested through Element.requestPointerLock.
inherited
exponentiate(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this ** any in JavaScript.
getAnimations() JSArray<Animation>
The getAnimations() method of the Document interface returns an array of all Animation objects currently in effect whose target elements are descendants of the document. This array includes CSS Animations, CSS Transitions, and Web Animations.
inherited
getElementById(String elementId) Element?
The getElementById() method of the Document interface returns an Element object representing the element whose Element.id property matches the specified string. Since element IDs are required to be unique if specified, they're a useful way to get access to a specific element quickly.
inherited
getElementsByClassName(String classNames) HTMLCollection
The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class name(s).
inherited
getElementsByName(String elementName) NodeList
The getElementsByName() method of the Document object returns a NodeList Collection of elements with a given name attribute in the document.
inherited
getElementsByTagName(String qualifiedName) HTMLCollection
The getElementsByTagName method of Document interface returns an HTMLCollection of elements with the given tag name.
inherited
getElementsByTagNameNS(String? namespace, String localName) HTMLCollection
Returns a list of elements with the given tag name belonging to the given namespace. The complete document is searched, including the root node.
inherited
getProperty<R extends JSAny?>(JSAny property) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

The value of the property key property of this JSObject.
getRootNode([GetRootNodeOptions options]) Node
The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
inherited
getSelection() Selection?
The getSelection() method of the Document interface returns a Selection object representing the range of text selected by the user, or the current position of the caret.
inherited
greaterThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >= any in JavaScript.
has(String property) bool

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for hasProperty to check whether this JSObject contains the property key property, but takes and returns a Dart value.
hasChildNodes() bool
The hasChildNodes() method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.
inherited
hasFocus() bool
The hasFocus() method of the Document interface returns a boolean value indicating whether the document or any element inside the document has focus. This method can be used to determine whether the active element in a document has focus.
inherited
hasProperty(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Whether or not this JSObject contains the property key property.
hasStorageAccess() JSPromise<JSBoolean>
The hasStorageAccess() method of the Document interface returns a Promise that resolves with a boolean value indicating whether the document has access to third-party, unpartitioned cookies.
inherited
hasUnpartitionedCookieAccess() JSPromise<JSBoolean>
The hasUnpartitionedCookieAccess() method of the Document interface returns a Promise that resolves with a boolean value indicating whether the document has access to third-party, unpartitioned cookies.
inherited
importNode(Node node, [bool deep]) Node
The Document object's importNode() method creates a copy of a Node or DocumentFragment from another document, to be inserted into the current document later.
inherited
insertBefore(Node node, Node? child) Node
The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.
inherited
instanceof(JSFunction constructor) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof the constructor that is defined by constructorName, which is looked up in the globalContext.
isA<T extends JSAny?>() bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instance of the JavaScript type that is declared by T.
isDefaultNamespace(String? namespace) bool
The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument. It returns a boolean value that is true if the namespace is the default namespace on the given node and false if not.
inherited
isEqualNode(Node? otherNode) bool
The isEqualNode() method of the Node interface tests whether two nodes are equal. Two nodes are equal when they have the same type, defining characteristics (for elements, this would be their ID, number of children, and so forth), its attributes match, and so on. The specific set of data points that must match varies depending on the types of the nodes.
inherited
isSameNode(Node? otherNode) bool
The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator. That is, it tests whether two nodes are the same (in other words, whether they reference the same object).
inherited
lessThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this <= any in JavaScript.
lookupNamespaceURI(String? prefix) String?
The lookupNamespaceURI() method of the Node interface takes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and null if not).
inherited
lookupPrefix(String? namespace) String?
The lookupPrefix() method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the first prefix is returned.
inherited
modulo(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this % any in JavaScript.
multiply(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this * any in JavaScript.
normalize() → void
The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this != any in JavaScript.
open([String unused1OrUrl, String nameOrUnused2, String features]) JSObject?
The Document.open() method opens a document for Document.write.
inherited
or(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this || any in JavaScript.
prepend(JSAny nodes) → void
The Document.prepend() method inserts a set of Node objects or string objects before the first child of the document. String objects are inserted as equivalent Text nodes.
inherited
queryCommandIndeterm(String commandId) bool
inherited
queryCommandValue(String commandId) String
inherited
querySelector(String selectors) Element?
The Document method querySelector() returns the first Element within the document that matches the specified selector, or group of selectors. If no matches are found, null is returned.
inherited
querySelectorAll(String selectors) NodeList
The Document method querySelectorAll() returns a static (not live) NodeList representing a list of the document's elements that match the specified group of selectors.
inherited
releaseEvents() → void
inherited
removeChild(Node child) Node
The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.
inherited
removeEventListener(String type, EventListener? callback, [JSAny options]) → void
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
inherited
replaceChild(Node node, Node child) Node
The replaceChild() method of the Node interface replaces a child node within the given (parent) node.
inherited
replaceChildren(JSAny nodes) → void
The Document.replaceChildren() method replaces the existing children of a Document with a specified new set of children.
inherited
requestStorageAccess() JSPromise<JSAny?>
The requestStorageAccess() method of the Document interface allows content loaded in a third-party context (i.e., embedded in an iframe) to request access to third-party cookies and unpartitioned state. This is relevant to user agents that, by default, block access to third-party, unpartitioned cookies to improve privacy (e.g., to prevent tracking), and is part of the Storage Access API.
inherited
setProperty(JSAny property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Write the value of property key property of this JSObject.
startViewTransition([JSObject callbackOptions]) ViewTransition
The startViewTransition() method of the Document interface starts a new same-document (SPA) view transition and returns a ViewTransition object to represent it.
inherited
strictEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this === any in JavaScript.
strictNotEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this !== any in JavaScript.
subtract(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this - any in JavaScript.
toString() String
A string representation of this object.
inherited
typeofEquals(String typeString) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this JSAny? is typeString.
unsignedRightShift(JSAny? any) JSNumber

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >>> any in JavaScript.
write(JSAny text) → void

Warning: Use of the document.write() method is strongly discouraged.

As the HTML spec itself warns:

This method has very idiosyncratic behavior. In some cases, this method can affect the state of the

HTML parser while the parser is running, resulting in a DOM that does not correspond to the source of the document (e.g. if the string written is the string "<plaintext>" or "<!--"). In other cases, the call can clear the current page first, as if document.open() had been called. In yet more cases, the method is simply ignored, or throws an exception. Users agents are explicitly allowed to avoid executing script elements inserted via this method. And to make matters even worse, the exact behavior of this method can in some cases be dependent on network latency, which can lead to failures that are very hard to debug. For all these reasons, use of this method is strongly discouraged.

Therefore, avoid using document.write() — and if possible, update any existing code that is still using it.

inherited
writeln(JSAny text) → void

Warning: Use of the document.writeln() method is strongly discouraged.

As the HTML spec itself warns:

This method has very idiosyncratic behavior. In some cases, this method can affect the state of the

HTML parser while the parser is running, resulting in a DOM that does not correspond to the source of the document (e.g. if the string written is the string "<plaintext>" or "<!--"). In other cases, the call can clear the current page first, as if document.open() had been called. In yet more cases, the method is simply ignored, or throws an exception. Users agents are explicitly allowed to avoid executing script elements inserted via this method. And to make matters even worse, the exact behavior of this method can in some cases be dependent on network latency, which can lead to failures that are very hard to debug. For all these reasons, use of this method is strongly discouraged.

Therefore, avoid using document.writeln() — and if possible, update any existing code that is still using it.

inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) JSObject
inherited
operator [](String property) JSAny?

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for getProperty to get the value of the property key property of this JSObject, but takes and returns a Dart value.
operator []=(String property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for setProperty to write the value of the property key property of this JSObject, but takes a Dart value.