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.
@DomName('Document')
class Document extends Node native "Document"
{
@DomName('Document.readystatechangeEvent')
@DocsEditable
static const EventStreamProvider<Event> readyStateChangeEvent = const EventStreamProvider<Event>('readystatechange');
@DomName('Document.securitypolicyviolationEvent')
@DocsEditable
// https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#widl-Document-onsecuritypolicyviolation
@Experimental
static const EventStreamProvider<SecurityPolicyViolationEvent> securityPolicyViolationEvent = const EventStreamProvider<SecurityPolicyViolationEvent>('securitypolicyviolation');
@DomName('Document.selectionchangeEvent')
@DocsEditable
static const EventStreamProvider<Event> selectionChangeEvent = const EventStreamProvider<Event>('selectionchange');
@DomName('Document.webkitpointerlockchangeEvent')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockchange
static const EventStreamProvider<Event> pointerLockChangeEvent = const EventStreamProvider<Event>('webkitpointerlockchange');
@DomName('Document.webkitpointerlockerrorEvent')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockerror
static const EventStreamProvider<Event> pointerLockErrorEvent = const EventStreamProvider<Event>('webkitpointerlockerror');
@JSName('body')
/// Moved to [HtmlDocument].
@DomName('Document.body')
@DocsEditable
Element $dom_body;
@DomName('Document.charset')
@DocsEditable
@deprecated // nonstandard
String charset;
@DomName('Document.childElementCount')
@DocsEditable
final int childElementCount;
@DomName('Document.children')
@DocsEditable
final HtmlCollection children;
@DomName('Document.cookie')
@DocsEditable
String cookie;
WindowBase get window => _convertNativeToDart_Window(this._get_window);
@JSName('defaultView')
@DomName('Document.window')
@DocsEditable
@Experimental // untriaged
@Creates('Window|=Object')
@Returns('Window|=Object')
@Creates('Window|=Object|Null')
@Returns('Window|=Object|Null')
final dynamic _get_window;
@DomName('Document.documentElement')
@DocsEditable
final Element documentElement;
@DomName('Document.domain')
@DocsEditable
final String domain;
@DomName('Document.firstElementChild')
@DocsEditable
final Element firstElementChild;
@DomName('Document.fontloader')
@DocsEditable
// http://www.w3.org/TR/css3-fonts/#document-fontloader
@Experimental
final FontLoader fontloader;
@JSName('head')
/// Moved to [HtmlDocument].
@DomName('Document.head')
@DocsEditable
final HeadElement $dom_head;
@DomName('Document.implementation')
@DocsEditable
final DomImplementation implementation;
@DomName('Document.lastElementChild')
@DocsEditable
final Element lastElementChild;
@JSName('lastModified')
/// Moved to [HtmlDocument].
@DomName('Document.lastModified')
@DocsEditable
final String $dom_lastModified;
@JSName('preferredStylesheetSet')
@DomName('Document.preferredStylesheetSet')
@DocsEditable
final String $dom_preferredStylesheetSet;
@DomName('Document.readyState')
@DocsEditable
final String readyState;
@JSName('referrer')
/// Moved to [HtmlDocument].
@DomName('Document.referrer')
@DocsEditable
final String $dom_referrer;
@DomName('Document.securityPolicy')
@DocsEditable
// https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#idl-def-SecurityPolicy
@Experimental
final SecurityPolicy securityPolicy;
@JSName('selectedStylesheetSet')
@DomName('Document.selectedStylesheetSet')
@DocsEditable
String $dom_selectedStylesheetSet;
@JSName('styleSheets')
/// Moved to [HtmlDocument]
@DomName('Document.styleSheets')
@DocsEditable
@Returns('_StyleSheetList')
@Creates('_StyleSheetList')
final List<StyleSheet> $dom_styleSheets;
@JSName('title')
/// Moved to [HtmlDocument].
@DomName('Document.title')
@DocsEditable
String $dom_title;
@JSName('webkitFullscreenElement')
/// Moved to [HtmlDocument].
@DomName('Document.webkitFullscreenElement')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenelement
final Element $dom_webkitFullscreenElement;
@JSName('webkitFullscreenEnabled')
/// Moved to [HtmlDocument].
@DomName('Document.webkitFullscreenEnabled')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenenabled
final bool $dom_webkitFullscreenEnabled;
@JSName('webkitHidden')
/// Moved to [HtmlDocument].
@DomName('Document.webkitHidden')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#document
final bool $dom_webkitHidden;
@JSName('webkitIsFullScreen')
/// Moved to [HtmlDocument].
@DomName('Document.webkitIsFullScreen')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@deprecated // deprecated
final bool $dom_webkitIsFullScreen;
@JSName('webkitPointerLockElement')
/// Moved to [HtmlDocument].
@DomName('Document.webkitPointerLockElement')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-pointerLockElement
final Element $dom_webkitPointerLockElement;
@JSName('webkitVisibilityState')
@DomName('Document.webkitVisibilityState')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-visibilitystate
final String $dom_webkitVisibilityState;
@JSName('caretRangeFromPoint')
/// Use the [Range] constructor instead.
@DomName('Document.caretRangeFromPoint')
@DocsEditable
// http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint
@Experimental
Range $dom_caretRangeFromPoint(int x, int y) native;
@JSName('createCDATASection')
@DomName('Document.createCDATASection')
@DocsEditable
// http://dom.spec.whatwg.org/#dom-document-createcdatasection
@deprecated // deprecated
CDataSection createCDataSection(String data) native;
@DomName('Document.createDocumentFragment')
@DocsEditable
DocumentFragment createDocumentFragment() native;
@JSName('createElement')
/// Deprecated: use new Element.tag(tagName) instead.
@DomName('Document.createElement')
@DocsEditable
Element $dom_createElement(String localName_OR_tagName, [String typeExtension]) native;
@JSName('createElementNS')
@DomName('Document.createElementNS')
@DocsEditable
Element $dom_createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) native;
@JSName('createEvent')
@DomName('Document.createEvent')
@DocsEditable
Event $dom_createEvent(String eventType) native;
@JSName('createNodeIterator')
@DomName('Document.createNodeIterator')
@DocsEditable
@Unstable
NodeIterator $dom_createNodeIterator(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) native;
@JSName('createRange')
@DomName('Document.createRange')
@DocsEditable
Range $dom_createRange() native;
@JSName('createTextNode')
@DomName('Document.createTextNode')
@DocsEditable
Text $dom_createTextNode(String data) native;
@DomName('Document.createTouch')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
var target_1 = _convertDartToNative_EventTarget(target);
return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
}
@JSName('createTouch')
@DomName('Document.createTouch')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Touch _$dom_createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
@JSName('createTouchList')
/// Use the [TouchList] constructor instead.
@DomName('Document.createTouchList')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
TouchList $dom_createTouchList() native;
@JSName('createTreeWalker')
@DomName('Document.createTreeWalker')
@DocsEditable
TreeWalker $dom_createTreeWalker(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) native;
@JSName('elementFromPoint')
@DomName('Document.elementFromPoint')
@DocsEditable
Element $dom_elementFromPoint(int x, int y) native;
@DomName('Document.execCommand')
@DocsEditable
bool execCommand(String command, bool userInterface, String value) native;
@JSName('getCSSCanvasContext')
/// Moved to [HtmlDocument].
@DomName('Document.getCSSCanvasContext')
@DocsEditable
// https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html
@Experimental // non-standard
CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) native;
@DomName('Document.getElementById')
@DocsEditable
Element getElementById(String elementId) native;
@DomName('Document.getElementsByClassName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByClassName(String tagname) native;
@DomName('Document.getElementsByName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByName(String elementName) native;
@DomName('Document.getElementsByTagName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByTagName(String tagname) native;
@DomName('Document.queryCommandEnabled')
@DocsEditable
bool queryCommandEnabled(String command) native;
@DomName('Document.queryCommandIndeterm')
@DocsEditable
bool queryCommandIndeterm(String command) native;
@DomName('Document.queryCommandState')
@DocsEditable
bool queryCommandState(String command) native;
@DomName('Document.queryCommandSupported')
@DocsEditable
bool queryCommandSupported(String command) native;
@DomName('Document.queryCommandValue')
@DocsEditable
String queryCommandValue(String command) native;
@JSName('querySelector')
/**
* Finds the first descendant element of this document that matches the
* specified group of selectors.
*
* Unless your webpage contains multiple documents, the top-level query
* method behaves the same as this method, so you should use it instead to
* save typing a few characters.
*
* [selectors] should be a string using CSS selector syntax.
* var element1 = document.query('.className');
* var element2 = document.query('#id');
*
* For details about CSS selector syntax, see the
* [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
*/
@DomName('Document.querySelector')
@DocsEditable
Element query(String selectors) native;
@JSName('querySelectorAll')
/// Deprecated: use query("#$elementId") instead.
@DomName('Document.querySelectorAll')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> $dom_querySelectorAll(String selectors) native;
@JSName('webkitCancelFullScreen')
/// Moved to [HtmlDocument].
@DomName('Document.webkitCancelFullScreen')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@deprecated // deprecated
void $dom_webkitCancelFullScreen() native;
@JSName('webkitExitFullscreen')
/// Moved to [HtmlDocument].
@DomName('Document.webkitExitFullscreen')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen
void $dom_webkitExitFullscreen() native;
@JSName('webkitExitPointerLock')
/// Moved to [HtmlDocument].
@DomName('Document.webkitExitPointerLock')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-exitPointerLock-void
void $dom_webkitExitPointerLock() native;
@JSName('webkitGetNamedFlows')
@DomName('Document.webkitGetNamedFlows')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// http://www.w3.org/TR/css3-regions/#dom-named-flow-collection
NamedFlowCollection getNamedFlows() native;
@DomName('Document.webkitRegister')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
CustomElementConstructor register(String name, [Map options]) {
if (options != null) {
var options_1 = convertDartToNative_Dictionary(options);
return _register_1(name, options_1);
}
return _register_2(name);
}
@JSName('webkitRegister')
@DomName('Document.webkitRegister')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
CustomElementConstructor _register_1(name, options) native;
@JSName('webkitRegister')
@DomName('Document.webkitRegister')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
CustomElementConstructor _register_2(name) native;
@DomName('Document.onabort')
@DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
@DomName('Document.onbeforecopy')
@DocsEditable
Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this);
@DomName('Document.onbeforecut')
@DocsEditable
Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this);
@DomName('Document.onbeforepaste')
@DocsEditable
Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this);
@DomName('Document.onblur')
@DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
@DomName('Document.onchange')
@DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
@DomName('Document.onclick')
@DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
@DomName('Document.oncontextmenu')
@DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
@DomName('Document.oncopy')
@DocsEditable
Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
@DomName('Document.oncut')
@DocsEditable
Stream<Event> get onCut => Element.cutEvent.forTarget(this);
@DomName('Document.ondblclick')
@DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
@DomName('Document.ondrag')
@DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
@DomName('Document.ondragend')
@DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
@DomName('Document.ondragenter')
@DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
@DomName('Document.ondragleave')
@DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
@DomName('Document.ondragover')
@DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
@DomName('Document.ondragstart')
@DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
@DomName('Document.ondrop')
@DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
@DomName('Document.onerror')
@DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
@DomName('Document.onfocus')
@DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
@DomName('Document.oninput')
@DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
@DomName('Document.oninvalid')
@DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
@DomName('Document.onkeydown')
@DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
@DomName('Document.onkeypress')
@DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
@DomName('Document.onkeyup')
@DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
@DomName('Document.onload')
@DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
@DomName('Document.onmousedown')
@DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
@DomName('Document.onmousemove')
@DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
@DomName('Document.onmouseout')
@DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
@DomName('Document.onmouseover')
@DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
@DomName('Document.onmouseup')
@DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
@DomName('Document.onmousewheel')
@DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
@DomName('Document.onpaste')
@DocsEditable
Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
@DomName('Document.onreadystatechange')
@DocsEditable
Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
@DomName('Document.onreset')
@DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
@DomName('Document.onscroll')
@DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
@DomName('Document.onsearch')
@DocsEditable
// http://www.w3.org/TR/html-markup/input.search.html
@Experimental
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
@DomName('Document.onsecuritypolicyviolation')
@DocsEditable
// https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#widl-Document-onsecuritypolicyviolation
@Experimental
Stream<SecurityPolicyViolationEvent> get onSecurityPolicyViolation => securityPolicyViolationEvent.forTarget(this);
@DomName('Document.onselect')
@DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
@DomName('Document.onselectionchange')
@DocsEditable
Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this);
@DomName('Document.onselectstart')
@DocsEditable
Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this);
@DomName('Document.onsubmit')
@DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
@DomName('Document.ontouchcancel')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
@DomName('Document.ontouchend')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
@DomName('Document.ontouchmove')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
@DomName('Document.ontouchstart')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
@DomName('Document.onwebkitfullscreenchange')
@DocsEditable
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@Experimental
Stream<Event> get onFullscreenChange => Element.fullscreenChangeEvent.forTarget(this);
@DomName('Document.onwebkitfullscreenerror')
@DocsEditable
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@Experimental
Stream<Event> get onFullscreenError => Element.fullscreenErrorEvent.forTarget(this);
@DomName('Document.onwebkitpointerlockchange')
@DocsEditable
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockchange
@Experimental
Stream<Event> get onPointerLockChange => pointerLockChangeEvent.forTarget(this);
@DomName('Document.onwebkitpointerlockerror')
@DocsEditable
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockerror
@Experimental
Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this);
/**
* Finds all descendant elements of this document that match the specified
* group of selectors.
*
* Unless your webpage contains multiple documents, the top-level queryAll
* method behaves the same as this method, so you should use it instead to
* save typing a few characters.
*
* [selectors] should be a string using CSS selector syntax.
* var items = document.queryAll('.itemClassName');
*
* For details about CSS selector syntax, see the
* [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
*/
ElementList queryAll(String selectors) {
return new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
}
}
Extends
Interceptor > EventTarget > Node > Document
Subclasses
Static Properties
const EventStreamProvider<Event> pointerLockChangeEvent #
static const EventStreamProvider<Event> pointerLockChangeEvent = const EventStreamProvider<Event>('webkitpointerlockchange')
const EventStreamProvider<Event> pointerLockErrorEvent #
static const EventStreamProvider<Event> pointerLockErrorEvent = const EventStreamProvider<Event>('webkitpointerlockerror')
const EventStreamProvider<Event> readyStateChangeEvent #
static const EventStreamProvider<Event> readyStateChangeEvent = const EventStreamProvider<Event>('readystatechange')
const EventStreamProvider<SecurityPolicyViolationEvent> securityPolicyViolationEvent #
static const EventStreamProvider<SecurityPolicyViolationEvent> securityPolicyViolationEvent = const EventStreamProvider<SecurityPolicyViolationEvent>('securitypolicyviolation')
const EventStreamProvider<Event> selectionChangeEvent #
static const EventStreamProvider<Event> selectionChangeEvent = const EventStreamProvider<Event>('selectionchange')
Properties
Element $dom_body #
Moved to HtmlDocument.
Element $dom_body
final HeadElement $dom_head #
Moved to HtmlDocument.
final HeadElement $dom_head
final String $dom_lastModified #
Moved to HtmlDocument.
final String $dom_lastModified
final String $dom_referrer #
Moved to HtmlDocument.
final String $dom_referrer
final List<StyleSheet> $dom_styleSheets #
Moved to HtmlDocument
final List<StyleSheet> $dom_styleSheets
String $dom_title #
Moved to HtmlDocument.
String $dom_title
final Element $dom_webkitFullscreenElement #
Moved to HtmlDocument.
final Element $dom_webkitFullscreenElement
final bool $dom_webkitFullscreenEnabled #
Moved to HtmlDocument.
final bool $dom_webkitFullscreenEnabled
final bool $dom_webkitHidden #
Moved to HtmlDocument.
final bool $dom_webkitHidden
final bool $dom_webkitIsFullScreen #
Moved to HtmlDocument.
final bool $dom_webkitIsFullScreen
final Element $dom_webkitPointerLockElement #
Moved to HtmlDocument.
final Element $dom_webkitPointerLockElement
final HtmlCollection children #
final HtmlCollection children
String cookie #
String cookie
final Element documentElement #
final Element documentElement
final FontLoader fontloader #
final FontLoader fontloader
final int hashCode #
Get a hash code for this object.
All objects have hash codes. Hash codes are guaranteed to be the
same for objects that are equal when compared using the equality
operator ==. Other than that there are no guarantees about
the hash codes. They will not be consistent between runs and
there are no distribution guarantees.
If a subclass overrides hashCode it should override the
equality operator as well to maintain consistency.
int get hashCode => Primitives.objectHashCode(this);
final DomImplementation implementation #
final DomImplementation implementation
List<Node> nodes #
List<Node> get nodes {
return new _ChildNodeListLazy(this);
}
void set nodes(Iterable<Node> value) {
// Copy list first since we don't want liveness during iteration.
// TODO(jacobr): there is a better way to do this.
List copy = new List.from(value);
text = '';
for (Node node in copy) {
append(node);
}
}
final Events on #
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
Events get on => new Events(this);
final Stream<Event> onAbort #
@DomName('Document.onabort')
@DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
final Stream<Event> onBeforeCopy #
@DomName('Document.onbeforecopy')
@DocsEditable
Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this);
final Stream<Event> onBeforeCut #
@DomName('Document.onbeforecut')
@DocsEditable
Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this);
final Stream<Event> onBeforePaste #
@DomName('Document.onbeforepaste')
@DocsEditable
Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this);
final Stream<Event> onBlur #
@DomName('Document.onblur')
@DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
final Stream<Event> onChange #
@DomName('Document.onchange')
@DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
final Stream<MouseEvent> onClick #
@DomName('Document.onclick')
@DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
final Stream<MouseEvent> onContextMenu #
@DomName('Document.oncontextmenu')
@DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
final Stream<Event> onCopy #
@DomName('Document.oncopy')
@DocsEditable
Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
final Stream<Event> onCut #
@DomName('Document.oncut')
@DocsEditable
Stream<Event> get onCut => Element.cutEvent.forTarget(this);
final Stream<Event> onDoubleClick #
@DomName('Document.ondblclick')
@DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
final Stream<MouseEvent> onDrag #
@DomName('Document.ondrag')
@DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
final Stream<MouseEvent> onDragEnd #
@DomName('Document.ondragend')
@DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
final Stream<MouseEvent> onDragEnter #
@DomName('Document.ondragenter')
@DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
final Stream<MouseEvent> onDragLeave #
@DomName('Document.ondragleave')
@DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
final Stream<MouseEvent> onDragOver #
@DomName('Document.ondragover')
@DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
final Stream<MouseEvent> onDragStart #
@DomName('Document.ondragstart')
@DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
final Stream<MouseEvent> onDrop #
@DomName('Document.ondrop')
@DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
final Stream<Event> onError #
@DomName('Document.onerror')
@DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
final Stream<Event> onFocus #
@DomName('Document.onfocus')
@DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
final Stream<Event> onFullscreenChange #
@DomName('Document.onwebkitfullscreenchange')
@DocsEditable
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@Experimental
Stream<Event> get onFullscreenChange => Element.fullscreenChangeEvent.forTarget(this);
final Stream<Event> onFullscreenError #
@DomName('Document.onwebkitfullscreenerror')
@DocsEditable
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@Experimental
Stream<Event> get onFullscreenError => Element.fullscreenErrorEvent.forTarget(this);
final Stream<Event> onInput #
@DomName('Document.oninput')
@DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
final Stream<Event> onInvalid #
@DomName('Document.oninvalid')
@DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
final Stream<KeyboardEvent> onKeyDown #
@DomName('Document.onkeydown')
@DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
final Stream<KeyboardEvent> onKeyPress #
@DomName('Document.onkeypress')
@DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
final Stream<KeyboardEvent> onKeyUp #
@DomName('Document.onkeyup')
@DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
final Stream<Event> onLoad #
@DomName('Document.onload')
@DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
final Stream<MouseEvent> onMouseDown #
@DomName('Document.onmousedown')
@DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
final Stream<MouseEvent> onMouseMove #
@DomName('Document.onmousemove')
@DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
final Stream<MouseEvent> onMouseOut #
@DomName('Document.onmouseout')
@DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
final Stream<MouseEvent> onMouseOver #
@DomName('Document.onmouseover')
@DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
final Stream<MouseEvent> onMouseUp #
@DomName('Document.onmouseup')
@DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
final Stream<WheelEvent> onMouseWheel #
@DomName('Document.onmousewheel')
@DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
final Stream<Event> onPaste #
@DomName('Document.onpaste')
@DocsEditable
Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
final Stream<Event> onPointerLockChange #
@DomName('Document.onwebkitpointerlockchange')
@DocsEditable
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockchange
@Experimental
Stream<Event> get onPointerLockChange => pointerLockChangeEvent.forTarget(this);
final Stream<Event> onPointerLockError #
@DomName('Document.onwebkitpointerlockerror')
@DocsEditable
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-onpointerlockerror
@Experimental
Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this);
final Stream<Event> onReadyStateChange #
- Returns the event handling code for the
readystatechangeevent.
Starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6)
, you can now use the syntax if ("onabort" in document) to determine whether or not a given event handler property exists. This is because event handler interfaces have been updated to be proper web IDL interfaces. See DOM event handlers for details.
@DomName('Document.onreadystatechange')
@DocsEditable
Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
final Stream<Event> onReset #
@DomName('Document.onreset')
@DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
final Stream<Event> onScroll #
@DomName('Document.onscroll')
@DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
final Stream<Event> onSearch #
@DomName('Document.onsearch')
@DocsEditable
// http://www.w3.org/TR/html-markup/input.search.html
@Experimental
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
final Stream<SecurityPolicyViolationEvent> onSecurityPolicyViolation #
@DomName('Document.onsecuritypolicyviolation')
@DocsEditable
// https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#widl-Document-onsecuritypolicyviolation
@Experimental
Stream<SecurityPolicyViolationEvent> get onSecurityPolicyViolation => securityPolicyViolationEvent.forTarget(this);
final Stream<Event> onSelect #
@DomName('Document.onselect')
@DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
final Stream<Event> onSelectionChange #
@DomName('Document.onselectionchange')
@DocsEditable
Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this);
final Stream<Event> onSelectStart #
@DomName('Document.onselectstart')
@DocsEditable
Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this);
final Stream<Event> onSubmit #
@DomName('Document.onsubmit')
@DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
final Stream<TouchEvent> onTouchCancel #
@DomName('Document.ontouchcancel')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
final Stream<TouchEvent> onTouchEnd #
@DomName('Document.ontouchend')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
final Stream<TouchEvent> onTouchMove #
@DomName('Document.ontouchmove')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
final Stream<TouchEvent> onTouchStart #
@DomName('Document.ontouchstart')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
final Type runtimeType #
A representation of the runtime type of the object.
Type get runtimeType => getRuntimeType(this);
final SecurityPolicy securityPolicy #
final SecurityPolicy securityPolicy
final TemplateInstance templateInstance #
Gets the template instance that instantiated this node, if any.
@Experimental TemplateInstance get templateInstance => _templateInstance != null ? _templateInstance : (parent != null ? parent.templateInstance : null);
final WindowBase window #
WindowBase get window => _convertNativeToDart_Window(this._get_window);
Operators
bool operator ==(other) #
The equality operator.
The default behavior for all Objects is to return true if and
only if this and
other are the same object.
If a subclass overrides the equality operator it should override
the hashCode method as well to maintain consistency.
bool operator ==(other) => identical(this, other);
Methods
Node append(Node newChild) #
Adds a node to the end of the child nodes list of this node.
If the node already exists in this document, it will be removed from its current parent node, then added to this node.
This method is more efficient than nodes.add, and is the preferred
way of appending a child node.
@JSName('appendChild')
/**
* Adds a node to the end of the child [nodes] list of this node.
*
* If the node already exists in this document, it will be removed from its
* current parent node, then added to this node.
*
* This method is more efficient than `nodes.add`, and is the preferred
* way of appending a child node.
*/
@DomName('Node.appendChild')
@DocsEditable
Node append(Node newChild) native;
void bind(String name, model, String path) #
Binds the attribute
name to the
path of the
model.
Path is a String of accessors such as foo.bar.baz.
@Experimental
void bind(String name, model, String path) {
// TODO(jmesserly): should we throw instead?
window.console.error('Unhandled binding to Node: '
'$this $name $model $path');
}
Node clone(bool deep) #
@JSName('cloneNode')
@DomName('Node.cloneNode')
@DocsEditable
Node clone(bool deep) native;
bool contains(Node other) #
@DomName('Node.contains')
@DocsEditable
bool contains(Node other) native;
CDataSection createCDataSection(String data) #
@JSName('createCDATASection')
@DomName('Document.createCDATASection')
@DocsEditable
// http://dom.spec.whatwg.org/#dom-document-createcdatasection
@deprecated // deprecated
CDataSection createCDataSection(String data) native;
DocumentFragment createDocumentFragment() #
@DomName('Document.createDocumentFragment')
@DocsEditable
DocumentFragment createDocumentFragment() native;
bool dispatchEvent(Event event) #
@DomName('Node.dispatchEvent')
@DocsEditable
bool dispatchEvent(Event event) native;
Element getElementById(String elementId) #
@DomName('Document.getElementById')
@DocsEditable
Element getElementById(String elementId) native;
List<Node> getElementsByClassName(String tagname) #
@DomName('Document.getElementsByClassName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByClassName(String tagname) native;
List<Node> getElementsByName(String elementName) #
@DomName('Document.getElementsByName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByName(String elementName) native;
List<Node> getElementsByTagName(String tagname) #
@DomName('Document.getElementsByTagName')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> getElementsByTagName(String tagname) native;
NamedFlowCollection getNamedFlows() #
@JSName('webkitGetNamedFlows')
@DomName('Document.webkitGetNamedFlows')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// http://www.w3.org/TR/css3-regions/#dom-named-flow-collection
NamedFlowCollection getNamedFlows() native;
bool hasChildNodes() #
@DomName('Node.hasChildNodes')
@DocsEditable
bool hasChildNodes() native;
Node insertAllBefore(Iterable<Node> newNodes, Node refChild) #
Inserts all of the nodes into this node directly before refChild.
See also:
insertBefore
Node insertAllBefore(Iterable<Node> newNodes, Node refChild) {
if (newNodes is _ChildNodeListLazy) {
_ChildNodeListLazy otherList = newNodes;
if (identical(otherList._this, this)) {
throw new ArgumentError(newNodes);
}
// Optimized route for copying between nodes.
for (var i = 0, len = otherList.length; i < len; ++i) {
// Should use $dom_firstChild, Bug 8886.
this.insertBefore(otherList[0], refChild);
}
} else {
for (var node in newNodes) {
this.insertBefore(node, refChild);
}
}
}
Node insertBefore(Node newChild, Node refChild) #
@DomName('Node.insertBefore')
@DocsEditable
Node insertBefore(Node newChild, Node refChild) native;
dynamic noSuchMethod(Invocation invocation) #
noSuchMethod is invoked when users invoke a non-existant method
on an object. The name of the method and the arguments of the
invocation are passed to noSuchMethod in an Invocation.
If noSuchMethod returns a value, that value becomes the result of
the original invocation.
The default behavior of noSuchMethod is to throw a
noSuchMethodError.
dynamic noSuchMethod(Invocation invocation) {
throw new NoSuchMethodError(
this,
_symbolToString(invocation.memberName),
invocation.positionalArguments,
_symbolMapToStringMap(invocation.namedArguments));
}
Element query(String selectors) #
Finds the first descendant element of this document that matches the specified group of selectors.
Unless your webpage contains multiple documents, the top-level query method behaves the same as this method, so you should use it instead to save typing a few characters.
selectors should be a string using CSS selector syntax.
var element1 = document.query('.className');
var element2 = document.query('#id');
For details about CSS selector syntax, see the CSS selector specification.
@JSName('querySelector')
/**
* Finds the first descendant element of this document that matches the
* specified group of selectors.
*
* Unless your webpage contains multiple documents, the top-level query
* method behaves the same as this method, so you should use it instead to
* save typing a few characters.
*
* [selectors] should be a string using CSS selector syntax.
* var element1 = document.query('.className');
* var element2 = document.query('#id');
*
* For details about CSS selector syntax, see the
* [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
*/
@DomName('Document.querySelector')
@DocsEditable
Element query(String selectors) native;
ElementList queryAll(String selectors) #
Finds all descendant elements of this document that match the specified group of selectors.
Unless your webpage contains multiple documents, the top-level queryAll method behaves the same as this method, so you should use it instead to save typing a few characters.
selectors should be a string using CSS selector syntax.
var items = document.queryAll('.itemClassName');
For details about CSS selector syntax, see the CSS selector specification.
ElementList queryAll(String selectors) {
return new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
}
bool queryCommandSupported(String command) #
@DomName('Document.queryCommandSupported')
@DocsEditable
bool queryCommandSupported(String command) native;
CustomElementConstructor register(String name, [Map options]) #
@DomName('Document.webkitRegister')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
CustomElementConstructor register(String name, [Map options]) {
if (options != null) {
var options_1 = convertDartToNative_Dictionary(options);
return _register_1(name, options_1);
}
return _register_2(name);
}
void remove() #
Removes this node from the DOM.
@DomName('Node.removeChild')
void remove() {
// TODO(jacobr): should we throw an exception if parent is already null?
// TODO(vsm): Use the native remove when available.
if (this.parentNode != null) {
final Node parent = this.parentNode;
parentNode.$dom_removeChild(this);
}
}
Node replaceWith(Node otherNode) #
Replaces this node with another node.
@DomName('Node.replaceChild')
Node replaceWith(Node otherNode) {
try {
final Node parent = this.parentNode;
parent.$dom_replaceChild(otherNode, this);
} catch (e) {
};
return this;
}
String toString() #
Print out a String representation of this Node.
String toString() => nodeValue == null ? super.toString() : nodeValue;
void unbind(String name) #
Unbinds the attribute name.
@Experimental
void unbind(String name) {}
void unbindAll() #
Unbinds all bound attributes.
@Experimental
void unbindAll() {}
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) #
@JSName('addEventListener')
@DomName('Node.addEventListener')
@DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
Range $dom_caretRangeFromPoint(int x, int y) #
Use the Range constructor instead.
@JSName('caretRangeFromPoint')
/// Use the [Range] constructor instead.
@DomName('Document.caretRangeFromPoint')
@DocsEditable
// http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint
@Experimental
Range $dom_caretRangeFromPoint(int x, int y) native;
Element $dom_createElement(String localName_OR_tagName, [String typeExtension]) #
Deprecated: use new Element.tag(tagName) instead.
@JSName('createElement')
/// Deprecated: use new Element.tag(tagName) instead.
@DomName('Document.createElement')
@DocsEditable
Element $dom_createElement(String localName_OR_tagName, [String typeExtension]) native;
Element $dom_createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) #
@JSName('createElementNS')
@DomName('Document.createElementNS')
@DocsEditable
Element $dom_createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) native;
Event $dom_createEvent(String eventType) #
@JSName('createEvent')
@DomName('Document.createEvent')
@DocsEditable
Event $dom_createEvent(String eventType) native;
NodeIterator $dom_createNodeIterator(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) #
@JSName('createNodeIterator')
@DomName('Document.createNodeIterator')
@DocsEditable
@Unstable
NodeIterator $dom_createNodeIterator(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) native;
Range $dom_createRange() #
@JSName('createRange')
@DomName('Document.createRange')
@DocsEditable
Range $dom_createRange() native;
Text $dom_createTextNode(String data) #
@JSName('createTextNode')
@DomName('Document.createTextNode')
@DocsEditable
Text $dom_createTextNode(String data) native;
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) #
@DomName('Document.createTouch')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
var target_1 = _convertDartToNative_EventTarget(target);
return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
}
TouchList $dom_createTouchList() #
Use the TouchList constructor instead.
@JSName('createTouchList')
/// Use the [TouchList] constructor instead.
@DomName('Document.createTouchList')
@DocsEditable
// http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
@Experimental
TouchList $dom_createTouchList() native;
TreeWalker $dom_createTreeWalker(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) #
treeWalker
object.
@JSName('createTreeWalker')
@DomName('Document.createTreeWalker')
@DocsEditable
TreeWalker $dom_createTreeWalker(Node root, int whatToShow, NodeFilter filter, bool expandEntityReferences) native;
Element $dom_elementFromPoint(int x, int y) #
@JSName('elementFromPoint')
@DomName('Document.elementFromPoint')
@DocsEditable
Element $dom_elementFromPoint(int x, int y) native;
CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) #
Moved to HtmlDocument.
@JSName('getCSSCanvasContext')
/// Moved to [HtmlDocument].
@DomName('Document.getCSSCanvasContext')
@DocsEditable
// https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html
@Experimental // non-standard
CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) native;
List<Node> $dom_querySelectorAll(String selectors) #
Deprecated: use query("#$elementId") instead.
@JSName('querySelectorAll')
/// Deprecated: use query("#$elementId") instead.
@DomName('Document.querySelectorAll')
@DocsEditable
@Returns('NodeList')
@Creates('NodeList')
List<Node> $dom_querySelectorAll(String selectors) native;
Node $dom_removeChild(Node oldChild) #
@JSName('removeChild')
@DomName('Node.removeChild')
@DocsEditable
Node $dom_removeChild(Node oldChild) native;
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) #
@JSName('removeEventListener')
@DomName('Node.removeEventListener')
@DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
Node $dom_replaceChild(Node newChild, Node oldChild) #
@JSName('replaceChild')
@DomName('Node.replaceChild')
@DocsEditable
Node $dom_replaceChild(Node newChild, Node oldChild) native;
void $dom_webkitCancelFullScreen() #
Moved to HtmlDocument.
@JSName('webkitCancelFullScreen')
/// Moved to [HtmlDocument].
@DomName('Document.webkitCancelFullScreen')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
@deprecated // deprecated
void $dom_webkitCancelFullScreen() native;
void $dom_webkitExitFullscreen() #
Moved to HtmlDocument.
@JSName('webkitExitFullscreen')
/// Moved to [HtmlDocument].
@DomName('Document.webkitExitFullscreen')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen
void $dom_webkitExitFullscreen() native;
void $dom_webkitExitPointerLock() #
Moved to HtmlDocument.
@JSName('webkitExitPointerLock')
/// Moved to [HtmlDocument].
@DomName('Document.webkitExitPointerLock')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#widl-Document-exitPointerLock-void
void $dom_webkitExitPointerLock() native;
This page includes content from the
Mozilla Foundation that is graciously
licensed under a
Creative Commons: Attribution-Sharealike license.
Mozilla has no other association with Dart or dartlang.org. We
encourage you to improve the web by
contributing to
The Mozilla Developer Network.