dart:html
Document class
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
- Implementers
- Annotations
Constructors
- Document()
factory
Properties
- activeElement → Element
final
- addressSpace → String
final
- contentType → String
final
- cookie ↔ String
read / write
- currentScript → ScriptElement
final
- documentElement → Element
final
- domain → String
final
- fonts → FontFaceSet
final
- fullscreenElement → Element
final
- fullscreenEnabled → bool
final
- hidden → bool
final
- implementation → DomImplementation
final
- onAbort → Stream<Event>
read-only
- Stream of
abort
events handled by this Document. - onBeforeCopy → Stream<Event>
read-only
- Stream of
beforecopy
events handled by this Document. - onBeforeCut → Stream<Event>
read-only
- Stream of
beforecut
events handled by this Document. - onBeforePaste → Stream<Event>
read-only
- Stream of
beforepaste
events handled by this Document. - onBlur → Stream<Event>
read-only
- Stream of
blur
events handled by this Document. - onCanPlay → Stream<Event>
read-only
- onCanPlayThrough → Stream<Event>
read-only
- onChange → Stream<Event>
read-only
- Stream of
change
events handled by this Document. - onClick → Stream<MouseEvent>
read-only
- Stream of
click
events handled by this Document. - Stream of
contextmenu
events handled by this Document. - onCopy → Stream<ClipboardEvent>
read-only
- Stream of
copy
events handled by this Document. - onCut → Stream<ClipboardEvent>
read-only
- Stream of
cut
events handled by this Document. - onDoubleClick → Stream<Event>
@DomName('Document.ondblclick'), read-only
- Stream of
doubleclick
events handled by this Document. - onDrag → Stream<MouseEvent>
read-only
- Stream of
drag
events handled by this Document. - onDragEnd → Stream<MouseEvent>
read-only
- Stream of
dragend
events handled by this Document. - onDragEnter → Stream<MouseEvent>
read-only
- Stream of
dragenter
events handled by this Document. - onDragLeave → Stream<MouseEvent>
read-only
- Stream of
dragleave
events handled by this Document. - onDragOver → Stream<MouseEvent>
read-only
- Stream of
dragover
events handled by this Document. - onDragStart → Stream<MouseEvent>
read-only
- Stream of
dragstart
events handled by this Document. - onDrop → Stream<MouseEvent>
read-only
- Stream of
drop
events handled by this Document. - 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 this Document. - onFocus → Stream<Event>
read-only
- Stream of
focus
events handled by this Document. - onFullscreenChange → Stream<Event>
read-only
- Stream of
fullscreenchange
events handled by this Document. - onFullscreenError → Stream<Event>
read-only
- Stream of
fullscreenerror
events handled by this Document. - onInput → Stream<Event>
read-only
- Stream of
input
events handled by this Document. - onInvalid → Stream<Event>
read-only
- Stream of
invalid
events handled by this Document. - onKeyDown → Stream<KeyboardEvent>
read-only
- Stream of
keydown
events handled by this Document. - onKeyPress → Stream<KeyboardEvent>
read-only
- Stream of
keypress
events handled by this Document. - onKeyUp → Stream<KeyboardEvent>
read-only
- Stream of
keyup
events handled by this Document. - onLoad → Stream<Event>
read-only
- Stream of
load
events handled by this Document. - onLoadedData → Stream<Event>
read-only
- onLoadedMetadata → Stream<Event>
read-only
- onMouseDown → Stream<MouseEvent>
read-only
- Stream of
mousedown
events handled by this Document. - onMouseEnter → Stream<MouseEvent>
read-only
- Stream of
mouseenter
events handled by this Document. - onMouseLeave → Stream<MouseEvent>
read-only
- Stream of
mouseleave
events handled by this Document. - onMouseMove → Stream<MouseEvent>
read-only
- Stream of
mousemove
events handled by this Document. - onMouseOut → Stream<MouseEvent>
read-only
- Stream of
mouseout
events handled by this Document. - onMouseOver → Stream<MouseEvent>
read-only
- Stream of
mouseover
events handled by this Document. - onMouseUp → Stream<MouseEvent>
read-only
- Stream of
mouseup
events handled by this Document. - onMouseWheel → Stream<WheelEvent>
read-only
- Stream of
mousewheel
events handled by this Document. - onPaste → Stream<ClipboardEvent>
read-only
- Stream of
paste
events handled by this Document. - 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 this Document. - onReset → Stream<Event>
read-only
- Stream of
reset
events handled by this Document. - onResize → Stream<Event>
read-only
- onScroll → Stream<Event>
read-only
- Stream of
scroll
events handled by this Document. - onSearch → Stream<Event>
read-only
- Stream of
search
events handled by this Document. - onSecurityPolicyViolation → Stream<SecurityPolicyViolationEvent>
read-only
- Stream of
securitypolicyviolation
events handled by this Document. - onSeeked → Stream<Event>
read-only
- onSeeking → Stream<Event>
read-only
- onSelect → Stream<Event>
read-only
- Stream of
select
events handled by this Document. - onSelectionChange → Stream<Event>
read-only
- Stream of
selectionchange
events handled by this Document. - onSelectStart → Stream<Event>
read-only
- Stream of
selectstart
events handled by this Document. - onStalled → Stream<Event>
read-only
- onSubmit → Stream<Event>
read-only
- Stream of
submit
events handled by this Document. - onSuspend → Stream<Event>
read-only
- onTimeUpdate → Stream<Event>
read-only
- onTouchCancel → Stream<TouchEvent>
read-only
- Stream of
touchcancel
events handled by this Document. - onTouchEnd → Stream<TouchEvent>
read-only
- Stream of
touchend
events handled by this Document. - onTouchMove → Stream<TouchEvent>
read-only
- Stream of
touchmove
events handled by this Document. - onTouchStart → Stream<TouchEvent>
read-only
- Stream of
touchstart
events handled by this Document. - onVolumeChange → Stream<Event>
read-only
- onWaiting → Stream<Event>
read-only
- origin → String
final
- pointerLockElement → Element
final
- readyState → String
final
- rootElement → SvgSvgElement
final
- rootScroller ↔ Element
read / write
- scrollingElement → Element
final
- suborigin → String
final
- supportsRegister → bool
read-only
- Deprecated: use supportsRegisterElement instead.
- supportsRegisterElement → bool
read-only
- Checks if registerElement is supported on the current platform.
- timeline → DocumentTimeline
final
- visibilityState → String
@SupportedBrowser(SupportedBrowser.CHROME), @SupportedBrowser(SupportedBrowser.FIREFOX), @SupportedBrowser(SupportedBrowser.IE, '10'), read-only
- window → WindowBase
read-only
- baseUri → String
@JSName('baseURI'), final, inherited
- childNodes → List<Node>
@Creates('NodeList'), @Returns('NodeList'), final, inherited
- A list of this node's children. [...]
- firstChild → Node
final, inherited
- The first child of this node. [...]
- hashCode → int
read-only, inherited
- The hash code for this object. [...]
- isConnected → bool
final, inherited
- lastChild → Node
final, inherited
- The last child of this node. [...]
- nextNode → Node
@JSName('nextSibling'), final, inherited
- The next sibling node. [...]
- nodeName → String
final, inherited
- The name of this node. [...]
- nodes ↔ List<Node>
read / write, inherited
- A modifiable list of this node's children.
- nodeType → int
final, inherited
- The type of node. [...]
- nodeValue → String
final, 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.
- ownerDocument → Document
final, inherited
- The document this node belongs to. [...]
- parent → Element
@JSName('parentElement'), final, inherited
- The parent element of this node. [...]
- parentNode → Node
final, inherited
- The parent node of this node. [...]
- previousNode → Node
@JSName('previousSibling'), final, inherited
- The previous sibling node. [...]
- runtimeType → Type
read-only, inherited
- A representation of the runtime type of the object.
- text ↔ String
@JSName('textContent'), read / write, inherited
- All text within this node and its descendents. [...]
Methods
- adoptNode(Node node) → Node
- createDocumentFragment() → DocumentFragment
- createElement(String tagName, [ String typeExtension ]) → Element
- createElementNS(String namespaceURI, String qualifiedName, [ String typeExtension ]) → Element
- createRange() → Range
- elementsFromPoint(int x, int y) → List<Element>
- execCommand(String commandId, [ bool showUI, String value ]) → bool
- exitFullscreen() → void
- exitPointerLock() → void
- getAnimations() → List<Animation>
- getElementById(String elementId) → Element
- getElementsByClassName(String classNames) → List<Node>
@Creates('NodeList|HtmlCollection'), @Returns('NodeList|HtmlCollection')
- getElementsByName(String elementName) → List<Node>
@Creates('NodeList|HtmlCollection'), @Returns('NodeList|HtmlCollection')
- getElementsByTagName(String localName) → List<Node>
@Creates('NodeList|HtmlCollection'), @Returns('NodeList|HtmlCollection')
- importNode(Node node, [ bool deep ]) → Node
- queryCommandEnabled(String commandId) → bool
- queryCommandIndeterm(String commandId) → bool
- queryCommandState(String commandId) → bool
- queryCommandSupported(String commandId) → bool
- queryCommandValue(String commandId) → String
- querySelector(String selectors) → Element
- Finds the first descendant element of this document that matches the specified group of selectors. [...]
- querySelectorAll<T extends Element>(String selectors) → ElementList<T>
- Finds all descendant elements of this document that match the specified group of selectors. [...]
- registerElement(String tag, Type customElementClass, { String extendsTag }) → void
- registerElement2(String type, [ Map options ]) → Function
- addEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
- append(Node node) → Node
@JSName('appendChild'), inherited
- Adds a node to the end of the child nodes list of this node. [...]
- clone(bool deep) → Node
@JSName('cloneNode'), inherited
- Returns a copy of this node. [...]
- contains(Node other) → bool
inherited
- Returns true if this node contains the specified node. [...]
- dispatchEvent(Event event) → bool
inherited
- getRootNode([Map options ]) → Node
inherited
- hasChildNodes() → bool
inherited
- Returns true if this node has any children. [...]
- insertAllBefore(Iterable<Node> newNodes, Node refChild) → Node
inherited
- Inserts all of the nodes into this node directly before refChild. [...]
- insertBefore(Node node, Node child) → Node
inherited
- Inserts all of the nodes into this node directly before refChild. [...]
- noSuchMethod(Invocation invocation) → dynamic
inherited
- Invoked when a non-existent method or property is accessed. [...]
- remove() → void
inherited
- Removes this node from the DOM.
- removeEventListener(String type, EventListener listener, [ 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.
Operators
- operator ==(dynamic other) → bool
inherited
- The equality operator. [...]
Constants
- pointerLockChangeEvent → const EventStreamProvider<Event>
-
const EventStreamProvider<Event>('pointerlockchange')
- pointerLockErrorEvent → const EventStreamProvider<Event>
-
const EventStreamProvider<Event>('pointerlockerror')
- readyStateChangeEvent → const EventStreamProvider<Event>
- Static factory designed to expose
readystatechange
events to event handlers that are not necessarily instances of Document. [...] const EventStreamProvider<Event>('readystatechange')
- securityPolicyViolationEvent → const EventStreamProvider<SecurityPolicyViolationEvent>
- Static factory designed to expose
securitypolicyviolation
events to event handlers that are not necessarily instances of Document. [...] const EventStreamProvider<SecurityPolicyViolationEvent>('securitypolicyviolation')
- selectionChangeEvent → const EventStreamProvider<Event>
- Static factory designed to expose
selectionchange
events to event handlers that are not necessarily instances of Document. [...] const EventStreamProvider<Event>('selectionchange')