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
- Object
- EventTarget
- Node
- 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') -
constStatic factory designed to expose
readystatechange
events to event handlers that are not necessarily instances of Document. -
EventStreamProvider<SecurityPolicyViolationEvent>
securityPolicyViolationEvent
=
const EventStreamProvider<SecurityPolicyViolationEvent>
('securitypolicyviolation') -
constStatic factory designed to expose
securitypolicyviolation
events to event handlers that are not necessarily instances of Document. -
EventStreamProvider<Event>
selectionChangeEvent
=
const EventStreamProvider<Event>
('selectionchange') -
constStatic 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, inheritedA 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, inheritedThe first child of this node.
- FontFaceSet fonts
-
read-only
- Element fullscreenElement
-
read-only
- bool fullscreenEnabled
-
read-only
-
read-only
- DomImplementation implementation
-
read-only
- Node lastChild
-
read-only, inheritedThe last child of this node.
- Node nextNode
-
read-only, inheritedThe next sibling node.
- String nodeName
-
read-only, inheritedThe name of this node.
- List<Node> nodes
-
read / write, inheritedA modifiable list of this node's children.
- int nodeType
-
read-only, inheritedThe type of node.
- String nodeValue
-
read-only, inheritedThe value of this node.
- Events on
-
read-only, inheritedThis 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-onlyStream of
abort
events handled by thisDocument
. - Stream<Event> onBeforeCopy
-
read-onlyStream of
beforecopy
events handled by thisDocument
. - Stream<Event> onBeforeCut
-
read-onlyStream of
beforecut
events handled by thisDocument
. - Stream<Event> onBeforePaste
-
read-onlyStream of
beforepaste
events handled by thisDocument
. - Stream<Event> onBlur
-
read-onlyStream of
blur
events handled by thisDocument
. - Stream<Event> onCanPlay
-
read-only
- Stream<Event> onCanPlayThrough
-
read-only
- Stream<Event> onChange
-
read-onlyStream of
change
events handled by thisDocument
. - Stream<MouseEvent> onClick
-
read-onlyStream of
click
events handled by thisDocument
. - Stream<MouseEvent> onContextMenu
-
read-onlyStream of
contextmenu
events handled by thisDocument
. - Stream<Event> onCopy
-
read-onlyStream of
copy
events handled by thisDocument
. - Stream<Event> onCut
-
read-onlyStream of
cut
events handled by thisDocument
. - Stream<Event> onDoubleClick
-
read-onlyStream of
doubleclick
events handled by thisDocument
. - Stream<MouseEvent> onDrag
-
read-onlyStream of
drag
events handled by thisDocument
. - Stream<MouseEvent> onDragEnd
-
read-onlyStream of
dragend
events handled by thisDocument
. - Stream<MouseEvent> onDragEnter
-
read-onlyStream of
dragenter
events handled by thisDocument
. - Stream<MouseEvent> onDragLeave
-
read-onlyStream of
dragleave
events handled by thisDocument
. - Stream<MouseEvent> onDragOver
-
read-onlyStream of
dragover
events handled by thisDocument
. - Stream<MouseEvent> onDragStart
-
read-onlyStream of
dragstart
events handled by thisDocument
. - Stream<MouseEvent> onDrop
-
read-onlyStream of
drop
events handled by thisDocument
. - Stream<Event> onDurationChange
-
read-only
- Stream<Event> onEmptied
-
read-only
- Stream<Event> onEnded
-
read-only
- Stream<Event> onError
-
read-onlyStream of
error
events handled by thisDocument
. - Stream<Event> onFocus
-
read-onlyStream of
focus
events handled by thisDocument
. - Stream<Event> onFullscreenChange
-
read-onlyStream of
fullscreenchange
events handled by thisDocument
. - Stream<Event> onFullscreenError
-
read-onlyStream of
fullscreenerror
events handled by thisDocument
. - Stream<Event> onInput
-
read-onlyStream of
input
events handled by thisDocument
. - Stream<Event> onInvalid
-
read-onlyStream of
invalid
events handled by thisDocument
. - Stream<KeyboardEvent> onKeyDown
-
read-onlyStream of
keydown
events handled by thisDocument
. - Stream<KeyboardEvent> onKeyPress
-
read-onlyStream of
keypress
events handled by thisDocument
. - Stream<KeyboardEvent> onKeyUp
-
read-onlyStream of
keyup
events handled by thisDocument
. - Stream<Event> onLoad
-
read-onlyStream of
load
events handled by thisDocument
. - Stream<Event> onLoadedData
-
read-only
- Stream<Event> onLoadedMetadata
-
read-only
- Stream<MouseEvent> onMouseDown
-
read-onlyStream of
mousedown
events handled by thisDocument
. - Stream<MouseEvent> onMouseEnter
-
read-onlyStream of
mouseenter
events handled by thisDocument
. - Stream<MouseEvent> onMouseLeave
-
read-onlyStream of
mouseleave
events handled by thisDocument
. - Stream<MouseEvent> onMouseMove
-
read-onlyStream of
mousemove
events handled by thisDocument
. - Stream<MouseEvent> onMouseOut
-
read-onlyStream of
mouseout
events handled by thisDocument
. - Stream<MouseEvent> onMouseOver
-
read-onlyStream of
mouseover
events handled by thisDocument
. - Stream<MouseEvent> onMouseUp
-
read-onlyStream of
mouseup
events handled by thisDocument
. - Stream<WheelEvent> onMouseWheel
-
read-onlyStream of
mousewheel
events handled by thisDocument
. - Stream<Event> onPaste
-
read-onlyStream of
paste
events handled by thisDocument
. - 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-onlyStream of
readystatechange
events handled by thisDocument
. - Stream<Event> onReset
-
read-onlyStream of
reset
events handled by thisDocument
. - Stream<Event> onResize
-
read-only
- Stream<Event> onScroll
-
read-onlyStream of
scroll
events handled by thisDocument
. - Stream<Event> onSearch
-
read-onlyStream of
search
events handled by thisDocument
. - Stream<SecurityPolicyViolationEvent> onSecurityPolicyViolation
-
read-onlyStream of
securitypolicyviolation
events handled by thisDocument
. - Stream<Event> onSeeked
-
read-only
- Stream<Event> onSeeking
-
read-only
- Stream<Event> onSelect
-
read-onlyStream of
select
events handled by thisDocument
. - Stream<Event> onSelectionChange
-
read-onlyStream of
selectionchange
events handled by thisDocument
. - Stream<Event> onSelectStart
-
read-onlyStream of
selectstart
events handled by thisDocument
. - Stream<Event> onStalled
-
read-only
- Stream<Event> onSubmit
-
read-onlyStream of
submit
events handled by thisDocument
. - Stream<Event> onSuspend
-
read-only
- Stream<Event> onTimeUpdate
-
read-only
- Stream<TouchEvent> onTouchCancel
-
read-onlyStream of
touchcancel
events handled by thisDocument
. - Stream<TouchEvent> onTouchEnd
-
read-onlyStream of
touchend
events handled by thisDocument
. - Stream<TouchEvent> onTouchMove
-
read-onlyStream of
touchmove
events handled by thisDocument
. - Stream<TouchEvent> onTouchStart
-
read-onlyStream of
touchstart
events handled by thisDocument
. - Stream<Event> onVolumeChange
-
read-only
- Stream<Event> onWaiting
-
read-only
- Document ownerDocument
-
read-only, inheritedThe document this node belongs to.
- Element parent
-
read-only, inheritedThe parent element of this node.
- Node parentNode
-
read-only, inheritedThe parent node of this node.
- Element pointerLockElement
-
read-only
- Node previousNode
-
read-only, inheritedThe previous sibling node.
- String readyState
-
read-only
- SvgSvgElement rootElement
-
read-only
- bool supportsRegister
-
read-onlyDeprecated: use
supportsRegisterElement
instead. - bool supportsRegisterElement
-
read-onlyChecks if
registerElement
is supported on the current platform. - String text
-
read / write, inheritedAll 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 -
inheritedAdds a node to the end of the child nodes list of this node.
-
clone(
bool deep) → Node -
inheritedReturns a copy of this node.
-
contains(
Node other) → bool -
inheritedReturns 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 -
inheritedReturns true if this node has any children.
-
importNode(
Node node, [bool deep]) → Node -
insertAllBefore(
Iterable<Node> newNodes, Node refChild) → Node -
inheritedInserts all of the nodes into this node directly before refChild.
-
insertBefore(
Node newChild, Node refChild) → Node -
inheritedInserts 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 -
inheritedRemoves this node from the DOM.
-
removeEventListener(
String type, dynamic listener(Event event), [bool useCapture]) → void -
inherited
-
replaceWith(
Node otherNode) → Node -
inheritedReplaces this node with another node.
-
toString(
) → String -
inheritedPrint out a String representation of this Node.
-
transformDocumentToTreeView(
String noStyleMessage) → void