The base class for all documents.

Each web page loaded in the browser has its own Document object, which is typically an HtmlDocument.

If you aren't comfortable with DOM concepts, see the Dart tutorial Target 2: Connect Dart & HTML.

Annotations
  • DocsEditable()
  • DomName('Document')
Extends

Constants

EventStreamProvider<Event> pointerLockChangeEvent = const EventStreamProvider<Event>('pointerlockchange')
const
EventStreamProvider<Event> pointerLockErrorEvent = const EventStreamProvider<Event>('pointerlockerror')
const
EventStreamProvider<Event> readyStateChangeEvent = const EventStreamProvider<Event>('readystatechange')
const
Static factory designed to expose readystatechange events to event handlers that are not necessarily instances of Document.
EventStreamProvider<SecurityPolicyViolationEvent> securityPolicyViolationEvent = const EventStreamProvider<SecurityPolicyViolationEvent>('securitypolicyviolation')
const
Static factory designed to expose securitypolicyviolation events to event handlers that are not necessarily instances of Document.
EventStreamProvider<Event> selectionChangeEvent = const EventStreamProvider<Event>('selectionchange')
const
Static factory designed to expose selectionchange events to event handlers that are not necessarily instances of Document.

Properties

Element activeElement
read-only
String baseUri
read-only, inherited
List<Node> childNodes
read-only, inherited
A list of this node's children.
String contentType
read-only
read / write
ScriptElement currentScript
read-only
Element documentElement
read-only
String domain
read-only
Node firstChild
read-only, inherited
The first child of this node.
FontFaceSet fonts
read-only
Element fullscreenElement
read-only
bool fullscreenEnabled
read-only
bool hidden
read-only
DomImplementation implementation
read-only
Node lastChild
read-only, inherited
The last child of this node.
Node nextNode
read-only, inherited
The next sibling node.
String nodeName
read-only, inherited
The name of this node.
List<Node> nodes
read / write, inherited
A modifiable list of this node's children.
int nodeType
read-only, inherited
The type of node.
String nodeValue
read-only, inherited
The value of this node.
Events on
read-only, inherited
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
Stream<Event> onAbort
read-only
Stream of abort events handled by this Document.
Stream<Event> onBeforeCopy
read-only
Stream of beforecopy events handled by this Document.
Stream<Event> onBeforeCut
read-only
Stream of beforecut events handled by this Document.
Stream<Event> onBeforePaste
read-only
Stream of beforepaste events handled by this Document.
Stream<Event> onBlur
read-only
Stream of blur events handled by this Document.
Stream<Event> onCanPlay
read-only
Stream<Event> onCanPlayThrough
read-only
Stream<Event> onChange
read-only
Stream of change events handled by this Document.
Stream<MouseEvent> onClick
read-only
Stream of click events handled by this Document.
Stream<MouseEvent> onContextMenu
read-only
Stream of contextmenu events handled by this Document.
Stream<Event> onCopy
read-only
Stream of copy events handled by this Document.
Stream<Event> onCut
read-only
Stream of cut events handled by this Document.
Stream<Event> onDoubleClick
read-only
Stream of doubleclick events handled by this Document.
Stream<MouseEvent> onDrag
read-only
Stream of drag events handled by this Document.
Stream<MouseEvent> onDragEnd
read-only
Stream of dragend events handled by this Document.
Stream<MouseEvent> onDragEnter
read-only
Stream of dragenter events handled by this Document.
Stream<MouseEvent> onDragLeave
read-only
Stream of dragleave events handled by this Document.
Stream<MouseEvent> onDragOver
read-only
Stream of dragover events handled by this Document.
Stream<MouseEvent> onDragStart
read-only
Stream of dragstart events handled by this Document.
Stream<MouseEvent> onDrop
read-only
Stream of drop events handled by this Document.
Stream<Event> onDurationChange
read-only
Stream<Event> onEmptied
read-only
Stream<Event> onEnded
read-only
Stream<Event> onError
read-only
Stream of error events handled by this Document.
Stream<Event> onFocus
read-only
Stream of focus events handled by this Document.
Stream<Event> onFullscreenChange
read-only
Stream of fullscreenchange events handled by this Document.
Stream<Event> onFullscreenError
read-only
Stream of fullscreenerror events handled by this Document.
Stream<Event> onInput
read-only
Stream of input events handled by this Document.
Stream<Event> onInvalid
read-only
Stream of invalid events handled by this Document.
Stream<KeyboardEvent> onKeyDown
read-only
Stream of keydown events handled by this Document.
Stream<KeyboardEvent> onKeyPress
read-only
Stream of keypress events handled by this Document.
Stream<KeyboardEvent> onKeyUp
read-only
Stream of keyup events handled by this Document.
Stream<Event> onLoad
read-only
Stream of load events handled by this Document.
Stream<Event> onLoadedData
read-only
Stream<Event> onLoadedMetadata
read-only
Stream<MouseEvent> onMouseDown
read-only
Stream of mousedown events handled by this Document.
Stream<MouseEvent> onMouseEnter
read-only
Stream of mouseenter events handled by this Document.
Stream<MouseEvent> onMouseLeave
read-only
Stream of mouseleave events handled by this Document.
Stream<MouseEvent> onMouseMove
read-only
Stream of mousemove events handled by this Document.
Stream<MouseEvent> onMouseOut
read-only
Stream of mouseout events handled by this Document.
Stream<MouseEvent> onMouseOver
read-only
Stream of mouseover events handled by this Document.
Stream<MouseEvent> onMouseUp
read-only
Stream of mouseup events handled by this Document.
Stream<WheelEvent> onMouseWheel
read-only
Stream of mousewheel events handled by this Document.
Stream<Event> onPaste
read-only
Stream of paste events handled by this Document.
Stream<Event> onPause
read-only
Stream<Event> onPlay
read-only
Stream<Event> onPlaying
read-only
Stream<Event> onPointerLockChange
read-only
Stream<Event> onPointerLockError
read-only
Stream<Event> onRateChange
read-only
Stream<Event> onReadyStateChange
read-only
Stream of readystatechange events handled by this Document.
Stream<Event> onReset
read-only
Stream of reset events handled by this Document.
Stream<Event> onResize
read-only
Stream<Event> onScroll
read-only
Stream of scroll events handled by this Document.
Stream<Event> onSearch
read-only
Stream of search events handled by this Document.
Stream<SecurityPolicyViolationEvent> onSecurityPolicyViolation
read-only
Stream of securitypolicyviolation events handled by this Document.
Stream<Event> onSeeked
read-only
Stream<Event> onSeeking
read-only
Stream<Event> onSelect
read-only
Stream of select events handled by this Document.
Stream<Event> onSelectionChange
read-only
Stream of selectionchange events handled by this Document.
Stream<Event> onSelectStart
read-only
Stream of selectstart events handled by this Document.
Stream<Event> onStalled
read-only
Stream<Event> onSubmit
read-only
Stream of submit events handled by this Document.
Stream<Event> onSuspend
read-only
Stream<Event> onTimeUpdate
read-only
Stream<TouchEvent> onTouchCancel
read-only
Stream of touchcancel events handled by this Document.
Stream<TouchEvent> onTouchEnd
read-only
Stream of touchend events handled by this Document.
Stream<TouchEvent> onTouchMove
read-only
Stream of touchmove events handled by this Document.
Stream<TouchEvent> onTouchStart
read-only
Stream of touchstart events handled by this Document.
Stream<Event> onVolumeChange
read-only
Stream<Event> onWaiting
read-only
Document ownerDocument
read-only, inherited
The document this node belongs to.
Element parent
read-only, inherited
The parent element of this node.
Node parentNode
read-only, inherited
The parent node of this node.
Element pointerLockElement
read-only
Node previousNode
read-only, inherited
The previous sibling node.
String readyState
read-only
SvgSvgElement rootElement
read-only
bool supportsRegister
read-only
Deprecated: use supportsRegisterElement instead.
bool supportsRegisterElement
read-only
Checks if registerElement is supported on the current platform.
String text
read / write, inherited
All text within this node and its decendents.
AnimationTimeline timeline
read-only
String visibilityState
read-only
WindowBase window
read-only

Methods

addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void
inherited
adoptNode(Node node) → Node
append(Node newChild) → Node
inherited
Adds a node to the end of the child nodes list of this node.
clone(bool deep) → Node
inherited
Returns a copy of this node.
contains(Node other) → bool
inherited
Returns true if this node contains the specified node.
createDocumentFragment() → DocumentFragment
createElement(String tagName, [String typeExtension]) → Element
createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) → Element
createRange() → Range
dispatchEvent(Event event) → bool
inherited
execCommand(String command, bool userInterface, String value) → bool
exitFullscreen() → void
exitPointerLock() → void
getElementById(String elementId) → Element
getElementsByClassName(String classNames) → List<Node>
getElementsByName(String elementName) → List<Node>
getElementsByTagName(String localName) → List<Node>
hasChildNodes() → bool
inherited
Returns true if this node has any children.
importNode(Node node, [bool deep]) → Node
insertAllBefore(Iterable<Node> newNodes, Node refChild) → Node
inherited
Inserts all of the nodes into this node directly before refChild.
insertBefore(Node newChild, Node refChild) → Node
inherited
Inserts all of the nodes into this node directly before refChild.
query(String relativeSelectors) → Element
Alias for querySelector. Note this function is deprecated because its semantics will be changing in the future.
queryAll(String relativeSelectors) → ElementList<Element>
Alias for querySelectorAll. Note this function is deprecated because its semantics will be changing in the future.
queryCommandEnabled(String command) → bool
queryCommandIndeterm(String command) → bool
queryCommandState(String command) → bool
queryCommandSupported(String command) → bool
queryCommandValue(String command) → String
querySelector(String selectors) → Element
Finds the first descendant element of this document that matches the specified group of selectors.
querySelectorAll(String selectors) → ElementList<Element>
Finds all descendant elements of this document that match the specified group of selectors.
remove() → void
inherited
Removes this node from the DOM.
removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void
inherited
replaceWith(Node otherNode) → Node
inherited
Replaces this node with another node.
toString() → String
inherited
Print out a String representation of this Node.
transformDocumentToTreeView(String noStyleMessage) → void