Dart API Reference
dart:html
HtmlDocument
HtmlDocument
class
Annotations
DomName('HTMLDocument')
Extends
Object
EventTarget
Node
Document
HtmlDocument
Constants
visibilityChangeEvent
=
const _Custom
EventStreamProvider
<
Event
>
(_determineVisibilityChangeEventType)
Static factory designed to expose visibilitychange events to event handlers that are not necessarily instances of
Document
.
Static Properties
supportsCssCanvasContext
bool
read-only
Instance Properties
body
BodyElement
read / write
head
HeadElement
read-only
lastModified
String
read-only
preferredStylesheetSet
String
read-only
referrer
String
read-only
selectedStylesheetSet
String
read / write
styleSheets
List
<
StyleSheet
>
read-only
title
String
read / write
fullscreenElement
Element
read-only
fullscreenEnabled
bool
read-only
hidden
bool
read-only
visibilityState
String
read-only
onVisibilityChange
Stream
<
Event
>
read-only
on
Events
Inherited
read-only
nodes
List
<
Node
>
Inherited
read / write
baseUri
String
Inherited
read-only
childNodes
List
<
Node
>
Inherited
read-only
firstChild
Node
Inherited
read-only
lastChild
Node
Inherited
read-only
nextNode
Node
Inherited
read-only
nodeName
String
Inherited
read-only
nodeType
int
Inherited
read-only
nodeValue
String
Inherited
read-only
ownerDocument
Document
Inherited
read-only
parent
Element
Inherited
read-only
parentNode
Node
Inherited
read-only
previousNode
Node
Inherited
read-only
text
String
Inherited
read / write
activeElement
Element
Inherited
read-only
contentType
String
Inherited
read-only
cookie
String
Inherited
read / write
currentScript
ScriptElement
Inherited
read-only
window
WindowBase
Inherited
read-only
documentElement
Element
Inherited
read-only
domain
String
Inherited
read-only
fonts
FontFaceSet
Inherited
read-only
implementation
DomImplementation
Inherited
read-only
pointerLockElement
Element
Inherited
read-only
readyState
String
Inherited
read-only
rootElement
SvgSvgElement
Inherited
read-only
timeline
AnimationTimeline
Inherited
read-only
onAbort
Stream
<
Event
>
Inherited
read-only
onBeforeCopy
Stream
<
Event
>
Inherited
read-only
onBeforeCut
Stream
<
Event
>
Inherited
read-only
onBeforePaste
Stream
<
Event
>
Inherited
read-only
onBlur
Stream
<
Event
>
Inherited
read-only
onCanPlay
Stream
<
Event
>
Inherited
read-only
onCanPlayThrough
Stream
<
Event
>
Inherited
read-only
onChange
Stream
<
Event
>
Inherited
read-only
onClick
Stream
<
MouseEvent
>
Inherited
read-only
onContextMenu
Stream
<
MouseEvent
>
Inherited
read-only
onCopy
Stream
<
Event
>
Inherited
read-only
onCut
Stream
<
Event
>
Inherited
read-only
onDoubleClick
Stream
<
Event
>
Inherited
read-only
onDrag
Stream
<
MouseEvent
>
Inherited
read-only
onDragEnd
Stream
<
MouseEvent
>
Inherited
read-only
onDragEnter
Stream
<
MouseEvent
>
Inherited
read-only
onDragLeave
Stream
<
MouseEvent
>
Inherited
read-only
onDragOver
Stream
<
MouseEvent
>
Inherited
read-only
onDragStart
Stream
<
MouseEvent
>
Inherited
read-only
onDrop
Stream
<
MouseEvent
>
Inherited
read-only
onDurationChange
Stream
<
Event
>
Inherited
read-only
onEmptied
Stream
<
Event
>
Inherited
read-only
onEnded
Stream
<
Event
>
Inherited
read-only
onError
Stream
<
Event
>
Inherited
read-only
onFocus
Stream
<
Event
>
Inherited
read-only
onInput
Stream
<
Event
>
Inherited
read-only
onInvalid
Stream
<
Event
>
Inherited
read-only
onKeyDown
Stream
<
KeyboardEvent
>
Inherited
read-only
onKeyPress
Stream
<
KeyboardEvent
>
Inherited
read-only
onKeyUp
Stream
<
KeyboardEvent
>
Inherited
read-only
onLoad
Stream
<
Event
>
Inherited
read-only
onLoadedData
Stream
<
Event
>
Inherited
read-only
onLoadedMetadata
Stream
<
Event
>
Inherited
read-only
onMouseDown
Stream
<
MouseEvent
>
Inherited
read-only
onMouseEnter
Stream
<
MouseEvent
>
Inherited
read-only
onMouseLeave
Stream
<
MouseEvent
>
Inherited
read-only
onMouseMove
Stream
<
MouseEvent
>
Inherited
read-only
onMouseOut
Stream
<
MouseEvent
>
Inherited
read-only
onMouseOver
Stream
<
MouseEvent
>
Inherited
read-only
onMouseUp
Stream
<
MouseEvent
>
Inherited
read-only
onMouseWheel
Stream
<
WheelEvent
>
Inherited
read-only
onPaste
Stream
<
Event
>
Inherited
read-only
onPause
Stream
<
Event
>
Inherited
read-only
onPlay
Stream
<
Event
>
Inherited
read-only
onPlaying
Stream
<
Event
>
Inherited
read-only
onPointerLockChange
Stream
<
Event
>
Inherited
read-only
onPointerLockError
Stream
<
Event
>
Inherited
read-only
onRateChange
Stream
<
Event
>
Inherited
read-only
onReadyStateChange
Stream
<
Event
>
Inherited
read-only
onReset
Stream
<
Event
>
Inherited
read-only
onResize
Stream
<
Event
>
Inherited
read-only
onScroll
Stream
<
Event
>
Inherited
read-only
onSearch
Stream
<
Event
>
Inherited
read-only
onSecurityPolicyViolation
Stream
<
SecurityPolicyViolationEvent
>
Inherited
read-only
onSeeked
Stream
<
Event
>
Inherited
read-only
onSeeking
Stream
<
Event
>
Inherited
read-only
onSelect
Stream
<
Event
>
Inherited
read-only
onSelectionChange
Stream
<
Event
>
Inherited
read-only
onSelectStart
Stream
<
Event
>
Inherited
read-only
onStalled
Stream
<
Event
>
Inherited
read-only
onSubmit
Stream
<
Event
>
Inherited
read-only
onSuspend
Stream
<
Event
>
Inherited
read-only
onTimeUpdate
Stream
<
Event
>
Inherited
read-only
onTouchCancel
Stream
<
TouchEvent
>
Inherited
read-only
onTouchEnd
Stream
<
TouchEvent
>
Inherited
read-only
onTouchMove
Stream
<
TouchEvent
>
Inherited
read-only
onTouchStart
Stream
<
TouchEvent
>
Inherited
read-only
onVolumeChange
Stream
<
Event
>
Inherited
read-only
onWaiting
Stream
<
Event
>
Inherited
read-only
onFullscreenChange
Stream
<
Event
>
Inherited
read-only
onFullscreenError
Stream
<
Event
>
Inherited
read-only
supportsRegisterElement
bool
Inherited
read-only
supportsRegister
bool
Inherited
read-only
Instance Methods
caretRangeFromPoint
(
int
x
,
int
y
) →
Range
elementFromPoint
(
int
x
,
int
y
) →
Element
getCssCanvasContext
(
String
contextId
,
String
name
,
int
width
,
int
height
) →
CanvasRenderingContext
Gets a CanvasRenderingContext which can be used as the CSS background of an element.
exitFullscreen
(
) →
void
Returns page to standard layout.
registerElement
(
String
tag
,
Type
customElementClass
, {
String
extendsTag
}) →
void
Register a custom subclass of Element to be instantiatable by the DOM.
register
(
String
tag
,
Type
customElementClass
, {
String
extendsTag
}) →
void
Deprecated*: use
registerElement
instead.
createElementUpgrader
(
Type
type
, {
String
extendsTag
}) →
ElementUpgrader
Creates an element upgrader which can be used to change the Dart wrapper type for elements.
toString
(
) →
String
Inherited
Print out a String representation of this Node.
addEventListener
(
String
type
,
dynamic
listener
(
Event
event
)
, [
bool
useCapture
]) →
void
Inherited
removeEventListener
(
String
type
,
dynamic
listener
(
Event
event
)
, [
bool
useCapture
]) →
void
Inherited
dispatchEvent
(
Event
event
) →
bool
Inherited
remove
(
) →
void
Inherited
Removes this node from the DOM.
replaceWith
(
Node
otherNode
) →
Node
Inherited
Replaces this node with another node.
insertAllBefore
(
Iterable
<
Node
>
newNodes
,
Node
refChild
) →
Node
Inherited
Inserts all of the nodes into this node directly before refChild.
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.
hasChildNodes
(
) →
bool
Inherited
Returns true if this node has any children.
insertBefore
(
Node
newChild
,
Node
refChild
) →
Node
Inherited
Inserts all of the nodes into this node directly before refChild.
adoptNode
(
Node
node
) →
Node
Inherited
createDocumentFragment
(
) →
DocumentFragment
Inherited
createElementNS
(
String
namespaceURI
,
String
qualifiedName
, [
String
typeExtension
]) →
Element
Inherited
createRange
(
) →
Range
Inherited
execCommand
(
String
command
,
bool
userInterface
,
String
value
) →
bool
Inherited
exitPointerLock
(
) →
void
Inherited
getElementById
(
String
elementId
) →
Element
Inherited
getElementsByClassName
(
String
classNames
) →
List
<
Node
>
Inherited
getElementsByName
(
String
elementName
) →
List
<
Node
>
Inherited
getElementsByTagName
(
String
localName
) →
List
<
Node
>
Inherited
importNode
(
Node
node
, [
bool
deep
]) →
Node
Inherited
queryCommandEnabled
(
String
command
) →
bool
Inherited
queryCommandIndeterm
(
String
command
) →
bool
Inherited
queryCommandState
(
String
command
) →
bool
Inherited
queryCommandSupported
(
String
command
) →
bool
Inherited
queryCommandValue
(
String
command
) →
String
Inherited
transformDocumentToTreeView
(
String
noStyleMessage
) →
void
Inherited
querySelector
(
String
selectors
) →
Element
Inherited
Finds the first descendant element of this document that matches the specified group of selectors.
querySelectorAll
(
String
selectors
) →
ElementList
<
Element
>
Inherited
Finds all descendant elements of this document that match the specified group of selectors.
query
(
String
relativeSelectors
) →
Element
Inherited
Alias for
querySelector
. Note this function is deprecated because its semantics will be changing in the future.
queryAll
(
String
relativeSelectors
) →
ElementList
<
Element
>
Inherited
Alias for
querySelectorAll
. Note this function is deprecated because its semantics will be changing in the future.
createElement
(
String
tagName
, [
String
typeExtension
]) →
Element
Inherited