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