Document class - dart:html library (original) (raw)
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 tutorialTarget 2: Connect Dart & HTML.
Inheritance
- Object
- EventTarget
- Node
- Document
Implementers
Annotations
- @Native("Document")
Constructors
Document()
factory
Properties
no setter
no setter
no setterinherited
childNodes → List<Node>
A list of this node's children.
no setterinherited
no setter
getter/setter pair
currentScript → ScriptElement?
no setter
no setter
no setter
firstChild → Node?
The first child of this node.
no setterinherited
fonts → FontFaceSet?
no setter
no setter
no setter
The hash code for this object.
no setterinherited
no setter
implementation → DomImplementation?
no setter
isConnected → bool?
no setterinherited
The last child of this node.
no setterinherited
The next sibling node.
no setterinherited
The name of this node.
no setterinherited
A modifiable list of this node's children.
getter/setter pairinherited
The type of node.
no setterinherited
The value of this node.
no setterinherited
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
no setterinherited
Stream of abort
events handled by this Document.
no setter
Stream of beforecopy
events handled by this Document.
no setter
Stream of beforecut
events handled by this Document.
no setter
Stream of beforepaste
events handled by this Document.
no setter
Stream of blur
events handled by this Document.
no setter
no setter
onCanPlayThrough → Stream<Event>
no setter
Stream of change
events handled by this Document.
no setter
Stream of click
events handled by this Document.
no setter
Stream of contextmenu
events handled by this Document.
no setter
onCopy → Stream<ClipboardEvent>
Stream of copy
events handled by this Document.
no setter
onCut → Stream<ClipboardEvent>
Stream of cut
events handled by this Document.
no setter
Stream of doubleclick
events handled by this Document.
no setter
Stream of drag
events handled by this Document.
no setter
onDragEnd → Stream<MouseEvent>
Stream of dragend
events handled by this Document.
no setter
onDragEnter → Stream<MouseEvent>
Stream of dragenter
events handled by this Document.
no setter
onDragLeave → Stream<MouseEvent>
Stream of dragleave
events handled by this Document.
no setter
onDragOver → Stream<MouseEvent>
Stream of dragover
events handled by this Document.
no setter
onDragStart → Stream<MouseEvent>
Stream of dragstart
events handled by this Document.
no setter
Stream of drop
events handled by this Document.
no setter
onDurationChange → Stream<Event>
no setter
no setter
no setter
Stream of error
events handled by this Document.
no setter
Stream of focus
events handled by this Document.
no setter
onFullscreenChange → Stream<Event>
Stream of fullscreenchange
events handled by this Document.
no setter
onFullscreenError → Stream<Event>
Stream of fullscreenerror
events handled by this Document.
no setter
Stream of input
events handled by this Document.
no setter
Stream of invalid
events handled by this Document.
no setter
onKeyDown → Stream<KeyboardEvent>
Stream of keydown
events handled by this Document.
no setter
onKeyPress → Stream<KeyboardEvent>
Stream of keypress
events handled by this Document.
no setter
onKeyUp → Stream<KeyboardEvent>
Stream of keyup
events handled by this Document.
no setter
Stream of load
events handled by this Document.
no setter
no setter
onLoadedMetadata → Stream<Event>
no setter
onMouseDown → Stream<MouseEvent>
Stream of mousedown
events handled by this Document.
no setter
onMouseEnter → Stream<MouseEvent>
Stream of mouseenter
events handled by this Document.
no setter
onMouseLeave → Stream<MouseEvent>
Stream of mouseleave
events handled by this Document.
no setter
onMouseMove → Stream<MouseEvent>
Stream of mousemove
events handled by this Document.
no setter
onMouseOut → Stream<MouseEvent>
Stream of mouseout
events handled by this Document.
no setter
onMouseOver → Stream<MouseEvent>
Stream of mouseover
events handled by this Document.
no setter
onMouseUp → Stream<MouseEvent>
Stream of mouseup
events handled by this Document.
no setter
onMouseWheel → Stream<WheelEvent>
Stream of mousewheel
events handled by this Document.
no setter
onPaste → Stream<ClipboardEvent>
Stream of paste
events handled by this Document.
no setter
no setter
no setter
no setter
onPointerLockChange → Stream<Event>
no setter
onPointerLockError → Stream<Event>
no setter
no setter
onReadyStateChange → Stream<Event>
Stream of readystatechange
events handled by this Document.
no setter
Stream of reset
events handled by this Document.
no setter
no setter
Stream of scroll
events handled by this Document.
no setter
Stream of search
events handled by this Document.
no setter
onSecurityPolicyViolation → Stream<SecurityPolicyViolationEvent>
Stream of securitypolicyviolation
events handled by this Document.
no setter
no setter
no setter
Stream of select
events handled by this Document.
no setter
onSelectionChange → Stream<Event>
Stream of selectionchange
events handled by this Document.
no setter
Stream of selectstart
events handled by this Document.
no setter
no setter
Stream of submit
events handled by this Document.
no setter
no setter
no setter
onTouchCancel → Stream<TouchEvent>
Stream of touchcancel
events handled by this Document.
no setter
onTouchEnd → Stream<TouchEvent>
Stream of touchend
events handled by this Document.
no setter
onTouchMove → Stream<TouchEvent>
Stream of touchmove
events handled by this Document.
no setter
onTouchStart → Stream<TouchEvent>
Stream of touchstart
events handled by this Document.
no setter
onVolumeChange → Stream<Event>
no setter
no setter
no setter
The document this node belongs to.
no setterinherited
The parent element of this node.
no setterinherited
parentNode → Node?
The parent node of this node.
no setterinherited
no setter
previousNode → Node?
The previous sibling node.
no setterinherited
readyState → String?
no setter
no setter
getter/setter pair
A representation of the runtime type of the object.
no setterinherited
no setter
no setter
All text within this node and its descendants.
getter/setter pairinherited
no setter
no setter
window → WindowBase?
no setter
Methods
addEventListener(String type, EventListener? listener, [bool? useCapture])→ void
inherited
Adds a node to the end of the child nodes list of this node.
inherited
Returns a copy of this node.
inherited
Returns true if this node contains the specified node.
inherited
createDocumentFragment()→ DocumentFragment
createElement(String tagName, [String? typeExtension])→ Element
createElementNS(String namespaceURI, String qualifiedName, [String? typeExtension])→ Element
createRange()→ Range
dispatchEvent(Event event)→ bool
inherited
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>
getElementsByName(String elementName)→ List<Node>
getElementsByTagName(String localName)→ List<Node>
getRootNode([Map? options])→ Node
inherited
Returns true if this node has any children.
inherited
importNode(Node node, [bool? deep])→ Node
insertAllBefore(Iterable<Node> newNodes, Node child)→ void
Inserts all of the nodes into this node directly before child.
inherited
insertBefore(Node node, Node? child)→ Node
Inserts the given node into this node directly before child. If child is null
, then the given node is inserted at the end of this node's child nodes.
inherited
noSuchMethod(Invocation invocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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.
remove()→ void
Removes this node from the DOM.
inherited
removeEventListener(String type, EventListener? listener, [bool? useCapture])→ void
inherited
replaceWith(Node otherNode)→ Node
Replaces this node with another node.
inherited
Print out a String representation of this Node.
inherited
Operators
operator ==(Object other)→ bool
The equality operator.
inherited
Constants
pointerLockChangeEvent → const EventStreamProvider<Event>
pointerLockErrorEvent → const EventStreamProvider<Event>
readyStateChangeEvent → const EventStreamProvider<Event>
Static factory designed to expose readystatechange
events to event handlers that are not necessarily instances of Document.
securityPolicyViolationEvent → const EventStreamProvider<SecurityPolicyViolationEvent>
Static factory designed to expose securitypolicyviolation
events to event handlers that are not necessarily instances of Document.
selectionChangeEvent → const EventStreamProvider<Event>
Static factory designed to expose selectionchange
events to event handlers that are not necessarily instances of Document.