From dca685525ef402c776fa5be9d1b8ae760b8e8d64 Mon Sep 17 00:00:00 2001 From: Vijay Menon Date: Tue, 15 Dec 2015 13:08:17 -0800 Subject: [PATCH] First cut of mini dart:html. This gets us going on Angular. Note, this is auto-generated from my hacked up versions of the dom scripts. Still tackling the long tail of sdk errors. R=jmesserly@google.com, leafp@google.com Review URL: https://codereview.chromium.org/1528613004 . --- lib/runtime/dart/_metadata.js | 59 + lib/runtime/dart/html.js | 12706 ++++++++++ lib/runtime/dart/html_common.js | 969 + lib/runtime/dart/js.js | 13 +- lib/src/codegen/js_codegen.dart | 3 + lib/src/compiler.dart | 16 +- test/codegen/expect/html_input.html | 3 + test/codegen/expect/sunflower/sunflower.html | 3 + tool/build_sdk.sh | 2 +- tool/input_sdk/lib/_internal/libraries.dart | 36 +- tool/input_sdk/lib/html/ddc/html_ddc.dart | 19578 ++++++++++++++++ .../lib/html/html_common/conversions.dart | 369 + .../html/html_common/conversions_dart2js.dart | 99 + .../lib/html/html_common/css_class_set.dart | 244 + .../lib/html/html_common/device.dart | 112 + .../html_common/filtered_element_list.dart | 154 + .../lib/html/html_common/html_common.dart | 24 + .../lib/html/html_common/html_common_ddc.dart | 26 + .../input_sdk/lib/html/html_common/lists.dart | 75 + .../lib/html/html_common/metadata.dart | 74 + tool/input_sdk/lib/js/dart2js/js_dart2js.dart | 10 +- tool/sdk_expected_errors.txt | 95 +- 22 files changed, 34633 insertions(+), 37 deletions(-) create mode 100644 lib/runtime/dart/_metadata.js create mode 100644 lib/runtime/dart/html.js create mode 100644 lib/runtime/dart/html_common.js create mode 100644 tool/input_sdk/lib/html/ddc/html_ddc.dart create mode 100644 tool/input_sdk/lib/html/html_common/conversions.dart create mode 100644 tool/input_sdk/lib/html/html_common/conversions_dart2js.dart create mode 100644 tool/input_sdk/lib/html/html_common/css_class_set.dart create mode 100644 tool/input_sdk/lib/html/html_common/device.dart create mode 100644 tool/input_sdk/lib/html/html_common/filtered_element_list.dart create mode 100644 tool/input_sdk/lib/html/html_common/html_common.dart create mode 100644 tool/input_sdk/lib/html/html_common/html_common_ddc.dart create mode 100644 tool/input_sdk/lib/html/html_common/lists.dart create mode 100644 tool/input_sdk/lib/html/html_common/metadata.dart diff --git a/lib/runtime/dart/_metadata.js b/lib/runtime/dart/_metadata.js new file mode 100644 index 00000000..ce736a3b --- /dev/null +++ b/lib/runtime/dart/_metadata.js @@ -0,0 +1,59 @@ +dart_library.library('dart/_metadata', null, /* Imports */[ + "dart/_runtime", + 'dart/core' +], /* Lazy imports */[ +], function(exports, dart, core) { + 'use strict'; + let dartx = dart.dartx; + class SupportedBrowser extends core.Object { + SupportedBrowser(browserName, minimumVersion) { + if (minimumVersion === void 0) + minimumVersion = null; + this.browserName = browserName; + this.minimumVersion = minimumVersion; + } + } + dart.setSignature(SupportedBrowser, { + constructors: () => ({SupportedBrowser: [SupportedBrowser, [core.String], [core.String]]}) + }); + SupportedBrowser.CHROME = "Chrome"; + SupportedBrowser.FIREFOX = "Firefox"; + SupportedBrowser.IE = "Internet Explorer"; + SupportedBrowser.OPERA = "Opera"; + SupportedBrowser.SAFARI = "Safari"; + class Experimental extends core.Object { + Experimental() { + } + } + dart.setSignature(Experimental, { + constructors: () => ({Experimental: [Experimental, []]}) + }); + class DomName extends core.Object { + DomName(name) { + this.name = name; + } + } + dart.setSignature(DomName, { + constructors: () => ({DomName: [DomName, [core.String]]}) + }); + class DocsEditable extends core.Object { + DocsEditable() { + } + } + dart.setSignature(DocsEditable, { + constructors: () => ({DocsEditable: [DocsEditable, []]}) + }); + class Unstable extends core.Object { + Unstable() { + } + } + dart.setSignature(Unstable, { + constructors: () => ({Unstable: [Unstable, []]}) + }); + // Exports: + exports.SupportedBrowser = SupportedBrowser; + exports.Experimental = Experimental; + exports.DomName = DomName; + exports.DocsEditable = DocsEditable; + exports.Unstable = Unstable; +}); diff --git a/lib/runtime/dart/html.js b/lib/runtime/dart/html.js new file mode 100644 index 00000000..f8b5a06a --- /dev/null +++ b/lib/runtime/dart/html.js @@ -0,0 +1,12706 @@ +dart_library.library('dart/html', null, /* Imports */[ + "dart/_runtime", + 'dart/math', + 'dart/core', + 'dart/_js_helper', + 'dart/async', + 'dart/collection', + 'dart/_foreign_helper', + 'dart/isolate' +], /* Lazy imports */[ + 'dart/_metadata', + 'dart/html_common' +], function(exports, dart, math, core, _js_helper, async, collection, _foreign_helper, isolate, _metadata, html_common) { + 'use strict'; + let dartx = dart.dartx; + dart.export_(exports, math, ['Rectangle', 'Point'], []); + class DartHtmlDomObject extends core.Object { + DartHtmlDomObject() { + this.raw = null; + } + internal_() { + this.raw = null; + } + } + dart.defineNamedConstructor(DartHtmlDomObject, 'internal_'); + dart.setSignature(DartHtmlDomObject, { + constructors: () => ({ + DartHtmlDomObject: [DartHtmlDomObject, []], + internal_: [DartHtmlDomObject, []] + }) + }); + const _addEventListener = Symbol('_addEventListener'); + const _removeEventListener = Symbol('_removeEventListener'); + const _addEventListener_1 = Symbol('_addEventListener_1'); + const _addEventListener_2 = Symbol('_addEventListener_2'); + const _addEventListener_3 = Symbol('_addEventListener_3'); + const _addEventListener_4 = Symbol('_addEventListener_4'); + const _dispatchEvent_1 = Symbol('_dispatchEvent_1'); + const _removeEventListener_1 = Symbol('_removeEventListener_1'); + const _removeEventListener_2 = Symbol('_removeEventListener_2'); + const _removeEventListener_3 = Symbol('_removeEventListener_3'); + const _removeEventListener_4 = Symbol('_removeEventListener_4'); + class EventTarget extends DartHtmlDomObject { + _created() { + super.DartHtmlDomObject(); + } + get on() { + return new Events(this); + } + addEventListener(type, listener, useCapture) { + if (useCapture === void 0) + useCapture = null; + if (listener != null) { + this[_addEventListener](type, listener, useCapture); + } + } + removeEventListener(type, listener, useCapture) { + if (useCapture === void 0) + useCapture = null; + if (listener != null) { + this[_removeEventListener](type, listener, useCapture); + } + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateEventTarget() { + return new EventTarget.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + [_addEventListener](type, listener, useCapture) { + if (type === void 0) + type = null; + if (listener === void 0) + listener = null; + if (useCapture === void 0) + useCapture = null; + if (useCapture != null) { + this[_addEventListener_1](type, listener, useCapture); + return; + } + if (listener != null) { + this[_addEventListener_2](type, listener); + return; + } + if (type != null) { + this[_addEventListener_3](type); + return; + } + this[_addEventListener_4](); + return; + } + [_addEventListener_1](type, listener, useCapture) { + return wrap_jso(this.raw.addEventListener(unwrap_jso(type), unwrap_jso(listener), unwrap_jso(useCapture))); + } + [_addEventListener_2](type, listener) { + return wrap_jso(this.raw.addEventListener(unwrap_jso(type), unwrap_jso(listener))); + } + [_addEventListener_3](type) { + return wrap_jso(this.raw.addEventListener(unwrap_jso(type))); + } + [_addEventListener_4]() { + return wrap_jso(this.raw.addEventListener()); + } + dispatchEvent(event) { + return this[_dispatchEvent_1](event); + } + [_dispatchEvent_1](event) { + return dart.as(wrap_jso(this.raw.dispatchEvent(unwrap_jso(event))), core.bool); + } + [_removeEventListener](type, listener, useCapture) { + if (type === void 0) + type = null; + if (listener === void 0) + listener = null; + if (useCapture === void 0) + useCapture = null; + if (useCapture != null) { + this[_removeEventListener_1](type, listener, useCapture); + return; + } + if (listener != null) { + this[_removeEventListener_2](type, listener); + return; + } + if (type != null) { + this[_removeEventListener_3](type); + return; + } + this[_removeEventListener_4](); + return; + } + [_removeEventListener_1](type, listener, useCapture) { + return wrap_jso(this.raw.removeEventListener(unwrap_jso(type), unwrap_jso(listener), unwrap_jso(useCapture))); + } + [_removeEventListener_2](type, listener) { + return wrap_jso(this.raw.removeEventListener(unwrap_jso(type), unwrap_jso(listener))); + } + [_removeEventListener_3](type) { + return wrap_jso(this.raw.removeEventListener(unwrap_jso(type))); + } + [_removeEventListener_4]() { + return wrap_jso(this.raw.removeEventListener()); + } + } + dart.defineNamedConstructor(EventTarget, '_created'); + dart.defineNamedConstructor(EventTarget, 'internal_'); + dart.setSignature(EventTarget, { + constructors: () => ({ + _created: [EventTarget, []], + _: [EventTarget, []], + internal_: [EventTarget, []] + }), + methods: () => ({ + addEventListener: [dart.void, [core.String, EventListener], [core.bool]], + removeEventListener: [dart.void, [core.String, EventListener], [core.bool]], + [_addEventListener]: [dart.void, [], [core.String, EventListener, core.bool]], + [_addEventListener_1]: [dart.void, [dart.dynamic, EventListener, dart.dynamic]], + [_addEventListener_2]: [dart.void, [dart.dynamic, EventListener]], + [_addEventListener_3]: [dart.void, [dart.dynamic]], + [_addEventListener_4]: [dart.void, []], + dispatchEvent: [core.bool, [Event]], + [_dispatchEvent_1]: [core.bool, [Event]], + [_removeEventListener]: [dart.void, [], [core.String, EventListener, core.bool]], + [_removeEventListener_1]: [dart.void, [dart.dynamic, EventListener, dart.dynamic]], + [_removeEventListener_2]: [dart.void, [dart.dynamic, EventListener]], + [_removeEventListener_3]: [dart.void, [dart.dynamic]], + [_removeEventListener_4]: [dart.void, []] + }), + statics: () => ({internalCreateEventTarget: [EventTarget, []]}), + names: ['internalCreateEventTarget'] + }); + EventTarget[dart.metadata] = () => [dart.const(new _metadata.DomName('EventTarget')), dart.const(new _js_helper.Native("EventTarget"))]; + const _removeChild = Symbol('_removeChild'); + const _replaceChild = Symbol('_replaceChild'); + const _this = Symbol('_this'); + const _clearChildren = Symbol('_clearChildren'); + const _localName = Symbol('_localName'); + const _namespaceUri = Symbol('_namespaceUri'); + const _append_1 = Symbol('_append_1'); + const _clone_1 = Symbol('_clone_1'); + const _contains_1 = Symbol('_contains_1'); + const _hasChildNodes_1 = Symbol('_hasChildNodes_1'); + const _insertBefore_1 = Symbol('_insertBefore_1'); + const _removeChild_1 = Symbol('_removeChild_1'); + const _replaceChild_1 = Symbol('_replaceChild_1'); + class Node extends EventTarget { + _created() { + super._created(); + } + get nodes() { + return new _ChildNodeListLazy(this); + } + set nodes(value) { + let copy = core.List.from(value); + this.text = ''; + for (let node of dart.as(copy, core.Iterable$(Node))) { + this.append(node); + } + } + remove() { + if (this.parentNode != null) { + let parent = this.parentNode; + this.parentNode[_removeChild](this); + } + } + replaceWith(otherNode) { + try { + let parent = this.parentNode; + parent[_replaceChild](otherNode, this); + } catch (e) { + } + + ; + return this; + } + insertAllBefore(newNodes, refChild) { + if (dart.is(newNodes, _ChildNodeListLazy)) { + let otherList = newNodes; + if (dart.notNull(core.identical(otherList[_this], this))) { + dart.throw(new core.ArgumentError(newNodes)); + } + for (let i = 0, len = otherList.length; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1) { + this.insertBefore(otherList[_this].firstChild, refChild); + } + } else { + for (let node of newNodes) { + this.insertBefore(node, refChild); + } + } + } + [_clearChildren]() { + while (this.firstChild != null) { + this[_removeChild](this.firstChild); + } + } + toString() { + let value = this.nodeValue; + return value == null ? super.toString() : value; + } + get childNodes() { + return dart.as(wrap_jso(this.raw.childNodes), core.List$(Node)); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateNode() { + return new Node.internal_(); + } + internal_() { + super.internal_(); + } + get baseUri() { + return dart.as(wrap_jso(this.raw.baseURI), core.String); + } + get firstChild() { + return dart.as(wrap_jso(this.raw.firstChild), Node); + } + get lastChild() { + return dart.as(wrap_jso(this.raw.lastChild), Node); + } + get [_localName]() { + return dart.as(wrap_jso(this.raw.localName), core.String); + } + get [_namespaceUri]() { + return dart.as(wrap_jso(this.raw.namespaceURI), core.String); + } + get nextNode() { + return dart.as(wrap_jso(this.raw.nextSibling), Node); + } + get nodeName() { + return dart.as(wrap_jso(this.raw.nodeName), core.String); + } + get nodeType() { + return dart.as(wrap_jso(this.raw.nodeType), core.int); + } + get nodeValue() { + return dart.as(wrap_jso(this.raw.nodeValue), core.String); + } + get ownerDocument() { + return dart.as(wrap_jso(this.raw.ownerDocument), Document); + } + get parent() { + return dart.as(wrap_jso(this.raw.parentElement), Element); + } + get parentNode() { + return dart.as(wrap_jso(this.raw.parentNode), Node); + } + get previousNode() { + return dart.as(wrap_jso(this.raw.previousSibling), Node); + } + get text() { + return dart.as(wrap_jso(this.raw.textContent), core.String); + } + set text(val) { + return this.raw.textContent = unwrap_jso(val); + } + append(newChild) { + return this[_append_1](newChild); + } + [_append_1](newChild) { + return dart.as(wrap_jso(this.raw.appendChild(unwrap_jso(newChild))), Node); + } + clone(deep) { + return this[_clone_1](deep); + } + [_clone_1](deep) { + return dart.as(wrap_jso(this.raw.cloneNode(unwrap_jso(deep))), Node); + } + contains(other) { + return this[_contains_1](other); + } + [_contains_1](other) { + return dart.as(wrap_jso(this.raw.contains(unwrap_jso(other))), core.bool); + } + hasChildNodes() { + return this[_hasChildNodes_1](); + } + [_hasChildNodes_1]() { + return dart.as(wrap_jso(this.raw.hasChildNodes()), core.bool); + } + insertBefore(newChild, refChild) { + return this[_insertBefore_1](newChild, refChild); + } + [_insertBefore_1](newChild, refChild) { + return dart.as(wrap_jso(this.raw.insertBefore(unwrap_jso(newChild), unwrap_jso(refChild))), Node); + } + [_removeChild](oldChild) { + return this[_removeChild_1](oldChild); + } + [_removeChild_1](oldChild) { + return dart.as(wrap_jso(this.raw.removeChild(unwrap_jso(oldChild))), Node); + } + [_replaceChild](newChild, oldChild) { + return this[_replaceChild_1](newChild, oldChild); + } + [_replaceChild_1](newChild, oldChild) { + return dart.as(wrap_jso(this.raw.replaceChild(unwrap_jso(newChild), unwrap_jso(oldChild))), Node); + } + } + dart.defineNamedConstructor(Node, '_created'); + dart.defineNamedConstructor(Node, 'internal_'); + dart.setSignature(Node, { + constructors: () => ({ + _created: [Node, []], + _: [Node, []], + internal_: [Node, []] + }), + methods: () => ({ + remove: [dart.void, []], + replaceWith: [Node, [Node]], + insertAllBefore: [Node, [core.Iterable$(Node), Node]], + [_clearChildren]: [dart.void, []], + append: [Node, [Node]], + [_append_1]: [Node, [Node]], + clone: [Node, [core.bool]], + [_clone_1]: [Node, [dart.dynamic]], + contains: [core.bool, [Node]], + [_contains_1]: [core.bool, [Node]], + hasChildNodes: [core.bool, []], + [_hasChildNodes_1]: [core.bool, []], + insertBefore: [Node, [Node, Node]], + [_insertBefore_1]: [Node, [Node, Node]], + [_removeChild]: [Node, [Node]], + [_removeChild_1]: [Node, [Node]], + [_replaceChild]: [Node, [Node, Node]], + [_replaceChild_1]: [Node, [Node, Node]] + }), + statics: () => ({internalCreateNode: [Node, []]}), + names: ['internalCreateNode'] + }); + Node[dart.metadata] = () => [dart.const(new _metadata.DomName('Node')), dart.const(new _js_helper.Native("Node"))]; + const _xtag = Symbol('_xtag'); + const _querySelectorAll = Symbol('_querySelectorAll'); + const _getComputedStyle = Symbol('_getComputedStyle'); + const _scrollIntoView = Symbol('_scrollIntoView'); + const _scrollIntoViewIfNeeded = Symbol('_scrollIntoViewIfNeeded'); + const _insertAdjacentHtml = Symbol('_insertAdjacentHtml'); + const _insertAdjacentNode = Symbol('_insertAdjacentNode'); + const _canBeUsedToCreateContextualFragment = Symbol('_canBeUsedToCreateContextualFragment'); + const _innerHtml = Symbol('_innerHtml'); + const _cannotBeUsedToCreateContextualFragment = Symbol('_cannotBeUsedToCreateContextualFragment'); + const _click_1 = Symbol('_click_1'); + const _attributes = Symbol('_attributes'); + const _clientHeight = Symbol('_clientHeight'); + const _clientLeft = Symbol('_clientLeft'); + const _clientTop = Symbol('_clientTop'); + const _clientWidth = Symbol('_clientWidth'); + const _offsetHeight = Symbol('_offsetHeight'); + const _offsetLeft = Symbol('_offsetLeft'); + const _offsetTop = Symbol('_offsetTop'); + const _offsetWidth = Symbol('_offsetWidth'); + const _scrollHeight = Symbol('_scrollHeight'); + const _scrollLeft = Symbol('_scrollLeft'); + const _scrollTop = Symbol('_scrollTop'); + const _scrollWidth = Symbol('_scrollWidth'); + const _blur_1 = Symbol('_blur_1'); + const _focus_1 = Symbol('_focus_1'); + const _getAttribute_1 = Symbol('_getAttribute_1'); + const _getAttributeNS_1 = Symbol('_getAttributeNS_1'); + const _getBoundingClientRect_1 = Symbol('_getBoundingClientRect_1'); + const _getDestinationInsertionPoints_1 = Symbol('_getDestinationInsertionPoints_1'); + const _getElementsByClassName_1 = Symbol('_getElementsByClassName_1'); + const _getElementsByTagName_1 = Symbol('_getElementsByTagName_1'); + const _getElementsByTagName = Symbol('_getElementsByTagName'); + const _hasAttribute_1 = Symbol('_hasAttribute_1'); + const _hasAttribute = Symbol('_hasAttribute'); + const _hasAttributeNS_1 = Symbol('_hasAttributeNS_1'); + const _hasAttributeNS = Symbol('_hasAttributeNS'); + const _removeAttribute_1 = Symbol('_removeAttribute_1'); + const _removeAttribute = Symbol('_removeAttribute'); + const _removeAttributeNS_1 = Symbol('_removeAttributeNS_1'); + const _removeAttributeNS = Symbol('_removeAttributeNS'); + const _requestFullscreen_1 = Symbol('_requestFullscreen_1'); + const _requestPointerLock_1 = Symbol('_requestPointerLock_1'); + const _scrollIntoView_1 = Symbol('_scrollIntoView_1'); + const _scrollIntoView_2 = Symbol('_scrollIntoView_2'); + const _scrollIntoViewIfNeeded_1 = Symbol('_scrollIntoViewIfNeeded_1'); + const _scrollIntoViewIfNeeded_2 = Symbol('_scrollIntoViewIfNeeded_2'); + const _setAttribute_1 = Symbol('_setAttribute_1'); + const _setAttributeNS_1 = Symbol('_setAttributeNS_1'); + const _childElementCount = Symbol('_childElementCount'); + const _children = Symbol('_children'); + const _firstElementChild = Symbol('_firstElementChild'); + const _lastElementChild = Symbol('_lastElementChild'); + const _querySelector_1 = Symbol('_querySelector_1'); + const _querySelectorAll_1 = Symbol('_querySelectorAll_1'); + class Element extends Node { + static html(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + let fragment = exports.document.body.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer}); + return dart.as(fragment.nodes[dartx.where](dart.fn(e => dart.is(e, Element), core.bool, [dart.dynamic]))[dartx.single], Element); + } + created() { + this[_xtag] = null; + super._created(); + } + static tag(tag, typeExtention) { + if (typeExtention === void 0) + typeExtention = null; + return _ElementFactoryProvider.createElement_tag(tag, typeExtention); + } + static a() { + return Element.tag('a'); + } + static article() { + return Element.tag('article'); + } + static aside() { + return Element.tag('aside'); + } + static audio() { + return Element.tag('audio'); + } + static br() { + return Element.tag('br'); + } + static canvas() { + return Element.tag('canvas'); + } + static div() { + return Element.tag('div'); + } + static footer() { + return Element.tag('footer'); + } + static header() { + return Element.tag('header'); + } + static hr() { + return Element.tag('hr'); + } + static iframe() { + return Element.tag('iframe'); + } + static img() { + return Element.tag('img'); + } + static li() { + return Element.tag('li'); + } + static nav() { + return Element.tag('nav'); + } + static ol() { + return Element.tag('ol'); + } + static option() { + return Element.tag('option'); + } + static p() { + return Element.tag('p'); + } + static pre() { + return Element.tag('pre'); + } + static section() { + return Element.tag('section'); + } + static select() { + return Element.tag('select'); + } + static span() { + return Element.tag('span'); + } + static svg() { + return Element.tag('svg'); + } + static table() { + return Element.tag('table'); + } + static td() { + return Element.tag('td'); + } + static textarea() { + return Element.tag('textarea'); + } + static th() { + return Element.tag('th'); + } + static tr() { + return Element.tag('tr'); + } + static ul() { + return Element.tag('ul'); + } + static video() { + return Element.tag('video'); + } + get attributes() { + return new _ElementAttributeMap(this); + } + set attributes(value) { + let attributes = this.attributes; + attributes.clear(); + for (let key of value.keys) { + attributes.set(key, value.get(key)); + } + } + get children() { + return new _ChildrenElementList._wrap(this); + } + set children(value) { + let copy = core.List.from(value); + let children = this.children; + children[dartx.clear](); + children[dartx.addAll](dart.as(copy, core.Iterable$(Element))); + } + querySelectorAll(selectors) { + return new _FrozenElementList._wrap(this[_querySelectorAll](selectors)); + } + query(relativeSelectors) { + return this.querySelector(relativeSelectors); + } + queryAll(relativeSelectors) { + return this.querySelectorAll(relativeSelectors); + } + get classes() { + return new exports._ElementCssClassSet(this); + } + set classes(value) { + let classSet = this.classes; + classSet.clear(); + classSet.addAll(value); + } + get dataset() { + return new _DataAttributeMap(this.attributes); + } + set dataset(value) { + let data = this.dataset; + data.clear(); + for (let key of value.keys) { + data.set(key, value.get(key)); + } + } + getNamespacedAttributes(namespace) { + return new _NamespacedAttributeMap(this, namespace); + } + getComputedStyle(pseudoElement) { + if (pseudoElement === void 0) + pseudoElement = null; + if (pseudoElement == null) { + pseudoElement = ''; + } + return exports.window[_getComputedStyle](this, pseudoElement); + } + get client() { + return new math.Rectangle(this.clientLeft, this.clientTop, this.clientWidth, this.clientHeight); + } + get offset() { + return new math.Rectangle(this.offsetLeft, this.offsetTop, this.offsetWidth, this.offsetHeight); + } + appendText(text) { + this.append(Text.new(text)); + } + appendHtml(text, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + this.insertAdjacentHtml('beforeend', text, {validator: validator, treeSanitizer: treeSanitizer}); + } + static isTagSupported(tag) { + let e = _ElementFactoryProvider.createElement_tag(tag, null); + return dart.is(e, Element) && !(e.constructor.name == "HTMLUnknownElement"); + } + attached() { + this.enteredView(); + } + detached() { + this.leftView(); + } + enteredView() {} + leftView() {} + attributeChanged(name, oldValue, newValue) {} + get xtag() { + return this[_xtag] != null ? this[_xtag] : this; + } + set xtag(value) { + this[_xtag] = value; + } + get localName() { + return this[_localName]; + } + get namespaceUri() { + return this[_namespaceUri]; + } + toString() { + return this.localName; + } + scrollIntoView(alignment) { + if (alignment === void 0) + alignment = null; + let hasScrollIntoViewIfNeeded = true; + if (dart.equals(alignment, ScrollAlignment.TOP)) { + this[_scrollIntoView](true); + } else if (dart.equals(alignment, ScrollAlignment.BOTTOM)) { + this[_scrollIntoView](false); + } else if (dart.notNull(hasScrollIntoViewIfNeeded)) { + if (dart.equals(alignment, ScrollAlignment.CENTER)) { + this[_scrollIntoViewIfNeeded](true); + } else { + this[_scrollIntoViewIfNeeded](); + } + } else { + this[_scrollIntoView](); + } + } + insertAdjacentHtml(where, html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + if (dart.is(treeSanitizer, _TrustedHtmlTreeSanitizer)) { + this[_insertAdjacentHtml](where, html); + } else { + this[_insertAdjacentNode](where, this.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer})); + } + } + [_insertAdjacentHtml](where, text) { + return this.raw.insertAdjacentHTML(where, text); + } + [_insertAdjacentNode](where, node) { + switch (where[dartx.toLowerCase]()) { + case 'beforebegin': + { + this.parentNode.insertBefore(node, this); + break; + } + case 'afterbegin': + { + let first = dart.notNull(this.nodes[dartx.length]) > 0 ? this.nodes[dartx.get](0) : null; + this.insertBefore(node, first); + break; + } + case 'beforeend': + { + this.append(node); + break; + } + case 'afterend': + { + this.parentNode.insertBefore(node, this.nextNode); + break; + } + default: + { + dart.throw(new core.ArgumentError(`Invalid position ${where}`)); + } + } + } + matches(selectors) { + return this.raw.matches(selectors); + } + matchesWithAncestors(selectors) { + let elem = this; + do { + if (dart.notNull(elem.matches(selectors))) + return true; + elem = elem.parent; + } while (elem != null); + return false; + } + get contentEdge() { + return new _ContentCssRect(this); + } + get paddingEdge() { + return new _PaddingCssRect(this); + } + get borderEdge() { + return new _BorderCssRect(this); + } + get marginEdge() { + return new _MarginCssRect(this); + } + get documentOffset() { + return this.offsetTo(exports.document.documentElement); + } + offsetTo(parent) { + return Element._offsetToHelper(this, parent); + } + static _offsetToHelper(current, parent) { + let sameAsParent = dart.equals(current, parent); + let foundAsParent = dart.notNull(sameAsParent) || parent.tagName == 'HTML'; + if (current == null || dart.notNull(sameAsParent)) { + if (dart.notNull(foundAsParent)) + return new math.Point(0, 0); + dart.throw(new core.ArgumentError("Specified element is not a transitive offset " + "parent of this element.")); + } + let parentOffset = current.offsetParent; + let p = Element._offsetToHelper(parentOffset, parent); + return new math.Point(dart.dsend(p.x, '+', current.offsetLeft), dart.dsend(p.y, '+', current.offsetTop)); + } + createFragment(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + if (treeSanitizer == null) { + if (validator == null) { + if (Element._defaultValidator == null) { + Element._defaultValidator = new NodeValidatorBuilder.common(); + } + validator = Element._defaultValidator; + } + if (Element._defaultSanitizer == null) { + Element._defaultSanitizer = new _ValidatingTreeSanitizer(validator); + } else { + Element._defaultSanitizer.validator = validator; + } + treeSanitizer = Element._defaultSanitizer; + } else if (validator != null) { + dart.throw(new core.ArgumentError('validator can only be passed if treeSanitizer is null')); + } + if (Element._parseDocument == null) { + Element._parseDocument = exports.document.implementation.createHtmlDocument(''); + Element._parseRange = Element._parseDocument.createRange(); + let base = dart.as(Element._parseDocument.createElement('base'), BaseElement); + base.href = exports.document.baseUri; + Element._parseDocument.head.append(base); + } + let contextElement = null; + if (dart.is(this, BodyElement)) { + contextElement = Element._parseDocument.body; + } else { + contextElement = Element._parseDocument.createElement(this.tagName); + Element._parseDocument.body.append(dart.as(contextElement, Node)); + } + let fragment = null; + if (dart.notNull(Range.supportsCreateContextualFragment) && dart.notNull(this[_canBeUsedToCreateContextualFragment])) { + Element._parseRange.selectNodeContents(dart.as(contextElement, Node)); + fragment = Element._parseRange.createContextualFragment(html); + } else { + dart.dput(contextElement, _innerHtml, html); + fragment = Element._parseDocument.createDocumentFragment(); + while (dart.dload(contextElement, 'firstChild') != null) { + dart.dsend(fragment, 'append', dart.dload(contextElement, 'firstChild')); + } + } + if (!dart.equals(contextElement, Element._parseDocument.body)) { + dart.dsend(contextElement, 'remove'); + } + treeSanitizer.sanitizeTree(dart.as(fragment, Node)); + exports.document.adoptNode(dart.as(fragment, Node)); + return dart.as(fragment, DocumentFragment); + } + get [_canBeUsedToCreateContextualFragment]() { + return !dart.notNull(this[_cannotBeUsedToCreateContextualFragment]); + } + get [_cannotBeUsedToCreateContextualFragment]() { + return Element._tagsForWhichCreateContextualFragmentIsNotSupported[dartx.contains](this.tagName); + } + set innerHtml(html) { + this.setInnerHtml(html); + } + setInnerHtml(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + this.text = null; + if (dart.is(treeSanitizer, _TrustedHtmlTreeSanitizer)) { + this[_innerHtml] = html; + } else { + this.append(this.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer})); + } + } + get innerHtml() { + return this[_innerHtml]; + } + get on() { + return new ElementEvents(this); + } + static _hasCorruptedAttributes(element) { + return (function(element) { + if (!(element.attributes instanceof NamedNodeMap)) { + return true; + } + var childNodes = element.childNodes; + if (element.lastChild && element.lastChild !== childNodes[childNodes.length - 1]) { + return true; + } + if (element.children) { + if (!(element.children instanceof HTMLCollection || element.children instanceof NodeList)) { + return true; + } + } + var length = 0; + if (element.children) { + length = element.children.length; + } + for (var i = 0; i < length; i++) { + var child = element.children[i]; + if (child.id == 'attributes' || child.name == 'attributes' || child.id == 'lastChild' || child.name == 'lastChild' || child.id == 'children' || child.name == 'children') { + return true; + } + } + return false; + })(element.raw); + } + static _hasCorruptedAttributesAdditionalCheck(element) { + return !(element.raw.attributes instanceof NamedNodeMap); + } + static _safeTagName(element) { + let result = 'element tag unavailable'; + try { + if (typeof dart.dload(element, 'tagName') == 'string') { + result = dart.as(dart.dload(element, 'tagName'), core.String); + } + } catch (e) { + } + + return result; + } + get offsetHeight() { + return this.raw.offsetHeight[dartx.round](); + } + get offsetLeft() { + return this.raw.offsetLeft[dartx.round](); + } + get offsetTop() { + return this.raw.offsetTop[dartx.round](); + } + get offsetWidth() { + return this.raw.offsetWidth[dartx.round](); + } + get clientHeight() { + return this.raw.clientHeight[dartx.round](); + } + get clientLeft() { + return this.raw.clientLeft[dartx.round](); + } + get clientTop() { + return this.raw.clientTop[dartx.round](); + } + get clientWidth() { + return this.raw.clientWidth[dartx.round](); + } + get scrollHeight() { + return this.raw.scrollHeight[dartx.round](); + } + get scrollLeft() { + return this.raw.scrollLeft[dartx.round](); + } + set scrollLeft(value) { + this.raw.scrollLeft = value[dartx.round](); + } + get scrollTop() { + return this.raw.scrollTop[dartx.round](); + } + set scrollTop(value) { + this.raw.scrollTop = value[dartx.round](); + } + get scrollWidth() { + return this.raw.scrollWidth[dartx.round](); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateElement() { + return new Element.internal_(); + } + internal_() { + this[_xtag] = null; + super.internal_(); + } + get contentEditable() { + return dart.as(wrap_jso(this.raw.contentEditable), core.String); + } + set contentEditable(val) { + return this.raw.contentEditable = unwrap_jso(val); + } + get contextMenu() { + return dart.as(wrap_jso(this.raw.contextMenu), HtmlElement); + } + set contextMenu(val) { + return this.raw.contextMenu = unwrap_jso(val); + } + get dir() { + return dart.as(wrap_jso(this.raw.dir), core.String); + } + set dir(val) { + return this.raw.dir = unwrap_jso(val); + } + get draggable() { + return dart.as(wrap_jso(this.raw.draggable), core.bool); + } + set draggable(val) { + return this.raw.draggable = unwrap_jso(val); + } + get hidden() { + return dart.as(wrap_jso(this.raw.hidden), core.bool); + } + set hidden(val) { + return this.raw.hidden = unwrap_jso(val); + } + get isContentEditable() { + return dart.as(wrap_jso(this.raw.isContentEditable), core.bool); + } + get lang() { + return dart.as(wrap_jso(this.raw.lang), core.String); + } + set lang(val) { + return this.raw.lang = unwrap_jso(val); + } + get spellcheck() { + return dart.as(wrap_jso(this.raw.spellcheck), core.bool); + } + set spellcheck(val) { + return this.raw.spellcheck = unwrap_jso(val); + } + get tabIndex() { + return dart.as(wrap_jso(this.raw.tabIndex), core.int); + } + set tabIndex(val) { + return this.raw.tabIndex = unwrap_jso(val); + } + get title() { + return dart.as(wrap_jso(this.raw.title), core.String); + } + set title(val) { + return this.raw.title = unwrap_jso(val); + } + get translate() { + return dart.as(wrap_jso(this.raw.translate), core.bool); + } + set translate(val) { + return this.raw.translate = unwrap_jso(val); + } + get dropzone() { + return dart.as(wrap_jso(this.raw.webkitdropzone), core.String); + } + set dropzone(val) { + return this.raw.webkitdropzone = unwrap_jso(val); + } + click() { + this[_click_1](); + return; + } + [_click_1]() { + return wrap_jso(this.raw.click()); + } + get [_attributes]() { + return dart.as(wrap_jso(this.raw.attributes), _NamedNodeMap); + } + get className() { + return dart.as(wrap_jso(this.raw.className), core.String); + } + set className(val) { + return this.raw.className = unwrap_jso(val); + } + get [_clientHeight]() { + return dart.as(wrap_jso(this.raw.clientHeight), core.int); + } + get [_clientLeft]() { + return dart.as(wrap_jso(this.raw.clientLeft), core.int); + } + get [_clientTop]() { + return dart.as(wrap_jso(this.raw.clientTop), core.int); + } + get [_clientWidth]() { + return dart.as(wrap_jso(this.raw.clientWidth), core.int); + } + get id() { + return dart.as(wrap_jso(this.raw.id), core.String); + } + set id(val) { + return this.raw.id = unwrap_jso(val); + } + get [_innerHtml]() { + return dart.as(wrap_jso(this.raw.innerHTML), core.String); + } + set [_innerHtml](val) { + return this.raw.innerHTML = unwrap_jso(val); + } + get [_offsetHeight]() { + return dart.as(wrap_jso(this.raw.offsetHeight), core.int); + } + get [_offsetLeft]() { + return dart.as(wrap_jso(this.raw.offsetLeft), core.int); + } + get offsetParent() { + return dart.as(wrap_jso(this.raw.offsetParent), Element); + } + get [_offsetTop]() { + return dart.as(wrap_jso(this.raw.offsetTop), core.int); + } + get [_offsetWidth]() { + return dart.as(wrap_jso(this.raw.offsetWidth), core.int); + } + get outerHtml() { + return dart.as(wrap_jso(this.raw.outerHTML), core.String); + } + get [_scrollHeight]() { + return dart.as(wrap_jso(this.raw.scrollHeight), core.int); + } + get [_scrollLeft]() { + return dart.as(wrap_jso(this.raw.scrollLeft), core.num); + } + set [_scrollLeft](val) { + return this.raw.scrollLeft = unwrap_jso(val); + } + get [_scrollTop]() { + return dart.as(wrap_jso(this.raw.scrollTop), core.num); + } + set [_scrollTop](val) { + return this.raw.scrollTop = unwrap_jso(val); + } + get [_scrollWidth]() { + return dart.as(wrap_jso(this.raw.scrollWidth), core.int); + } + get style() { + return dart.as(wrap_jso(this.raw.style), CssStyleDeclaration); + } + get tagName() { + return dart.as(wrap_jso(this.raw.tagName), core.String); + } + blur() { + this[_blur_1](); + return; + } + [_blur_1]() { + return wrap_jso(this.raw.blur()); + } + focus() { + this[_focus_1](); + return; + } + [_focus_1]() { + return wrap_jso(this.raw.focus()); + } + getAttribute(name) { + return this[_getAttribute_1](name); + } + [_getAttribute_1](name) { + return dart.as(wrap_jso(this.raw.getAttribute(unwrap_jso(name))), core.String); + } + getAttributeNS(namespaceURI, localName) { + return this[_getAttributeNS_1](namespaceURI, localName); + } + [_getAttributeNS_1](namespaceURI, localName) { + return dart.as(wrap_jso(this.raw.getAttributeNS(unwrap_jso(namespaceURI), unwrap_jso(localName))), core.String); + } + getBoundingClientRect() { + return this[_getBoundingClientRect_1](); + } + [_getBoundingClientRect_1]() { + return dart.as(wrap_jso(this.raw.getBoundingClientRect()), math.Rectangle); + } + getDestinationInsertionPoints() { + return this[_getDestinationInsertionPoints_1](); + } + [_getDestinationInsertionPoints_1]() { + return dart.as(wrap_jso(this.raw.getDestinationInsertionPoints()), NodeList); + } + getElementsByClassName(classNames) { + return this[_getElementsByClassName_1](classNames); + } + [_getElementsByClassName_1](classNames) { + return dart.as(wrap_jso(this.raw.getElementsByClassName(unwrap_jso(classNames))), HtmlCollection); + } + [_getElementsByTagName](name) { + return this[_getElementsByTagName_1](name); + } + [_getElementsByTagName_1](name) { + return dart.as(wrap_jso(this.raw.getElementsByTagName(unwrap_jso(name))), HtmlCollection); + } + [_hasAttribute](name) { + return this[_hasAttribute_1](name); + } + [_hasAttribute_1](name) { + return dart.as(wrap_jso(this.raw.hasAttribute(unwrap_jso(name))), core.bool); + } + [_hasAttributeNS](namespaceURI, localName) { + return this[_hasAttributeNS_1](namespaceURI, localName); + } + [_hasAttributeNS_1](namespaceURI, localName) { + return dart.as(wrap_jso(this.raw.hasAttributeNS(unwrap_jso(namespaceURI), unwrap_jso(localName))), core.bool); + } + [_removeAttribute](name) { + this[_removeAttribute_1](name); + return; + } + [_removeAttribute_1](name) { + return wrap_jso(this.raw.removeAttribute(unwrap_jso(name))); + } + [_removeAttributeNS](namespaceURI, localName) { + this[_removeAttributeNS_1](namespaceURI, localName); + return; + } + [_removeAttributeNS_1](namespaceURI, localName) { + return wrap_jso(this.raw.removeAttributeNS(unwrap_jso(namespaceURI), unwrap_jso(localName))); + } + requestFullscreen() { + this[_requestFullscreen_1](); + return; + } + [_requestFullscreen_1]() { + return wrap_jso(this.raw.requestFullscreen()); + } + requestPointerLock() { + this[_requestPointerLock_1](); + return; + } + [_requestPointerLock_1]() { + return wrap_jso(this.raw.requestPointerLock()); + } + [_scrollIntoView](alignWithTop) { + if (alignWithTop === void 0) + alignWithTop = null; + if (alignWithTop != null) { + this[_scrollIntoView_1](alignWithTop); + return; + } + this[_scrollIntoView_2](); + return; + } + [_scrollIntoView_1](alignWithTop) { + return wrap_jso(this.raw.scrollIntoView(unwrap_jso(alignWithTop))); + } + [_scrollIntoView_2]() { + return wrap_jso(this.raw.scrollIntoView()); + } + [_scrollIntoViewIfNeeded](centerIfNeeded) { + if (centerIfNeeded === void 0) + centerIfNeeded = null; + if (centerIfNeeded != null) { + this[_scrollIntoViewIfNeeded_1](centerIfNeeded); + return; + } + this[_scrollIntoViewIfNeeded_2](); + return; + } + [_scrollIntoViewIfNeeded_1](centerIfNeeded) { + return wrap_jso(this.raw.scrollIntoViewIfNeeded(unwrap_jso(centerIfNeeded))); + } + [_scrollIntoViewIfNeeded_2]() { + return wrap_jso(this.raw.scrollIntoViewIfNeeded()); + } + setAttribute(name, value) { + this[_setAttribute_1](name, value); + return; + } + [_setAttribute_1](name, value) { + return wrap_jso(this.raw.setAttribute(unwrap_jso(name), unwrap_jso(value))); + } + setAttributeNS(namespaceURI, qualifiedName, value) { + this[_setAttributeNS_1](namespaceURI, qualifiedName, value); + return; + } + [_setAttributeNS_1](namespaceURI, qualifiedName, value) { + return wrap_jso(this.raw.setAttributeNS(unwrap_jso(namespaceURI), unwrap_jso(qualifiedName), unwrap_jso(value))); + } + get nextElementSibling() { + return dart.as(wrap_jso(this.raw.nextElementSibling), Element); + } + get previousElementSibling() { + return dart.as(wrap_jso(this.raw.previousElementSibling), Element); + } + get [_childElementCount]() { + return dart.as(wrap_jso(this.raw.childElementCount), core.int); + } + get [_children]() { + return dart.as(wrap_jso(this.raw.children), core.List$(Node)); + } + get [_firstElementChild]() { + return dart.as(wrap_jso(this.raw.firstElementChild), Element); + } + get [_lastElementChild]() { + return dart.as(wrap_jso(this.raw.lastElementChild), Element); + } + querySelector(selectors) { + return this[_querySelector_1](selectors); + } + [_querySelector_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelector(unwrap_jso(selectors))), Element); + } + [_querySelectorAll](selectors) { + return this[_querySelectorAll_1](selectors); + } + [_querySelectorAll_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelectorAll(unwrap_jso(selectors))), NodeList); + } + get onBeforeCopy() { + return Element.beforeCopyEvent.forElement(this); + } + get onBeforeCut() { + return Element.beforeCutEvent.forElement(this); + } + get onBeforePaste() { + return Element.beforePasteEvent.forElement(this); + } + get onCopy() { + return Element.copyEvent.forElement(this); + } + get onCut() { + return Element.cutEvent.forElement(this); + } + get onPaste() { + return Element.pasteEvent.forElement(this); + } + get onSearch() { + return Element.searchEvent.forElement(this); + } + get onSelectStart() { + return Element.selectStartEvent.forElement(this); + } + get onFullscreenChange() { + return Element.fullscreenChangeEvent.forElement(this); + } + get onFullscreenError() { + return Element.fullscreenErrorEvent.forElement(this); + } + } + Element[dart.implements] = () => [ParentNode, ChildNode]; + dart.defineNamedConstructor(Element, 'created'); + dart.defineNamedConstructor(Element, 'internal_'); + dart.setSignature(Element, { + constructors: () => ({ + html: [Element, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + created: [Element, []], + tag: [Element, [core.String], [core.String]], + a: [Element, []], + article: [Element, []], + aside: [Element, []], + audio: [Element, []], + br: [Element, []], + canvas: [Element, []], + div: [Element, []], + footer: [Element, []], + header: [Element, []], + hr: [Element, []], + iframe: [Element, []], + img: [Element, []], + li: [Element, []], + nav: [Element, []], + ol: [Element, []], + option: [Element, []], + p: [Element, []], + pre: [Element, []], + section: [Element, []], + select: [Element, []], + span: [Element, []], + svg: [Element, []], + table: [Element, []], + td: [Element, []], + textarea: [Element, []], + th: [Element, []], + tr: [Element, []], + ul: [Element, []], + video: [Element, []], + _: [Element, []], + internal_: [Element, []] + }), + methods: () => ({ + querySelectorAll: [ElementList$(Element), [core.String]], + query: [Element, [core.String]], + queryAll: [ElementList$(Element), [core.String]], + getNamespacedAttributes: [core.Map$(core.String, core.String), [core.String]], + getComputedStyle: [CssStyleDeclaration, [], [core.String]], + appendText: [dart.void, [core.String]], + appendHtml: [dart.void, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + attached: [dart.void, []], + detached: [dart.void, []], + enteredView: [dart.void, []], + leftView: [dart.void, []], + attributeChanged: [dart.void, [core.String, core.String, core.String]], + scrollIntoView: [dart.void, [], [ScrollAlignment]], + insertAdjacentHtml: [dart.void, [core.String, core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + [_insertAdjacentHtml]: [dart.void, [core.String, core.String]], + [_insertAdjacentNode]: [dart.void, [core.String, Node]], + matches: [core.bool, [core.String]], + matchesWithAncestors: [core.bool, [core.String]], + offsetTo: [math.Point, [Element]], + createFragment: [DocumentFragment, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + setInnerHtml: [dart.void, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + click: [dart.void, []], + [_click_1]: [dart.void, []], + blur: [dart.void, []], + [_blur_1]: [dart.void, []], + focus: [dart.void, []], + [_focus_1]: [dart.void, []], + getAttribute: [core.String, [core.String]], + [_getAttribute_1]: [core.String, [dart.dynamic]], + getAttributeNS: [core.String, [core.String, core.String]], + [_getAttributeNS_1]: [core.String, [dart.dynamic, dart.dynamic]], + getBoundingClientRect: [math.Rectangle, []], + [_getBoundingClientRect_1]: [math.Rectangle, []], + getDestinationInsertionPoints: [NodeList, []], + [_getDestinationInsertionPoints_1]: [NodeList, []], + getElementsByClassName: [HtmlCollection, [core.String]], + [_getElementsByClassName_1]: [HtmlCollection, [dart.dynamic]], + [_getElementsByTagName]: [HtmlCollection, [core.String]], + [_getElementsByTagName_1]: [HtmlCollection, [dart.dynamic]], + [_hasAttribute]: [core.bool, [core.String]], + [_hasAttribute_1]: [core.bool, [dart.dynamic]], + [_hasAttributeNS]: [core.bool, [core.String, core.String]], + [_hasAttributeNS_1]: [core.bool, [dart.dynamic, dart.dynamic]], + [_removeAttribute]: [dart.void, [core.String]], + [_removeAttribute_1]: [dart.void, [dart.dynamic]], + [_removeAttributeNS]: [dart.void, [core.String, core.String]], + [_removeAttributeNS_1]: [dart.void, [dart.dynamic, dart.dynamic]], + requestFullscreen: [dart.void, []], + [_requestFullscreen_1]: [dart.void, []], + requestPointerLock: [dart.void, []], + [_requestPointerLock_1]: [dart.void, []], + [_scrollIntoView]: [dart.void, [], [core.bool]], + [_scrollIntoView_1]: [dart.void, [dart.dynamic]], + [_scrollIntoView_2]: [dart.void, []], + [_scrollIntoViewIfNeeded]: [dart.void, [], [core.bool]], + [_scrollIntoViewIfNeeded_1]: [dart.void, [dart.dynamic]], + [_scrollIntoViewIfNeeded_2]: [dart.void, []], + setAttribute: [dart.void, [core.String, core.String]], + [_setAttribute_1]: [dart.void, [dart.dynamic, dart.dynamic]], + setAttributeNS: [dart.void, [core.String, core.String, core.String]], + [_setAttributeNS_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + querySelector: [Element, [core.String]], + [_querySelector_1]: [Element, [dart.dynamic]], + [_querySelectorAll]: [NodeList, [core.String]], + [_querySelectorAll_1]: [NodeList, [dart.dynamic]] + }), + statics: () => ({ + isTagSupported: [core.bool, [core.String]], + _offsetToHelper: [math.Point, [Element, Element]], + _hasCorruptedAttributes: [core.bool, [Element]], + _hasCorruptedAttributesAdditionalCheck: [core.bool, [Element]], + _safeTagName: [core.String, [dart.dynamic]], + internalCreateElement: [Element, []] + }), + names: ['isTagSupported', '_offsetToHelper', '_hasCorruptedAttributes', '_hasCorruptedAttributesAdditionalCheck', '_safeTagName', 'internalCreateElement'] + }); + Element[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('Element')), dart.const(new _js_helper.Native("Element"))]; + class HtmlElement extends Element { + static new() { + dart.throw(new core.UnsupportedError("Not supported")); + } + created() { + super.created(); + } + internal_() { + super.internal_(); + } + static internalCreateHtmlElement() { + return HtmlElement._internalWrap(); + } + static _internalWrap() { + return new HtmlElement.internal_(); + } + } + dart.defineNamedConstructor(HtmlElement, 'created'); + dart.defineNamedConstructor(HtmlElement, 'internal_'); + dart.setSignature(HtmlElement, { + constructors: () => ({ + new: [HtmlElement, []], + created: [HtmlElement, []], + internal_: [HtmlElement, []], + _internalWrap: [HtmlElement, []] + }), + statics: () => ({internalCreateHtmlElement: [HtmlElement, []]}), + names: ['internalCreateHtmlElement'] + }); + HtmlElement[dart.metadata] = () => [dart.const(new _js_helper.Native("HTMLElement"))]; + class AnchorElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new(opts) { + let href = opts && 'href' in opts ? opts.href : null; + let e = dart.as(exports.document.createElement("a"), AnchorElement); + if (href != null) + e.href = href; + return e; + } + static internalCreateAnchorElement() { + return new AnchorElement.internal_(); + } + internal_() { + super.internal_(); + } + get download() { + return dart.as(wrap_jso(this.raw.download), core.String); + } + set download(val) { + return this.raw.download = unwrap_jso(val); + } + get hreflang() { + return dart.as(wrap_jso(this.raw.hreflang), core.String); + } + set hreflang(val) { + return this.raw.hreflang = unwrap_jso(val); + } + get integrity() { + return dart.as(wrap_jso(this.raw.integrity), core.String); + } + set integrity(val) { + return this.raw.integrity = unwrap_jso(val); + } + get rel() { + return dart.as(wrap_jso(this.raw.rel), core.String); + } + set rel(val) { + return this.raw.rel = unwrap_jso(val); + } + get target() { + return dart.as(wrap_jso(this.raw.target), core.String); + } + set target(val) { + return this.raw.target = unwrap_jso(val); + } + get type() { + return dart.as(wrap_jso(this.raw.type), core.String); + } + set type(val) { + return this.raw.type = unwrap_jso(val); + } + get hash() { + return dart.as(wrap_jso(this.raw.hash), core.String); + } + set hash(val) { + return this.raw.hash = unwrap_jso(val); + } + get host() { + return dart.as(wrap_jso(this.raw.host), core.String); + } + set host(val) { + return this.raw.host = unwrap_jso(val); + } + get hostname() { + return dart.as(wrap_jso(this.raw.hostname), core.String); + } + set hostname(val) { + return this.raw.hostname = unwrap_jso(val); + } + get href() { + return dart.as(wrap_jso(this.raw.href), core.String); + } + set href(val) { + return this.raw.href = unwrap_jso(val); + } + get origin() { + return dart.as(wrap_jso(this.raw.origin), core.String); + } + get password() { + return dart.as(wrap_jso(this.raw.password), core.String); + } + set password(val) { + return this.raw.password = unwrap_jso(val); + } + get pathname() { + return dart.as(wrap_jso(this.raw.pathname), core.String); + } + set pathname(val) { + return this.raw.pathname = unwrap_jso(val); + } + get port() { + return dart.as(wrap_jso(this.raw.port), core.String); + } + set port(val) { + return this.raw.port = unwrap_jso(val); + } + get protocol() { + return dart.as(wrap_jso(this.raw.protocol), core.String); + } + set protocol(val) { + return this.raw.protocol = unwrap_jso(val); + } + get search() { + return dart.as(wrap_jso(this.raw.search), core.String); + } + set search(val) { + return this.raw.search = unwrap_jso(val); + } + get username() { + return dart.as(wrap_jso(this.raw.username), core.String); + } + set username(val) { + return this.raw.username = unwrap_jso(val); + } + } + AnchorElement[dart.implements] = () => [UrlUtils]; + dart.defineNamedConstructor(AnchorElement, 'internal_'); + dart.setSignature(AnchorElement, { + constructors: () => ({ + _: [AnchorElement, []], + new: [AnchorElement, [], {href: core.String}], + internal_: [AnchorElement, []] + }), + statics: () => ({internalCreateAnchorElement: [AnchorElement, []]}), + names: ['internalCreateAnchorElement'] + }); + AnchorElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLAnchorElement')), dart.const(new _js_helper.Native("HTMLAnchorElement"))]; + class BaseElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("base"), BaseElement); + } + static internalCreateBaseElement() { + return new BaseElement.internal_(); + } + internal_() { + super.internal_(); + } + get href() { + return dart.as(wrap_jso(this.raw.href), core.String); + } + set href(val) { + return this.raw.href = unwrap_jso(val); + } + get target() { + return dart.as(wrap_jso(this.raw.target), core.String); + } + set target(val) { + return this.raw.target = unwrap_jso(val); + } + } + dart.defineNamedConstructor(BaseElement, 'internal_'); + dart.setSignature(BaseElement, { + constructors: () => ({ + _: [BaseElement, []], + new: [BaseElement, []], + internal_: [BaseElement, []] + }), + statics: () => ({internalCreateBaseElement: [BaseElement, []]}), + names: ['internalCreateBaseElement'] + }); + BaseElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLBaseElement')), dart.const(new _js_helper.Native("HTMLBaseElement"))]; + class BodyElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("body"), BodyElement); + } + static internalCreateBodyElement() { + return new BodyElement.internal_(); + } + internal_() { + super.internal_(); + } + get onBlur() { + return BodyElement.blurEvent.forElement(this); + } + get onError() { + return BodyElement.errorEvent.forElement(this); + } + get onFocus() { + return BodyElement.focusEvent.forElement(this); + } + get onLoad() { + return BodyElement.loadEvent.forElement(this); + } + get onResize() { + return BodyElement.resizeEvent.forElement(this); + } + get onScroll() { + return BodyElement.scrollEvent.forElement(this); + } + } + dart.defineNamedConstructor(BodyElement, 'internal_'); + dart.setSignature(BodyElement, { + constructors: () => ({ + _: [BodyElement, []], + new: [BodyElement, []], + internal_: [BodyElement, []] + }), + statics: () => ({internalCreateBodyElement: [BodyElement, []]}), + names: ['internalCreateBodyElement'] + }); + BodyElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLBodyElement')), dart.const(new _js_helper.Native("HTMLBodyElement"))]; + const _eventType = Symbol('_eventType'); + const _forElementList = Symbol('_forElementList'); + const EventStreamProvider$ = dart.generic(function(T) { + class EventStreamProvider extends core.Object { + EventStreamProvider(eventType) { + this[_eventType] = eventType; + } + forTarget(e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new (_EventStream$(T))(e, this[_eventType], useCapture); + } + forElement(e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new (_ElementEventStreamImpl$(T))(e, this[_eventType], useCapture); + } + [_forElementList](e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new _ElementListEventStreamImpl(dart.as(e, core.Iterable$(Element)), this[_eventType], useCapture); + } + getEventType(target) { + return this[_eventType]; + } + } + dart.setSignature(EventStreamProvider, { + constructors: () => ({EventStreamProvider: [EventStreamProvider$(T), [core.String]]}), + methods: () => ({ + forTarget: [async.Stream$(T), [EventTarget], {useCapture: core.bool}], + forElement: [ElementStream$(T), [Element], {useCapture: core.bool}], + [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core.bool}], + getEventType: [core.String, [EventTarget]] + }) + }); + return EventStreamProvider; + }); + let EventStreamProvider = EventStreamProvider$(); + const _createEvent = Symbol('_createEvent'); + const _initEvent = Symbol('_initEvent'); + const _selector = Symbol('_selector'); + const _get_currentTarget = Symbol('_get_currentTarget'); + const _get_target = Symbol('_get_target'); + const _initEvent_1 = Symbol('_initEvent_1'); + const _preventDefault_1 = Symbol('_preventDefault_1'); + const _stopImmediatePropagation_1 = Symbol('_stopImmediatePropagation_1'); + const _stopPropagation_1 = Symbol('_stopPropagation_1'); + class Event extends DartHtmlDomObject { + static new(type, opts) { + let canBubble = opts && 'canBubble' in opts ? opts.canBubble : true; + let cancelable = opts && 'cancelable' in opts ? opts.cancelable : true; + return Event.eventType('Event', type, {canBubble: canBubble, cancelable: cancelable}); + } + static eventType(type, name, opts) { + let canBubble = opts && 'canBubble' in opts ? opts.canBubble : true; + let cancelable = opts && 'cancelable' in opts ? opts.cancelable : true; + let e = exports.document[_createEvent](type); + e[_initEvent](name, canBubble, cancelable); + return e; + } + get matchingTarget() { + if (this[_selector] == null) { + dart.throw(new core.UnsupportedError('Cannot call matchingTarget if this Event did' + ' not arise as a result of event delegation.')); + } + let currentTarget = dart.as(this.currentTarget, Element); + let target = dart.as(this.target, Element); + let matchedTarget = null; + do { + if (dart.notNull(target.matches(this[_selector]))) + return target; + target = target.parent; + } while (target != null && !dart.equals(target, currentTarget.parent)); + dart.throw(new core.StateError('No selector matched for populating matchedTarget.')); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateEvent() { + return new Event.internal_(); + } + internal_() { + this[_selector] = null; + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get bubbles() { + return dart.as(wrap_jso(this.raw.bubbles), core.bool); + } + get cancelable() { + return dart.as(wrap_jso(this.raw.cancelable), core.bool); + } + get currentTarget() { + return _convertNativeToDart_EventTarget(this[_get_currentTarget]); + } + get [_get_currentTarget]() { + return wrap_jso(this.raw.currentTarget); + } + get defaultPrevented() { + return dart.as(wrap_jso(this.raw.defaultPrevented), core.bool); + } + get eventPhase() { + return dart.as(wrap_jso(this.raw.eventPhase), core.int); + } + get path() { + return dart.as(wrap_jso(this.raw.path), core.List$(Node)); + } + get target() { + return _convertNativeToDart_EventTarget(this[_get_target]); + } + get [_get_target]() { + return wrap_jso(this.raw.target); + } + get timeStamp() { + return dart.as(wrap_jso(this.raw.timeStamp), core.int); + } + get type() { + return dart.as(wrap_jso(this.raw.type), core.String); + } + [_initEvent](eventTypeArg, canBubbleArg, cancelableArg) { + this[_initEvent_1](eventTypeArg, canBubbleArg, cancelableArg); + return; + } + [_initEvent_1](eventTypeArg, canBubbleArg, cancelableArg) { + return wrap_jso(this.raw.initEvent(unwrap_jso(eventTypeArg), unwrap_jso(canBubbleArg), unwrap_jso(cancelableArg))); + } + preventDefault() { + this[_preventDefault_1](); + return; + } + [_preventDefault_1]() { + return wrap_jso(this.raw.preventDefault()); + } + stopImmediatePropagation() { + this[_stopImmediatePropagation_1](); + return; + } + [_stopImmediatePropagation_1]() { + return wrap_jso(this.raw.stopImmediatePropagation()); + } + stopPropagation() { + this[_stopPropagation_1](); + return; + } + [_stopPropagation_1]() { + return wrap_jso(this.raw.stopPropagation()); + } + } + dart.defineNamedConstructor(Event, 'internal_'); + dart.setSignature(Event, { + constructors: () => ({ + new: [Event, [core.String], {canBubble: core.bool, cancelable: core.bool}], + eventType: [Event, [core.String, core.String], {canBubble: core.bool, cancelable: core.bool}], + _: [Event, []], + internal_: [Event, []] + }), + methods: () => ({ + [_initEvent]: [dart.void, [core.String, core.bool, core.bool]], + [_initEvent_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + preventDefault: [dart.void, []], + [_preventDefault_1]: [dart.void, []], + stopImmediatePropagation: [dart.void, []], + [_stopImmediatePropagation_1]: [dart.void, []], + stopPropagation: [dart.void, []], + [_stopPropagation_1]: [dart.void, []] + }), + statics: () => ({internalCreateEvent: [Event, []]}), + names: ['internalCreateEvent'] + }); + Event[dart.metadata] = () => [dart.const(new _metadata.DomName('Event')), dart.const(new _js_helper.Native("Event,InputEvent,ClipboardEvent"))]; + BodyElement.blurEvent = dart.const(new (EventStreamProvider$(Event))('blur')); + BodyElement.errorEvent = dart.const(new (EventStreamProvider$(Event))('error')); + BodyElement.focusEvent = dart.const(new (EventStreamProvider$(Event))('focus')); + BodyElement.loadEvent = dart.const(new (EventStreamProvider$(Event))('load')); + BodyElement.resizeEvent = dart.const(new (EventStreamProvider$(Event))('resize')); + BodyElement.scrollEvent = dart.const(new (EventStreamProvider$(Event))('scroll')); + const _appendData_1 = Symbol('_appendData_1'); + const _deleteData_1 = Symbol('_deleteData_1'); + const _insertData_1 = Symbol('_insertData_1'); + const _replaceData_1 = Symbol('_replaceData_1'); + const _substringData_1 = Symbol('_substringData_1'); + class CharacterData extends Node { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateCharacterData() { + return new CharacterData.internal_(); + } + internal_() { + super.internal_(); + } + get data() { + return dart.as(wrap_jso(this.raw.data), core.String); + } + set data(val) { + return this.raw.data = unwrap_jso(val); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + appendData(data) { + this[_appendData_1](data); + return; + } + [_appendData_1](data) { + return wrap_jso(this.raw.appendData(unwrap_jso(data))); + } + deleteData(offset, length) { + this[_deleteData_1](offset, length); + return; + } + [_deleteData_1](offset, length) { + return wrap_jso(this.raw.deleteData(unwrap_jso(offset), unwrap_jso(length))); + } + insertData(offset, data) { + this[_insertData_1](offset, data); + return; + } + [_insertData_1](offset, data) { + return wrap_jso(this.raw.insertData(unwrap_jso(offset), unwrap_jso(data))); + } + replaceData(offset, length, data) { + this[_replaceData_1](offset, length, data); + return; + } + [_replaceData_1](offset, length, data) { + return wrap_jso(this.raw.replaceData(unwrap_jso(offset), unwrap_jso(length), unwrap_jso(data))); + } + substringData(offset, length) { + return this[_substringData_1](offset, length); + } + [_substringData_1](offset, length) { + return dart.as(wrap_jso(this.raw.substringData(unwrap_jso(offset), unwrap_jso(length))), core.String); + } + get nextElementSibling() { + return dart.as(wrap_jso(this.raw.nextElementSibling), Element); + } + get previousElementSibling() { + return dart.as(wrap_jso(this.raw.previousElementSibling), Element); + } + } + CharacterData[dart.implements] = () => [ChildNode]; + dart.defineNamedConstructor(CharacterData, 'internal_'); + dart.setSignature(CharacterData, { + constructors: () => ({ + _: [CharacterData, []], + internal_: [CharacterData, []] + }), + methods: () => ({ + appendData: [dart.void, [core.String]], + [_appendData_1]: [dart.void, [dart.dynamic]], + deleteData: [dart.void, [core.int, core.int]], + [_deleteData_1]: [dart.void, [dart.dynamic, dart.dynamic]], + insertData: [dart.void, [core.int, core.String]], + [_insertData_1]: [dart.void, [dart.dynamic, dart.dynamic]], + replaceData: [dart.void, [core.int, core.int, core.String]], + [_replaceData_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + substringData: [core.String, [core.int, core.int]], + [_substringData_1]: [core.String, [dart.dynamic, dart.dynamic]] + }), + statics: () => ({internalCreateCharacterData: [CharacterData, []]}), + names: ['internalCreateCharacterData'] + }); + CharacterData[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('CharacterData')), dart.const(new _js_helper.Native("CharacterData"))]; + class ChildNode extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + get nextElementSibling() { + return dart.as(wrap_jso(this.raw.nextElementSibling), Element); + } + get previousElementSibling() { + return dart.as(wrap_jso(this.raw.previousElementSibling), Element); + } + remove() { + return wrap_jso(this.raw.remove()); + } + } + dart.setSignature(ChildNode, { + constructors: () => ({_: [ChildNode, []]}), + methods: () => ({remove: [dart.void, []]}) + }); + ChildNode[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('ChildNode')), dart.const(new _metadata.Experimental())]; + const _isConsoleDefined = Symbol('_isConsoleDefined'); + class Console extends DartHtmlDomObject { + _safe() { + super.DartHtmlDomObject(); + } + get [_isConsoleDefined]() { + return typeof console != "undefined"; + } + assertCondition(condition, arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.assertCondition(condition, arg) : null; + } + clear(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.clear(arg) : null; + } + count(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.count(arg) : null; + } + debug(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.debug(arg) : null; + } + dir(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.dir(arg) : null; + } + dirxml(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.dirxml(arg) : null; + } + error(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.error(arg) : null; + } + group(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.group(arg) : null; + } + groupCollapsed(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.groupCollapsed(arg) : null; + } + groupEnd() { + return dart.notNull(this[_isConsoleDefined]) ? console.groupEnd() : null; + } + info(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.info(arg) : null; + } + log(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.log(arg) : null; + } + markTimeline(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.markTimeline(arg) : null; + } + profile(title) { + return dart.notNull(this[_isConsoleDefined]) ? console.profile(title) : null; + } + profileEnd(title) { + return dart.notNull(this[_isConsoleDefined]) ? console.profileEnd(title) : null; + } + table(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.table(arg) : null; + } + time(title) { + return dart.notNull(this[_isConsoleDefined]) ? console.time(title) : null; + } + timeEnd(title) { + return dart.notNull(this[_isConsoleDefined]) ? console.timeEnd(title) : null; + } + timeStamp(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.timeStamp(arg) : null; + } + trace(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.trace(arg) : null; + } + warn(arg) { + return dart.notNull(this[_isConsoleDefined]) ? console.warn(arg) : null; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateConsole() { + return new Console.internal_(); + } + internal_() { + super.internal_(); + } + } + dart.defineNamedConstructor(Console, '_safe'); + dart.defineNamedConstructor(Console, 'internal_'); + dart.setSignature(Console, { + constructors: () => ({ + _safe: [Console, []], + _: [Console, []], + internal_: [Console, []] + }), + methods: () => ({ + assertCondition: [dart.void, [core.bool, core.Object]], + clear: [dart.void, [core.Object]], + count: [dart.void, [core.Object]], + debug: [dart.void, [core.Object]], + dir: [dart.void, [core.Object]], + dirxml: [dart.void, [core.Object]], + error: [dart.void, [core.Object]], + group: [dart.void, [core.Object]], + groupCollapsed: [dart.void, [core.Object]], + groupEnd: [dart.void, []], + info: [dart.void, [core.Object]], + log: [dart.void, [core.Object]], + markTimeline: [dart.void, [core.Object]], + profile: [dart.void, [core.String]], + profileEnd: [dart.void, [core.String]], + table: [dart.void, [core.Object]], + time: [dart.void, [core.String]], + timeEnd: [dart.void, [core.String]], + timeStamp: [dart.void, [core.Object]], + trace: [dart.void, [core.Object]], + warn: [dart.void, [core.Object]] + }), + statics: () => ({internalCreateConsole: [Console, []]}), + names: ['internalCreateConsole'] + }); + Console[dart.metadata] = () => [dart.const(new _metadata.DomName('Console'))]; + dart.defineLazyProperties(Console, { + get _safeConsole() { + return new Console._safe(); + } + }); + const _timeline_1 = Symbol('_timeline_1'); + const _timelineEnd_1 = Symbol('_timelineEnd_1'); + class ConsoleBase extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateConsoleBase() { + return new ConsoleBase.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + timeline(title) { + this[_timeline_1](title); + return; + } + [_timeline_1](title) { + return wrap_jso(this.raw.timeline(unwrap_jso(title))); + } + timelineEnd(title) { + this[_timelineEnd_1](title); + return; + } + [_timelineEnd_1](title) { + return wrap_jso(this.raw.timelineEnd(unwrap_jso(title))); + } + } + dart.defineNamedConstructor(ConsoleBase, 'internal_'); + dart.setSignature(ConsoleBase, { + constructors: () => ({ + _: [ConsoleBase, []], + internal_: [ConsoleBase, []] + }), + methods: () => ({ + timeline: [dart.void, [core.String]], + [_timeline_1]: [dart.void, [dart.dynamic]], + timelineEnd: [dart.void, [core.String]], + [_timelineEnd_1]: [dart.void, [dart.dynamic]] + }), + statics: () => ({internalCreateConsoleBase: [ConsoleBase, []]}), + names: ['internalCreateConsoleBase'] + }); + ConsoleBase[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('ConsoleBase')), dart.const(new _metadata.Experimental()), dart.const(new _js_helper.Native("ConsoleBase"))]; + class CssStyleDeclarationBase extends core.Object { + getPropertyValue(propertyName) { + return dart.throw(new core.StateError('getProperty not overridden in dart:html')); + } + setProperty(propertyName, value, priority) { + if (priority === void 0) + priority = null; + return dart.throw(new core.StateError('setProperty not overridden in dart:html')); + } + get alignContent() { + return this.getPropertyValue('align-content'); + } + set alignContent(value) { + this.setProperty('align-content', value, ''); + } + get alignItems() { + return this.getPropertyValue('align-items'); + } + set alignItems(value) { + this.setProperty('align-items', value, ''); + } + get alignSelf() { + return this.getPropertyValue('align-self'); + } + set alignSelf(value) { + this.setProperty('align-self', value, ''); + } + get animation() { + return this.getPropertyValue('animation'); + } + set animation(value) { + this.setProperty('animation', value, ''); + } + get animationDelay() { + return this.getPropertyValue('animation-delay'); + } + set animationDelay(value) { + this.setProperty('animation-delay', value, ''); + } + get animationDirection() { + return this.getPropertyValue('animation-direction'); + } + set animationDirection(value) { + this.setProperty('animation-direction', value, ''); + } + get animationDuration() { + return this.getPropertyValue('animation-duration'); + } + set animationDuration(value) { + this.setProperty('animation-duration', value, ''); + } + get animationFillMode() { + return this.getPropertyValue('animation-fill-mode'); + } + set animationFillMode(value) { + this.setProperty('animation-fill-mode', value, ''); + } + get animationIterationCount() { + return this.getPropertyValue('animation-iteration-count'); + } + set animationIterationCount(value) { + this.setProperty('animation-iteration-count', value, ''); + } + get animationName() { + return this.getPropertyValue('animation-name'); + } + set animationName(value) { + this.setProperty('animation-name', value, ''); + } + get animationPlayState() { + return this.getPropertyValue('animation-play-state'); + } + set animationPlayState(value) { + this.setProperty('animation-play-state', value, ''); + } + get animationTimingFunction() { + return this.getPropertyValue('animation-timing-function'); + } + set animationTimingFunction(value) { + this.setProperty('animation-timing-function', value, ''); + } + get appRegion() { + return this.getPropertyValue('app-region'); + } + set appRegion(value) { + this.setProperty('app-region', value, ''); + } + get appearance() { + return this.getPropertyValue('appearance'); + } + set appearance(value) { + this.setProperty('appearance', value, ''); + } + get aspectRatio() { + return this.getPropertyValue('aspect-ratio'); + } + set aspectRatio(value) { + this.setProperty('aspect-ratio', value, ''); + } + get backfaceVisibility() { + return this.getPropertyValue('backface-visibility'); + } + set backfaceVisibility(value) { + this.setProperty('backface-visibility', value, ''); + } + get background() { + return this.getPropertyValue('background'); + } + set background(value) { + this.setProperty('background', value, ''); + } + get backgroundAttachment() { + return this.getPropertyValue('background-attachment'); + } + set backgroundAttachment(value) { + this.setProperty('background-attachment', value, ''); + } + get backgroundBlendMode() { + return this.getPropertyValue('background-blend-mode'); + } + set backgroundBlendMode(value) { + this.setProperty('background-blend-mode', value, ''); + } + get backgroundClip() { + return this.getPropertyValue('background-clip'); + } + set backgroundClip(value) { + this.setProperty('background-clip', value, ''); + } + get backgroundColor() { + return this.getPropertyValue('background-color'); + } + set backgroundColor(value) { + this.setProperty('background-color', value, ''); + } + get backgroundComposite() { + return this.getPropertyValue('background-composite'); + } + set backgroundComposite(value) { + this.setProperty('background-composite', value, ''); + } + get backgroundImage() { + return this.getPropertyValue('background-image'); + } + set backgroundImage(value) { + this.setProperty('background-image', value, ''); + } + get backgroundOrigin() { + return this.getPropertyValue('background-origin'); + } + set backgroundOrigin(value) { + this.setProperty('background-origin', value, ''); + } + get backgroundPosition() { + return this.getPropertyValue('background-position'); + } + set backgroundPosition(value) { + this.setProperty('background-position', value, ''); + } + get backgroundPositionX() { + return this.getPropertyValue('background-position-x'); + } + set backgroundPositionX(value) { + this.setProperty('background-position-x', value, ''); + } + get backgroundPositionY() { + return this.getPropertyValue('background-position-y'); + } + set backgroundPositionY(value) { + this.setProperty('background-position-y', value, ''); + } + get backgroundRepeat() { + return this.getPropertyValue('background-repeat'); + } + set backgroundRepeat(value) { + this.setProperty('background-repeat', value, ''); + } + get backgroundRepeatX() { + return this.getPropertyValue('background-repeat-x'); + } + set backgroundRepeatX(value) { + this.setProperty('background-repeat-x', value, ''); + } + get backgroundRepeatY() { + return this.getPropertyValue('background-repeat-y'); + } + set backgroundRepeatY(value) { + this.setProperty('background-repeat-y', value, ''); + } + get backgroundSize() { + return this.getPropertyValue('background-size'); + } + set backgroundSize(value) { + this.setProperty('background-size', value, ''); + } + get border() { + return this.getPropertyValue('border'); + } + set border(value) { + this.setProperty('border', value, ''); + } + get borderAfter() { + return this.getPropertyValue('border-after'); + } + set borderAfter(value) { + this.setProperty('border-after', value, ''); + } + get borderAfterColor() { + return this.getPropertyValue('border-after-color'); + } + set borderAfterColor(value) { + this.setProperty('border-after-color', value, ''); + } + get borderAfterStyle() { + return this.getPropertyValue('border-after-style'); + } + set borderAfterStyle(value) { + this.setProperty('border-after-style', value, ''); + } + get borderAfterWidth() { + return this.getPropertyValue('border-after-width'); + } + set borderAfterWidth(value) { + this.setProperty('border-after-width', value, ''); + } + get borderBefore() { + return this.getPropertyValue('border-before'); + } + set borderBefore(value) { + this.setProperty('border-before', value, ''); + } + get borderBeforeColor() { + return this.getPropertyValue('border-before-color'); + } + set borderBeforeColor(value) { + this.setProperty('border-before-color', value, ''); + } + get borderBeforeStyle() { + return this.getPropertyValue('border-before-style'); + } + set borderBeforeStyle(value) { + this.setProperty('border-before-style', value, ''); + } + get borderBeforeWidth() { + return this.getPropertyValue('border-before-width'); + } + set borderBeforeWidth(value) { + this.setProperty('border-before-width', value, ''); + } + get borderBottom() { + return this.getPropertyValue('border-bottom'); + } + set borderBottom(value) { + this.setProperty('border-bottom', value, ''); + } + get borderBottomColor() { + return this.getPropertyValue('border-bottom-color'); + } + set borderBottomColor(value) { + this.setProperty('border-bottom-color', value, ''); + } + get borderBottomLeftRadius() { + return this.getPropertyValue('border-bottom-left-radius'); + } + set borderBottomLeftRadius(value) { + this.setProperty('border-bottom-left-radius', value, ''); + } + get borderBottomRightRadius() { + return this.getPropertyValue('border-bottom-right-radius'); + } + set borderBottomRightRadius(value) { + this.setProperty('border-bottom-right-radius', value, ''); + } + get borderBottomStyle() { + return this.getPropertyValue('border-bottom-style'); + } + set borderBottomStyle(value) { + this.setProperty('border-bottom-style', value, ''); + } + get borderBottomWidth() { + return this.getPropertyValue('border-bottom-width'); + } + set borderBottomWidth(value) { + this.setProperty('border-bottom-width', value, ''); + } + get borderCollapse() { + return this.getPropertyValue('border-collapse'); + } + set borderCollapse(value) { + this.setProperty('border-collapse', value, ''); + } + get borderColor() { + return this.getPropertyValue('border-color'); + } + set borderColor(value) { + this.setProperty('border-color', value, ''); + } + get borderEnd() { + return this.getPropertyValue('border-end'); + } + set borderEnd(value) { + this.setProperty('border-end', value, ''); + } + get borderEndColor() { + return this.getPropertyValue('border-end-color'); + } + set borderEndColor(value) { + this.setProperty('border-end-color', value, ''); + } + get borderEndStyle() { + return this.getPropertyValue('border-end-style'); + } + set borderEndStyle(value) { + this.setProperty('border-end-style', value, ''); + } + get borderEndWidth() { + return this.getPropertyValue('border-end-width'); + } + set borderEndWidth(value) { + this.setProperty('border-end-width', value, ''); + } + get borderFit() { + return this.getPropertyValue('border-fit'); + } + set borderFit(value) { + this.setProperty('border-fit', value, ''); + } + get borderHorizontalSpacing() { + return this.getPropertyValue('border-horizontal-spacing'); + } + set borderHorizontalSpacing(value) { + this.setProperty('border-horizontal-spacing', value, ''); + } + get borderImage() { + return this.getPropertyValue('border-image'); + } + set borderImage(value) { + this.setProperty('border-image', value, ''); + } + get borderImageOutset() { + return this.getPropertyValue('border-image-outset'); + } + set borderImageOutset(value) { + this.setProperty('border-image-outset', value, ''); + } + get borderImageRepeat() { + return this.getPropertyValue('border-image-repeat'); + } + set borderImageRepeat(value) { + this.setProperty('border-image-repeat', value, ''); + } + get borderImageSlice() { + return this.getPropertyValue('border-image-slice'); + } + set borderImageSlice(value) { + this.setProperty('border-image-slice', value, ''); + } + get borderImageSource() { + return this.getPropertyValue('border-image-source'); + } + set borderImageSource(value) { + this.setProperty('border-image-source', value, ''); + } + get borderImageWidth() { + return this.getPropertyValue('border-image-width'); + } + set borderImageWidth(value) { + this.setProperty('border-image-width', value, ''); + } + get borderLeft() { + return this.getPropertyValue('border-left'); + } + set borderLeft(value) { + this.setProperty('border-left', value, ''); + } + get borderLeftColor() { + return this.getPropertyValue('border-left-color'); + } + set borderLeftColor(value) { + this.setProperty('border-left-color', value, ''); + } + get borderLeftStyle() { + return this.getPropertyValue('border-left-style'); + } + set borderLeftStyle(value) { + this.setProperty('border-left-style', value, ''); + } + get borderLeftWidth() { + return this.getPropertyValue('border-left-width'); + } + set borderLeftWidth(value) { + this.setProperty('border-left-width', value, ''); + } + get borderRadius() { + return this.getPropertyValue('border-radius'); + } + set borderRadius(value) { + this.setProperty('border-radius', value, ''); + } + get borderRight() { + return this.getPropertyValue('border-right'); + } + set borderRight(value) { + this.setProperty('border-right', value, ''); + } + get borderRightColor() { + return this.getPropertyValue('border-right-color'); + } + set borderRightColor(value) { + this.setProperty('border-right-color', value, ''); + } + get borderRightStyle() { + return this.getPropertyValue('border-right-style'); + } + set borderRightStyle(value) { + this.setProperty('border-right-style', value, ''); + } + get borderRightWidth() { + return this.getPropertyValue('border-right-width'); + } + set borderRightWidth(value) { + this.setProperty('border-right-width', value, ''); + } + get borderSpacing() { + return this.getPropertyValue('border-spacing'); + } + set borderSpacing(value) { + this.setProperty('border-spacing', value, ''); + } + get borderStart() { + return this.getPropertyValue('border-start'); + } + set borderStart(value) { + this.setProperty('border-start', value, ''); + } + get borderStartColor() { + return this.getPropertyValue('border-start-color'); + } + set borderStartColor(value) { + this.setProperty('border-start-color', value, ''); + } + get borderStartStyle() { + return this.getPropertyValue('border-start-style'); + } + set borderStartStyle(value) { + this.setProperty('border-start-style', value, ''); + } + get borderStartWidth() { + return this.getPropertyValue('border-start-width'); + } + set borderStartWidth(value) { + this.setProperty('border-start-width', value, ''); + } + get borderStyle() { + return this.getPropertyValue('border-style'); + } + set borderStyle(value) { + this.setProperty('border-style', value, ''); + } + get borderTop() { + return this.getPropertyValue('border-top'); + } + set borderTop(value) { + this.setProperty('border-top', value, ''); + } + get borderTopColor() { + return this.getPropertyValue('border-top-color'); + } + set borderTopColor(value) { + this.setProperty('border-top-color', value, ''); + } + get borderTopLeftRadius() { + return this.getPropertyValue('border-top-left-radius'); + } + set borderTopLeftRadius(value) { + this.setProperty('border-top-left-radius', value, ''); + } + get borderTopRightRadius() { + return this.getPropertyValue('border-top-right-radius'); + } + set borderTopRightRadius(value) { + this.setProperty('border-top-right-radius', value, ''); + } + get borderTopStyle() { + return this.getPropertyValue('border-top-style'); + } + set borderTopStyle(value) { + this.setProperty('border-top-style', value, ''); + } + get borderTopWidth() { + return this.getPropertyValue('border-top-width'); + } + set borderTopWidth(value) { + this.setProperty('border-top-width', value, ''); + } + get borderVerticalSpacing() { + return this.getPropertyValue('border-vertical-spacing'); + } + set borderVerticalSpacing(value) { + this.setProperty('border-vertical-spacing', value, ''); + } + get borderWidth() { + return this.getPropertyValue('border-width'); + } + set borderWidth(value) { + this.setProperty('border-width', value, ''); + } + get bottom() { + return this.getPropertyValue('bottom'); + } + set bottom(value) { + this.setProperty('bottom', value, ''); + } + get boxAlign() { + return this.getPropertyValue('box-align'); + } + set boxAlign(value) { + this.setProperty('box-align', value, ''); + } + get boxDecorationBreak() { + return this.getPropertyValue('box-decoration-break'); + } + set boxDecorationBreak(value) { + this.setProperty('box-decoration-break', value, ''); + } + get boxDirection() { + return this.getPropertyValue('box-direction'); + } + set boxDirection(value) { + this.setProperty('box-direction', value, ''); + } + get boxFlex() { + return this.getPropertyValue('box-flex'); + } + set boxFlex(value) { + this.setProperty('box-flex', value, ''); + } + get boxFlexGroup() { + return this.getPropertyValue('box-flex-group'); + } + set boxFlexGroup(value) { + this.setProperty('box-flex-group', value, ''); + } + get boxLines() { + return this.getPropertyValue('box-lines'); + } + set boxLines(value) { + this.setProperty('box-lines', value, ''); + } + get boxOrdinalGroup() { + return this.getPropertyValue('box-ordinal-group'); + } + set boxOrdinalGroup(value) { + this.setProperty('box-ordinal-group', value, ''); + } + get boxOrient() { + return this.getPropertyValue('box-orient'); + } + set boxOrient(value) { + this.setProperty('box-orient', value, ''); + } + get boxPack() { + return this.getPropertyValue('box-pack'); + } + set boxPack(value) { + this.setProperty('box-pack', value, ''); + } + get boxReflect() { + return this.getPropertyValue('box-reflect'); + } + set boxReflect(value) { + this.setProperty('box-reflect', value, ''); + } + get boxShadow() { + return this.getPropertyValue('box-shadow'); + } + set boxShadow(value) { + this.setProperty('box-shadow', value, ''); + } + get boxSizing() { + return this.getPropertyValue('box-sizing'); + } + set boxSizing(value) { + this.setProperty('box-sizing', value, ''); + } + get captionSide() { + return this.getPropertyValue('caption-side'); + } + set captionSide(value) { + this.setProperty('caption-side', value, ''); + } + get clear() { + return this.getPropertyValue('clear'); + } + set clear(value) { + this.setProperty('clear', value, ''); + } + get clip() { + return this.getPropertyValue('clip'); + } + set clip(value) { + this.setProperty('clip', value, ''); + } + get clipPath() { + return this.getPropertyValue('clip-path'); + } + set clipPath(value) { + this.setProperty('clip-path', value, ''); + } + get color() { + return this.getPropertyValue('color'); + } + set color(value) { + this.setProperty('color', value, ''); + } + get columnBreakAfter() { + return this.getPropertyValue('column-break-after'); + } + set columnBreakAfter(value) { + this.setProperty('column-break-after', value, ''); + } + get columnBreakBefore() { + return this.getPropertyValue('column-break-before'); + } + set columnBreakBefore(value) { + this.setProperty('column-break-before', value, ''); + } + get columnBreakInside() { + return this.getPropertyValue('column-break-inside'); + } + set columnBreakInside(value) { + this.setProperty('column-break-inside', value, ''); + } + get columnCount() { + return this.getPropertyValue('column-count'); + } + set columnCount(value) { + this.setProperty('column-count', value, ''); + } + get columnFill() { + return this.getPropertyValue('column-fill'); + } + set columnFill(value) { + this.setProperty('column-fill', value, ''); + } + get columnGap() { + return this.getPropertyValue('column-gap'); + } + set columnGap(value) { + this.setProperty('column-gap', value, ''); + } + get columnRule() { + return this.getPropertyValue('column-rule'); + } + set columnRule(value) { + this.setProperty('column-rule', value, ''); + } + get columnRuleColor() { + return this.getPropertyValue('column-rule-color'); + } + set columnRuleColor(value) { + this.setProperty('column-rule-color', value, ''); + } + get columnRuleStyle() { + return this.getPropertyValue('column-rule-style'); + } + set columnRuleStyle(value) { + this.setProperty('column-rule-style', value, ''); + } + get columnRuleWidth() { + return this.getPropertyValue('column-rule-width'); + } + set columnRuleWidth(value) { + this.setProperty('column-rule-width', value, ''); + } + get columnSpan() { + return this.getPropertyValue('column-span'); + } + set columnSpan(value) { + this.setProperty('column-span', value, ''); + } + get columnWidth() { + return this.getPropertyValue('column-width'); + } + set columnWidth(value) { + this.setProperty('column-width', value, ''); + } + get columns() { + return this.getPropertyValue('columns'); + } + set columns(value) { + this.setProperty('columns', value, ''); + } + get content() { + return this.getPropertyValue('content'); + } + set content(value) { + this.setProperty('content', value, ''); + } + get counterIncrement() { + return this.getPropertyValue('counter-increment'); + } + set counterIncrement(value) { + this.setProperty('counter-increment', value, ''); + } + get counterReset() { + return this.getPropertyValue('counter-reset'); + } + set counterReset(value) { + this.setProperty('counter-reset', value, ''); + } + get cursor() { + return this.getPropertyValue('cursor'); + } + set cursor(value) { + this.setProperty('cursor', value, ''); + } + get direction() { + return this.getPropertyValue('direction'); + } + set direction(value) { + this.setProperty('direction', value, ''); + } + get display() { + return this.getPropertyValue('display'); + } + set display(value) { + this.setProperty('display', value, ''); + } + get emptyCells() { + return this.getPropertyValue('empty-cells'); + } + set emptyCells(value) { + this.setProperty('empty-cells', value, ''); + } + get filter() { + return this.getPropertyValue('filter'); + } + set filter(value) { + this.setProperty('filter', value, ''); + } + get flex() { + return this.getPropertyValue('flex'); + } + set flex(value) { + this.setProperty('flex', value, ''); + } + get flexBasis() { + return this.getPropertyValue('flex-basis'); + } + set flexBasis(value) { + this.setProperty('flex-basis', value, ''); + } + get flexDirection() { + return this.getPropertyValue('flex-direction'); + } + set flexDirection(value) { + this.setProperty('flex-direction', value, ''); + } + get flexFlow() { + return this.getPropertyValue('flex-flow'); + } + set flexFlow(value) { + this.setProperty('flex-flow', value, ''); + } + get flexGrow() { + return this.getPropertyValue('flex-grow'); + } + set flexGrow(value) { + this.setProperty('flex-grow', value, ''); + } + get flexShrink() { + return this.getPropertyValue('flex-shrink'); + } + set flexShrink(value) { + this.setProperty('flex-shrink', value, ''); + } + get flexWrap() { + return this.getPropertyValue('flex-wrap'); + } + set flexWrap(value) { + this.setProperty('flex-wrap', value, ''); + } + get float() { + return this.getPropertyValue('float'); + } + set float(value) { + this.setProperty('float', value, ''); + } + get font() { + return this.getPropertyValue('font'); + } + set font(value) { + this.setProperty('font', value, ''); + } + get fontFamily() { + return this.getPropertyValue('font-family'); + } + set fontFamily(value) { + this.setProperty('font-family', value, ''); + } + get fontFeatureSettings() { + return this.getPropertyValue('font-feature-settings'); + } + set fontFeatureSettings(value) { + this.setProperty('font-feature-settings', value, ''); + } + get fontKerning() { + return this.getPropertyValue('font-kerning'); + } + set fontKerning(value) { + this.setProperty('font-kerning', value, ''); + } + get fontSize() { + return this.getPropertyValue('font-size'); + } + set fontSize(value) { + this.setProperty('font-size', value, ''); + } + get fontSizeDelta() { + return this.getPropertyValue('font-size-delta'); + } + set fontSizeDelta(value) { + this.setProperty('font-size-delta', value, ''); + } + get fontSmoothing() { + return this.getPropertyValue('font-smoothing'); + } + set fontSmoothing(value) { + this.setProperty('font-smoothing', value, ''); + } + get fontStretch() { + return this.getPropertyValue('font-stretch'); + } + set fontStretch(value) { + this.setProperty('font-stretch', value, ''); + } + get fontStyle() { + return this.getPropertyValue('font-style'); + } + set fontStyle(value) { + this.setProperty('font-style', value, ''); + } + get fontVariant() { + return this.getPropertyValue('font-variant'); + } + set fontVariant(value) { + this.setProperty('font-variant', value, ''); + } + get fontVariantLigatures() { + return this.getPropertyValue('font-variant-ligatures'); + } + set fontVariantLigatures(value) { + this.setProperty('font-variant-ligatures', value, ''); + } + get fontWeight() { + return this.getPropertyValue('font-weight'); + } + set fontWeight(value) { + this.setProperty('font-weight', value, ''); + } + get grid() { + return this.getPropertyValue('grid'); + } + set grid(value) { + this.setProperty('grid', value, ''); + } + get gridArea() { + return this.getPropertyValue('grid-area'); + } + set gridArea(value) { + this.setProperty('grid-area', value, ''); + } + get gridAutoColumns() { + return this.getPropertyValue('grid-auto-columns'); + } + set gridAutoColumns(value) { + this.setProperty('grid-auto-columns', value, ''); + } + get gridAutoFlow() { + return this.getPropertyValue('grid-auto-flow'); + } + set gridAutoFlow(value) { + this.setProperty('grid-auto-flow', value, ''); + } + get gridAutoRows() { + return this.getPropertyValue('grid-auto-rows'); + } + set gridAutoRows(value) { + this.setProperty('grid-auto-rows', value, ''); + } + get gridColumn() { + return this.getPropertyValue('grid-column'); + } + set gridColumn(value) { + this.setProperty('grid-column', value, ''); + } + get gridColumnEnd() { + return this.getPropertyValue('grid-column-end'); + } + set gridColumnEnd(value) { + this.setProperty('grid-column-end', value, ''); + } + get gridColumnStart() { + return this.getPropertyValue('grid-column-start'); + } + set gridColumnStart(value) { + this.setProperty('grid-column-start', value, ''); + } + get gridRow() { + return this.getPropertyValue('grid-row'); + } + set gridRow(value) { + this.setProperty('grid-row', value, ''); + } + get gridRowEnd() { + return this.getPropertyValue('grid-row-end'); + } + set gridRowEnd(value) { + this.setProperty('grid-row-end', value, ''); + } + get gridRowStart() { + return this.getPropertyValue('grid-row-start'); + } + set gridRowStart(value) { + this.setProperty('grid-row-start', value, ''); + } + get gridTemplate() { + return this.getPropertyValue('grid-template'); + } + set gridTemplate(value) { + this.setProperty('grid-template', value, ''); + } + get gridTemplateAreas() { + return this.getPropertyValue('grid-template-areas'); + } + set gridTemplateAreas(value) { + this.setProperty('grid-template-areas', value, ''); + } + get gridTemplateColumns() { + return this.getPropertyValue('grid-template-columns'); + } + set gridTemplateColumns(value) { + this.setProperty('grid-template-columns', value, ''); + } + get gridTemplateRows() { + return this.getPropertyValue('grid-template-rows'); + } + set gridTemplateRows(value) { + this.setProperty('grid-template-rows', value, ''); + } + get height() { + return this.getPropertyValue('height'); + } + set height(value) { + this.setProperty('height', value, ''); + } + get highlight() { + return this.getPropertyValue('highlight'); + } + set highlight(value) { + this.setProperty('highlight', value, ''); + } + get hyphenateCharacter() { + return this.getPropertyValue('hyphenate-character'); + } + set hyphenateCharacter(value) { + this.setProperty('hyphenate-character', value, ''); + } + get imageRendering() { + return this.getPropertyValue('image-rendering'); + } + set imageRendering(value) { + this.setProperty('image-rendering', value, ''); + } + get isolation() { + return this.getPropertyValue('isolation'); + } + set isolation(value) { + this.setProperty('isolation', value, ''); + } + get justifyContent() { + return this.getPropertyValue('justify-content'); + } + set justifyContent(value) { + this.setProperty('justify-content', value, ''); + } + get justifySelf() { + return this.getPropertyValue('justify-self'); + } + set justifySelf(value) { + this.setProperty('justify-self', value, ''); + } + get left() { + return this.getPropertyValue('left'); + } + set left(value) { + this.setProperty('left', value, ''); + } + get letterSpacing() { + return this.getPropertyValue('letter-spacing'); + } + set letterSpacing(value) { + this.setProperty('letter-spacing', value, ''); + } + get lineBoxContain() { + return this.getPropertyValue('line-box-contain'); + } + set lineBoxContain(value) { + this.setProperty('line-box-contain', value, ''); + } + get lineBreak() { + return this.getPropertyValue('line-break'); + } + set lineBreak(value) { + this.setProperty('line-break', value, ''); + } + get lineClamp() { + return this.getPropertyValue('line-clamp'); + } + set lineClamp(value) { + this.setProperty('line-clamp', value, ''); + } + get lineHeight() { + return this.getPropertyValue('line-height'); + } + set lineHeight(value) { + this.setProperty('line-height', value, ''); + } + get listStyle() { + return this.getPropertyValue('list-style'); + } + set listStyle(value) { + this.setProperty('list-style', value, ''); + } + get listStyleImage() { + return this.getPropertyValue('list-style-image'); + } + set listStyleImage(value) { + this.setProperty('list-style-image', value, ''); + } + get listStylePosition() { + return this.getPropertyValue('list-style-position'); + } + set listStylePosition(value) { + this.setProperty('list-style-position', value, ''); + } + get listStyleType() { + return this.getPropertyValue('list-style-type'); + } + set listStyleType(value) { + this.setProperty('list-style-type', value, ''); + } + get locale() { + return this.getPropertyValue('locale'); + } + set locale(value) { + this.setProperty('locale', value, ''); + } + get logicalHeight() { + return this.getPropertyValue('logical-height'); + } + set logicalHeight(value) { + this.setProperty('logical-height', value, ''); + } + get logicalWidth() { + return this.getPropertyValue('logical-width'); + } + set logicalWidth(value) { + this.setProperty('logical-width', value, ''); + } + get margin() { + return this.getPropertyValue('margin'); + } + set margin(value) { + this.setProperty('margin', value, ''); + } + get marginAfter() { + return this.getPropertyValue('margin-after'); + } + set marginAfter(value) { + this.setProperty('margin-after', value, ''); + } + get marginAfterCollapse() { + return this.getPropertyValue('margin-after-collapse'); + } + set marginAfterCollapse(value) { + this.setProperty('margin-after-collapse', value, ''); + } + get marginBefore() { + return this.getPropertyValue('margin-before'); + } + set marginBefore(value) { + this.setProperty('margin-before', value, ''); + } + get marginBeforeCollapse() { + return this.getPropertyValue('margin-before-collapse'); + } + set marginBeforeCollapse(value) { + this.setProperty('margin-before-collapse', value, ''); + } + get marginBottom() { + return this.getPropertyValue('margin-bottom'); + } + set marginBottom(value) { + this.setProperty('margin-bottom', value, ''); + } + get marginBottomCollapse() { + return this.getPropertyValue('margin-bottom-collapse'); + } + set marginBottomCollapse(value) { + this.setProperty('margin-bottom-collapse', value, ''); + } + get marginCollapse() { + return this.getPropertyValue('margin-collapse'); + } + set marginCollapse(value) { + this.setProperty('margin-collapse', value, ''); + } + get marginEnd() { + return this.getPropertyValue('margin-end'); + } + set marginEnd(value) { + this.setProperty('margin-end', value, ''); + } + get marginLeft() { + return this.getPropertyValue('margin-left'); + } + set marginLeft(value) { + this.setProperty('margin-left', value, ''); + } + get marginRight() { + return this.getPropertyValue('margin-right'); + } + set marginRight(value) { + this.setProperty('margin-right', value, ''); + } + get marginStart() { + return this.getPropertyValue('margin-start'); + } + set marginStart(value) { + this.setProperty('margin-start', value, ''); + } + get marginTop() { + return this.getPropertyValue('margin-top'); + } + set marginTop(value) { + this.setProperty('margin-top', value, ''); + } + get marginTopCollapse() { + return this.getPropertyValue('margin-top-collapse'); + } + set marginTopCollapse(value) { + this.setProperty('margin-top-collapse', value, ''); + } + get mask() { + return this.getPropertyValue('mask'); + } + set mask(value) { + this.setProperty('mask', value, ''); + } + get maskBoxImage() { + return this.getPropertyValue('mask-box-image'); + } + set maskBoxImage(value) { + this.setProperty('mask-box-image', value, ''); + } + get maskBoxImageOutset() { + return this.getPropertyValue('mask-box-image-outset'); + } + set maskBoxImageOutset(value) { + this.setProperty('mask-box-image-outset', value, ''); + } + get maskBoxImageRepeat() { + return this.getPropertyValue('mask-box-image-repeat'); + } + set maskBoxImageRepeat(value) { + this.setProperty('mask-box-image-repeat', value, ''); + } + get maskBoxImageSlice() { + return this.getPropertyValue('mask-box-image-slice'); + } + set maskBoxImageSlice(value) { + this.setProperty('mask-box-image-slice', value, ''); + } + get maskBoxImageSource() { + return this.getPropertyValue('mask-box-image-source'); + } + set maskBoxImageSource(value) { + this.setProperty('mask-box-image-source', value, ''); + } + get maskBoxImageWidth() { + return this.getPropertyValue('mask-box-image-width'); + } + set maskBoxImageWidth(value) { + this.setProperty('mask-box-image-width', value, ''); + } + get maskClip() { + return this.getPropertyValue('mask-clip'); + } + set maskClip(value) { + this.setProperty('mask-clip', value, ''); + } + get maskComposite() { + return this.getPropertyValue('mask-composite'); + } + set maskComposite(value) { + this.setProperty('mask-composite', value, ''); + } + get maskImage() { + return this.getPropertyValue('mask-image'); + } + set maskImage(value) { + this.setProperty('mask-image', value, ''); + } + get maskOrigin() { + return this.getPropertyValue('mask-origin'); + } + set maskOrigin(value) { + this.setProperty('mask-origin', value, ''); + } + get maskPosition() { + return this.getPropertyValue('mask-position'); + } + set maskPosition(value) { + this.setProperty('mask-position', value, ''); + } + get maskPositionX() { + return this.getPropertyValue('mask-position-x'); + } + set maskPositionX(value) { + this.setProperty('mask-position-x', value, ''); + } + get maskPositionY() { + return this.getPropertyValue('mask-position-y'); + } + set maskPositionY(value) { + this.setProperty('mask-position-y', value, ''); + } + get maskRepeat() { + return this.getPropertyValue('mask-repeat'); + } + set maskRepeat(value) { + this.setProperty('mask-repeat', value, ''); + } + get maskRepeatX() { + return this.getPropertyValue('mask-repeat-x'); + } + set maskRepeatX(value) { + this.setProperty('mask-repeat-x', value, ''); + } + get maskRepeatY() { + return this.getPropertyValue('mask-repeat-y'); + } + set maskRepeatY(value) { + this.setProperty('mask-repeat-y', value, ''); + } + get maskSize() { + return this.getPropertyValue('mask-size'); + } + set maskSize(value) { + this.setProperty('mask-size', value, ''); + } + get maskSourceType() { + return this.getPropertyValue('mask-source-type'); + } + set maskSourceType(value) { + this.setProperty('mask-source-type', value, ''); + } + get maxHeight() { + return this.getPropertyValue('max-height'); + } + set maxHeight(value) { + this.setProperty('max-height', value, ''); + } + get maxLogicalHeight() { + return this.getPropertyValue('max-logical-height'); + } + set maxLogicalHeight(value) { + this.setProperty('max-logical-height', value, ''); + } + get maxLogicalWidth() { + return this.getPropertyValue('max-logical-width'); + } + set maxLogicalWidth(value) { + this.setProperty('max-logical-width', value, ''); + } + get maxWidth() { + return this.getPropertyValue('max-width'); + } + set maxWidth(value) { + this.setProperty('max-width', value, ''); + } + get maxZoom() { + return this.getPropertyValue('max-zoom'); + } + set maxZoom(value) { + this.setProperty('max-zoom', value, ''); + } + get minHeight() { + return this.getPropertyValue('min-height'); + } + set minHeight(value) { + this.setProperty('min-height', value, ''); + } + get minLogicalHeight() { + return this.getPropertyValue('min-logical-height'); + } + set minLogicalHeight(value) { + this.setProperty('min-logical-height', value, ''); + } + get minLogicalWidth() { + return this.getPropertyValue('min-logical-width'); + } + set minLogicalWidth(value) { + this.setProperty('min-logical-width', value, ''); + } + get minWidth() { + return this.getPropertyValue('min-width'); + } + set minWidth(value) { + this.setProperty('min-width', value, ''); + } + get minZoom() { + return this.getPropertyValue('min-zoom'); + } + set minZoom(value) { + this.setProperty('min-zoom', value, ''); + } + get mixBlendMode() { + return this.getPropertyValue('mix-blend-mode'); + } + set mixBlendMode(value) { + this.setProperty('mix-blend-mode', value, ''); + } + get objectFit() { + return this.getPropertyValue('object-fit'); + } + set objectFit(value) { + this.setProperty('object-fit', value, ''); + } + get objectPosition() { + return this.getPropertyValue('object-position'); + } + set objectPosition(value) { + this.setProperty('object-position', value, ''); + } + get opacity() { + return this.getPropertyValue('opacity'); + } + set opacity(value) { + this.setProperty('opacity', value, ''); + } + get order() { + return this.getPropertyValue('order'); + } + set order(value) { + this.setProperty('order', value, ''); + } + get orientation() { + return this.getPropertyValue('orientation'); + } + set orientation(value) { + this.setProperty('orientation', value, ''); + } + get orphans() { + return this.getPropertyValue('orphans'); + } + set orphans(value) { + this.setProperty('orphans', value, ''); + } + get outline() { + return this.getPropertyValue('outline'); + } + set outline(value) { + this.setProperty('outline', value, ''); + } + get outlineColor() { + return this.getPropertyValue('outline-color'); + } + set outlineColor(value) { + this.setProperty('outline-color', value, ''); + } + get outlineOffset() { + return this.getPropertyValue('outline-offset'); + } + set outlineOffset(value) { + this.setProperty('outline-offset', value, ''); + } + get outlineStyle() { + return this.getPropertyValue('outline-style'); + } + set outlineStyle(value) { + this.setProperty('outline-style', value, ''); + } + get outlineWidth() { + return this.getPropertyValue('outline-width'); + } + set outlineWidth(value) { + this.setProperty('outline-width', value, ''); + } + get overflow() { + return this.getPropertyValue('overflow'); + } + set overflow(value) { + this.setProperty('overflow', value, ''); + } + get overflowWrap() { + return this.getPropertyValue('overflow-wrap'); + } + set overflowWrap(value) { + this.setProperty('overflow-wrap', value, ''); + } + get overflowX() { + return this.getPropertyValue('overflow-x'); + } + set overflowX(value) { + this.setProperty('overflow-x', value, ''); + } + get overflowY() { + return this.getPropertyValue('overflow-y'); + } + set overflowY(value) { + this.setProperty('overflow-y', value, ''); + } + get padding() { + return this.getPropertyValue('padding'); + } + set padding(value) { + this.setProperty('padding', value, ''); + } + get paddingAfter() { + return this.getPropertyValue('padding-after'); + } + set paddingAfter(value) { + this.setProperty('padding-after', value, ''); + } + get paddingBefore() { + return this.getPropertyValue('padding-before'); + } + set paddingBefore(value) { + this.setProperty('padding-before', value, ''); + } + get paddingBottom() { + return this.getPropertyValue('padding-bottom'); + } + set paddingBottom(value) { + this.setProperty('padding-bottom', value, ''); + } + get paddingEnd() { + return this.getPropertyValue('padding-end'); + } + set paddingEnd(value) { + this.setProperty('padding-end', value, ''); + } + get paddingLeft() { + return this.getPropertyValue('padding-left'); + } + set paddingLeft(value) { + this.setProperty('padding-left', value, ''); + } + get paddingRight() { + return this.getPropertyValue('padding-right'); + } + set paddingRight(value) { + this.setProperty('padding-right', value, ''); + } + get paddingStart() { + return this.getPropertyValue('padding-start'); + } + set paddingStart(value) { + this.setProperty('padding-start', value, ''); + } + get paddingTop() { + return this.getPropertyValue('padding-top'); + } + set paddingTop(value) { + this.setProperty('padding-top', value, ''); + } + get page() { + return this.getPropertyValue('page'); + } + set page(value) { + this.setProperty('page', value, ''); + } + get pageBreakAfter() { + return this.getPropertyValue('page-break-after'); + } + set pageBreakAfter(value) { + this.setProperty('page-break-after', value, ''); + } + get pageBreakBefore() { + return this.getPropertyValue('page-break-before'); + } + set pageBreakBefore(value) { + this.setProperty('page-break-before', value, ''); + } + get pageBreakInside() { + return this.getPropertyValue('page-break-inside'); + } + set pageBreakInside(value) { + this.setProperty('page-break-inside', value, ''); + } + get perspective() { + return this.getPropertyValue('perspective'); + } + set perspective(value) { + this.setProperty('perspective', value, ''); + } + get perspectiveOrigin() { + return this.getPropertyValue('perspective-origin'); + } + set perspectiveOrigin(value) { + this.setProperty('perspective-origin', value, ''); + } + get perspectiveOriginX() { + return this.getPropertyValue('perspective-origin-x'); + } + set perspectiveOriginX(value) { + this.setProperty('perspective-origin-x', value, ''); + } + get perspectiveOriginY() { + return this.getPropertyValue('perspective-origin-y'); + } + set perspectiveOriginY(value) { + this.setProperty('perspective-origin-y', value, ''); + } + get pointerEvents() { + return this.getPropertyValue('pointer-events'); + } + set pointerEvents(value) { + this.setProperty('pointer-events', value, ''); + } + get position() { + return this.getPropertyValue('position'); + } + set position(value) { + this.setProperty('position', value, ''); + } + get printColorAdjust() { + return this.getPropertyValue('print-color-adjust'); + } + set printColorAdjust(value) { + this.setProperty('print-color-adjust', value, ''); + } + get quotes() { + return this.getPropertyValue('quotes'); + } + set quotes(value) { + this.setProperty('quotes', value, ''); + } + get resize() { + return this.getPropertyValue('resize'); + } + set resize(value) { + this.setProperty('resize', value, ''); + } + get right() { + return this.getPropertyValue('right'); + } + set right(value) { + this.setProperty('right', value, ''); + } + get rtlOrdering() { + return this.getPropertyValue('rtl-ordering'); + } + set rtlOrdering(value) { + this.setProperty('rtl-ordering', value, ''); + } + get rubyPosition() { + return this.getPropertyValue('ruby-position'); + } + set rubyPosition(value) { + this.setProperty('ruby-position', value, ''); + } + get scrollBehavior() { + return this.getPropertyValue('scroll-behavior'); + } + set scrollBehavior(value) { + this.setProperty('scroll-behavior', value, ''); + } + get shapeImageThreshold() { + return this.getPropertyValue('shape-image-threshold'); + } + set shapeImageThreshold(value) { + this.setProperty('shape-image-threshold', value, ''); + } + get shapeMargin() { + return this.getPropertyValue('shape-margin'); + } + set shapeMargin(value) { + this.setProperty('shape-margin', value, ''); + } + get shapeOutside() { + return this.getPropertyValue('shape-outside'); + } + set shapeOutside(value) { + this.setProperty('shape-outside', value, ''); + } + get size() { + return this.getPropertyValue('size'); + } + set size(value) { + this.setProperty('size', value, ''); + } + get speak() { + return this.getPropertyValue('speak'); + } + set speak(value) { + this.setProperty('speak', value, ''); + } + get src() { + return this.getPropertyValue('src'); + } + set src(value) { + this.setProperty('src', value, ''); + } + get tabSize() { + return this.getPropertyValue('tab-size'); + } + set tabSize(value) { + this.setProperty('tab-size', value, ''); + } + get tableLayout() { + return this.getPropertyValue('table-layout'); + } + set tableLayout(value) { + this.setProperty('table-layout', value, ''); + } + get tapHighlightColor() { + return this.getPropertyValue('tap-highlight-color'); + } + set tapHighlightColor(value) { + this.setProperty('tap-highlight-color', value, ''); + } + get textAlign() { + return this.getPropertyValue('text-align'); + } + set textAlign(value) { + this.setProperty('text-align', value, ''); + } + get textAlignLast() { + return this.getPropertyValue('text-align-last'); + } + set textAlignLast(value) { + this.setProperty('text-align-last', value, ''); + } + get textCombine() { + return this.getPropertyValue('text-combine'); + } + set textCombine(value) { + this.setProperty('text-combine', value, ''); + } + get textDecoration() { + return this.getPropertyValue('text-decoration'); + } + set textDecoration(value) { + this.setProperty('text-decoration', value, ''); + } + get textDecorationColor() { + return this.getPropertyValue('text-decoration-color'); + } + set textDecorationColor(value) { + this.setProperty('text-decoration-color', value, ''); + } + get textDecorationLine() { + return this.getPropertyValue('text-decoration-line'); + } + set textDecorationLine(value) { + this.setProperty('text-decoration-line', value, ''); + } + get textDecorationStyle() { + return this.getPropertyValue('text-decoration-style'); + } + set textDecorationStyle(value) { + this.setProperty('text-decoration-style', value, ''); + } + get textDecorationsInEffect() { + return this.getPropertyValue('text-decorations-in-effect'); + } + set textDecorationsInEffect(value) { + this.setProperty('text-decorations-in-effect', value, ''); + } + get textEmphasis() { + return this.getPropertyValue('text-emphasis'); + } + set textEmphasis(value) { + this.setProperty('text-emphasis', value, ''); + } + get textEmphasisColor() { + return this.getPropertyValue('text-emphasis-color'); + } + set textEmphasisColor(value) { + this.setProperty('text-emphasis-color', value, ''); + } + get textEmphasisPosition() { + return this.getPropertyValue('text-emphasis-position'); + } + set textEmphasisPosition(value) { + this.setProperty('text-emphasis-position', value, ''); + } + get textEmphasisStyle() { + return this.getPropertyValue('text-emphasis-style'); + } + set textEmphasisStyle(value) { + this.setProperty('text-emphasis-style', value, ''); + } + get textFillColor() { + return this.getPropertyValue('text-fill-color'); + } + set textFillColor(value) { + this.setProperty('text-fill-color', value, ''); + } + get textIndent() { + return this.getPropertyValue('text-indent'); + } + set textIndent(value) { + this.setProperty('text-indent', value, ''); + } + get textJustify() { + return this.getPropertyValue('text-justify'); + } + set textJustify(value) { + this.setProperty('text-justify', value, ''); + } + get textLineThroughColor() { + return this.getPropertyValue('text-line-through-color'); + } + set textLineThroughColor(value) { + this.setProperty('text-line-through-color', value, ''); + } + get textLineThroughMode() { + return this.getPropertyValue('text-line-through-mode'); + } + set textLineThroughMode(value) { + this.setProperty('text-line-through-mode', value, ''); + } + get textLineThroughStyle() { + return this.getPropertyValue('text-line-through-style'); + } + set textLineThroughStyle(value) { + this.setProperty('text-line-through-style', value, ''); + } + get textLineThroughWidth() { + return this.getPropertyValue('text-line-through-width'); + } + set textLineThroughWidth(value) { + this.setProperty('text-line-through-width', value, ''); + } + get textOrientation() { + return this.getPropertyValue('text-orientation'); + } + set textOrientation(value) { + this.setProperty('text-orientation', value, ''); + } + get textOverflow() { + return this.getPropertyValue('text-overflow'); + } + set textOverflow(value) { + this.setProperty('text-overflow', value, ''); + } + get textOverlineColor() { + return this.getPropertyValue('text-overline-color'); + } + set textOverlineColor(value) { + this.setProperty('text-overline-color', value, ''); + } + get textOverlineMode() { + return this.getPropertyValue('text-overline-mode'); + } + set textOverlineMode(value) { + this.setProperty('text-overline-mode', value, ''); + } + get textOverlineStyle() { + return this.getPropertyValue('text-overline-style'); + } + set textOverlineStyle(value) { + this.setProperty('text-overline-style', value, ''); + } + get textOverlineWidth() { + return this.getPropertyValue('text-overline-width'); + } + set textOverlineWidth(value) { + this.setProperty('text-overline-width', value, ''); + } + get textRendering() { + return this.getPropertyValue('text-rendering'); + } + set textRendering(value) { + this.setProperty('text-rendering', value, ''); + } + get textSecurity() { + return this.getPropertyValue('text-security'); + } + set textSecurity(value) { + this.setProperty('text-security', value, ''); + } + get textShadow() { + return this.getPropertyValue('text-shadow'); + } + set textShadow(value) { + this.setProperty('text-shadow', value, ''); + } + get textStroke() { + return this.getPropertyValue('text-stroke'); + } + set textStroke(value) { + this.setProperty('text-stroke', value, ''); + } + get textStrokeColor() { + return this.getPropertyValue('text-stroke-color'); + } + set textStrokeColor(value) { + this.setProperty('text-stroke-color', value, ''); + } + get textStrokeWidth() { + return this.getPropertyValue('text-stroke-width'); + } + set textStrokeWidth(value) { + this.setProperty('text-stroke-width', value, ''); + } + get textTransform() { + return this.getPropertyValue('text-transform'); + } + set textTransform(value) { + this.setProperty('text-transform', value, ''); + } + get textUnderlineColor() { + return this.getPropertyValue('text-underline-color'); + } + set textUnderlineColor(value) { + this.setProperty('text-underline-color', value, ''); + } + get textUnderlineMode() { + return this.getPropertyValue('text-underline-mode'); + } + set textUnderlineMode(value) { + this.setProperty('text-underline-mode', value, ''); + } + get textUnderlinePosition() { + return this.getPropertyValue('text-underline-position'); + } + set textUnderlinePosition(value) { + this.setProperty('text-underline-position', value, ''); + } + get textUnderlineStyle() { + return this.getPropertyValue('text-underline-style'); + } + set textUnderlineStyle(value) { + this.setProperty('text-underline-style', value, ''); + } + get textUnderlineWidth() { + return this.getPropertyValue('text-underline-width'); + } + set textUnderlineWidth(value) { + this.setProperty('text-underline-width', value, ''); + } + get top() { + return this.getPropertyValue('top'); + } + set top(value) { + this.setProperty('top', value, ''); + } + get touchAction() { + return this.getPropertyValue('touch-action'); + } + set touchAction(value) { + this.setProperty('touch-action', value, ''); + } + get touchActionDelay() { + return this.getPropertyValue('touch-action-delay'); + } + set touchActionDelay(value) { + this.setProperty('touch-action-delay', value, ''); + } + get transform() { + return this.getPropertyValue('transform'); + } + set transform(value) { + this.setProperty('transform', value, ''); + } + get transformOrigin() { + return this.getPropertyValue('transform-origin'); + } + set transformOrigin(value) { + this.setProperty('transform-origin', value, ''); + } + get transformOriginX() { + return this.getPropertyValue('transform-origin-x'); + } + set transformOriginX(value) { + this.setProperty('transform-origin-x', value, ''); + } + get transformOriginY() { + return this.getPropertyValue('transform-origin-y'); + } + set transformOriginY(value) { + this.setProperty('transform-origin-y', value, ''); + } + get transformOriginZ() { + return this.getPropertyValue('transform-origin-z'); + } + set transformOriginZ(value) { + this.setProperty('transform-origin-z', value, ''); + } + get transformStyle() { + return this.getPropertyValue('transform-style'); + } + set transformStyle(value) { + this.setProperty('transform-style', value, ''); + } + get transition() { + return this.getPropertyValue('transition'); + } + set transition(value) { + this.setProperty('transition', value, ''); + } + get transitionDelay() { + return this.getPropertyValue('transition-delay'); + } + set transitionDelay(value) { + this.setProperty('transition-delay', value, ''); + } + get transitionDuration() { + return this.getPropertyValue('transition-duration'); + } + set transitionDuration(value) { + this.setProperty('transition-duration', value, ''); + } + get transitionProperty() { + return this.getPropertyValue('transition-property'); + } + set transitionProperty(value) { + this.setProperty('transition-property', value, ''); + } + get transitionTimingFunction() { + return this.getPropertyValue('transition-timing-function'); + } + set transitionTimingFunction(value) { + this.setProperty('transition-timing-function', value, ''); + } + get unicodeBidi() { + return this.getPropertyValue('unicode-bidi'); + } + set unicodeBidi(value) { + this.setProperty('unicode-bidi', value, ''); + } + get unicodeRange() { + return this.getPropertyValue('unicode-range'); + } + set unicodeRange(value) { + this.setProperty('unicode-range', value, ''); + } + get userDrag() { + return this.getPropertyValue('user-drag'); + } + set userDrag(value) { + this.setProperty('user-drag', value, ''); + } + get userModify() { + return this.getPropertyValue('user-modify'); + } + set userModify(value) { + this.setProperty('user-modify', value, ''); + } + get userSelect() { + return this.getPropertyValue('user-select'); + } + set userSelect(value) { + this.setProperty('user-select', value, ''); + } + get userZoom() { + return this.getPropertyValue('user-zoom'); + } + set userZoom(value) { + this.setProperty('user-zoom', value, ''); + } + get verticalAlign() { + return this.getPropertyValue('vertical-align'); + } + set verticalAlign(value) { + this.setProperty('vertical-align', value, ''); + } + get visibility() { + return this.getPropertyValue('visibility'); + } + set visibility(value) { + this.setProperty('visibility', value, ''); + } + get whiteSpace() { + return this.getPropertyValue('white-space'); + } + set whiteSpace(value) { + this.setProperty('white-space', value, ''); + } + get widows() { + return this.getPropertyValue('widows'); + } + set widows(value) { + this.setProperty('widows', value, ''); + } + get width() { + return this.getPropertyValue('width'); + } + set width(value) { + this.setProperty('width', value, ''); + } + get willChange() { + return this.getPropertyValue('will-change'); + } + set willChange(value) { + this.setProperty('will-change', value, ''); + } + get wordBreak() { + return this.getPropertyValue('word-break'); + } + set wordBreak(value) { + this.setProperty('word-break', value, ''); + } + get wordSpacing() { + return this.getPropertyValue('word-spacing'); + } + set wordSpacing(value) { + this.setProperty('word-spacing', value, ''); + } + get wordWrap() { + return this.getPropertyValue('word-wrap'); + } + set wordWrap(value) { + this.setProperty('word-wrap', value, ''); + } + get wrapFlow() { + return this.getPropertyValue('wrap-flow'); + } + set wrapFlow(value) { + this.setProperty('wrap-flow', value, ''); + } + get wrapThrough() { + return this.getPropertyValue('wrap-through'); + } + set wrapThrough(value) { + this.setProperty('wrap-through', value, ''); + } + get writingMode() { + return this.getPropertyValue('writing-mode'); + } + set writingMode(value) { + this.setProperty('writing-mode', value, ''); + } + get zIndex() { + return this.getPropertyValue('z-index'); + } + set zIndex(value) { + this.setProperty('z-index', value, ''); + } + get zoom() { + return this.getPropertyValue('zoom'); + } + set zoom(value) { + this.setProperty('zoom', value, ''); + } + } + dart.setSignature(CssStyleDeclarationBase, { + methods: () => ({ + getPropertyValue: [core.String, [core.String]], + setProperty: [dart.void, [core.String, core.String], [core.String]] + }) + }); + const _getPropertyValueHelper = Symbol('_getPropertyValueHelper'); + const _supportsProperty = Symbol('_supportsProperty'); + const _getPropertyValue = Symbol('_getPropertyValue'); + const _setPropertyHelper = Symbol('_setPropertyHelper'); + const _browserPropertyName = Symbol('_browserPropertyName'); + const __getter___1 = Symbol('__getter___1'); + const __getter__ = Symbol('__getter__'); + const __setter___1 = Symbol('__setter___1'); + const __setter__ = Symbol('__setter__'); + const _getPropertyPriority_1 = Symbol('_getPropertyPriority_1'); + const _getPropertyValue_1 = Symbol('_getPropertyValue_1'); + const _item_1 = Symbol('_item_1'); + const _removeProperty_1 = Symbol('_removeProperty_1'); + class CssStyleDeclaration extends dart.mixin(DartHtmlDomObject, CssStyleDeclarationBase) { + static new() { + return CssStyleDeclaration.css(''); + } + static css(css) { + let style = Element.tag('div').style; + style.cssText = css; + return style; + } + getPropertyValue(propertyName) { + let propValue = this[_getPropertyValueHelper](propertyName); + return propValue != null ? propValue : ''; + } + [_getPropertyValueHelper](propertyName) { + if (dart.notNull(this[_supportsProperty](CssStyleDeclaration._camelCase(propertyName)))) { + return this[_getPropertyValue](propertyName); + } else { + return this[_getPropertyValue](dart.notNull(html_common.Device.cssPrefix) + dart.notNull(propertyName)); + } + } + supportsProperty(propertyName) { + return dart.notNull(this[_supportsProperty](propertyName)) || dart.notNull(this[_supportsProperty](CssStyleDeclaration._camelCase(dart.notNull(html_common.Device.cssPrefix) + dart.notNull(propertyName)))); + } + [_supportsProperty](propertyName) { + return propertyName in this.raw; + } + setProperty(propertyName, value, priority) { + if (priority === void 0) + priority = null; + return this[_setPropertyHelper](this[_browserPropertyName](propertyName), value, priority); + } + [_browserPropertyName](propertyName) { + let name = CssStyleDeclaration._readCache(propertyName); + if (typeof name == 'string') + return name; + if (dart.notNull(this[_supportsProperty](CssStyleDeclaration._camelCase(propertyName)))) { + name = propertyName; + } else { + name = dart.notNull(html_common.Device.cssPrefix) + dart.notNull(propertyName); + } + CssStyleDeclaration._writeCache(propertyName, name); + return name; + } + static _readCache(key) { + return null; + } + static _writeCache(key, value) {} + static _camelCase(hyphenated) { + return hyphenated[dartx.replaceFirst](core.RegExp.new('^-ms-'), 'ms-')[dartx.replaceAllMapped](core.RegExp.new('-([a-z]+)', {caseSensitive: false}), dart.fn(match => dart.as(dart.dsend(dart.dsend(dart.dindex(dart.dindex(match, 0), 1), 'toUpperCase'), '+', dart.dsend(dart.dindex(match, 0), 'substring', 2)), core.String), core.String, [dart.dynamic])); + } + [_setPropertyHelper](propertyName, value, priority) { + if (priority === void 0) + priority = null; + if (value == null) + value = ''; + if (priority == null) + priority = ''; + this.raw.setProperty(propertyName, value, priority); + } + static get supportsTransitions() { + return exports.document.body.style.supportsProperty('transition'); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateCssStyleDeclaration() { + return new CssStyleDeclaration.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get cssText() { + return dart.as(wrap_jso(this.raw.cssText), core.String); + } + set cssText(val) { + return this.raw.cssText = unwrap_jso(val); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + [__getter__](name) { + return this[__getter___1](name); + } + [__getter___1](name) { + return wrap_jso(this.raw.__getter__(unwrap_jso(name))); + } + [__setter__](propertyName, propertyValue) { + this[__setter___1](propertyName, propertyValue); + return; + } + [__setter___1](propertyName, propertyValue) { + return wrap_jso(this.raw.__setter__(unwrap_jso(propertyName), unwrap_jso(propertyValue))); + } + getPropertyPriority(propertyName) { + return this[_getPropertyPriority_1](propertyName); + } + [_getPropertyPriority_1](propertyName) { + return dart.as(wrap_jso(this.raw.getPropertyPriority(unwrap_jso(propertyName))), core.String); + } + [_getPropertyValue](propertyName) { + return this[_getPropertyValue_1](propertyName); + } + [_getPropertyValue_1](propertyName) { + return dart.as(wrap_jso(this.raw.getPropertyValue(unwrap_jso(propertyName))), core.String); + } + item(index) { + return this[_item_1](index); + } + [_item_1](index) { + return dart.as(wrap_jso(this.raw.item(unwrap_jso(index))), core.String); + } + removeProperty(propertyName) { + return this[_removeProperty_1](propertyName); + } + [_removeProperty_1](propertyName) { + return dart.as(wrap_jso(this.raw.removeProperty(unwrap_jso(propertyName))), core.String); + } + } + dart.defineNamedConstructor(CssStyleDeclaration, 'internal_'); + dart.setSignature(CssStyleDeclaration, { + constructors: () => ({ + new: [CssStyleDeclaration, []], + css: [CssStyleDeclaration, [core.String]], + _: [CssStyleDeclaration, []], + internal_: [CssStyleDeclaration, []] + }), + methods: () => ({ + [_getPropertyValueHelper]: [core.String, [core.String]], + supportsProperty: [core.bool, [core.String]], + [_supportsProperty]: [core.bool, [core.String]], + [_browserPropertyName]: [core.String, [core.String]], + [_setPropertyHelper]: [dart.void, [core.String, core.String], [core.String]], + [__getter__]: [core.Object, [core.String]], + [__getter___1]: [core.Object, [dart.dynamic]], + [__setter__]: [dart.void, [core.String, core.String]], + [__setter___1]: [dart.void, [dart.dynamic, dart.dynamic]], + getPropertyPriority: [core.String, [core.String]], + [_getPropertyPriority_1]: [core.String, [dart.dynamic]], + [_getPropertyValue]: [core.String, [core.String]], + [_getPropertyValue_1]: [core.String, [dart.dynamic]], + item: [core.String, [core.int]], + [_item_1]: [core.String, [dart.dynamic]], + removeProperty: [core.String, [core.String]], + [_removeProperty_1]: [core.String, [dart.dynamic]] + }), + statics: () => ({ + _readCache: [core.String, [core.String]], + _writeCache: [dart.void, [core.String, dart.dynamic]], + _camelCase: [core.String, [core.String]], + internalCreateCssStyleDeclaration: [CssStyleDeclaration, []] + }), + names: ['_readCache', '_writeCache', '_camelCase', 'internalCreateCssStyleDeclaration'] + }); + CssStyleDeclaration[dart.metadata] = () => [dart.const(new _metadata.DomName('CSSStyleDeclaration')), dart.const(new _js_helper.Native("CSSStyleDeclaration,MSStyleCSSProperties,CSS2Properties"))]; + const _elementIterable = Symbol('_elementIterable'); + const _elementCssStyleDeclarationSetIterable = Symbol('_elementCssStyleDeclarationSetIterable'); + class _CssStyleDeclarationSet extends dart.mixin(core.Object, CssStyleDeclarationBase) { + _CssStyleDeclarationSet(elementIterable) { + this[_elementIterable] = elementIterable; + this[_elementCssStyleDeclarationSetIterable] = null; + this[_elementCssStyleDeclarationSetIterable] = dart.as(core.List.from(this[_elementIterable])[dartx.map](dart.fn(e => dart.dload(e, 'style'))), core.Iterable$(CssStyleDeclaration)); + } + getPropertyValue(propertyName) { + return this[_elementCssStyleDeclarationSetIterable][dartx.first].getPropertyValue(propertyName); + } + setProperty(propertyName, value, priority) { + if (priority === void 0) + priority = null; + this[_elementCssStyleDeclarationSetIterable][dartx.forEach](dart.fn(e => dart.dsend(e, 'setProperty', propertyName, value, priority))); + } + } + dart.setSignature(_CssStyleDeclarationSet, { + constructors: () => ({_CssStyleDeclarationSet: [_CssStyleDeclarationSet, [core.Iterable$(Element)]]}) + }); + class DivElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("div"), DivElement); + } + static internalCreateDivElement() { + return new DivElement.internal_(); + } + internal_() { + super.internal_(); + } + } + dart.defineNamedConstructor(DivElement, 'internal_'); + dart.setSignature(DivElement, { + constructors: () => ({ + _: [DivElement, []], + new: [DivElement, []], + internal_: [DivElement, []] + }), + statics: () => ({internalCreateDivElement: [DivElement, []]}), + names: ['internalCreateDivElement'] + }); + DivElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLDivElement')), dart.const(new _js_helper.Native("HTMLDivElement"))]; + const _body = Symbol('_body'); + const _get_window = Symbol('_get_window'); + const _head = Symbol('_head'); + const _lastModified = Symbol('_lastModified'); + const _preferredStylesheetSet = Symbol('_preferredStylesheetSet'); + const _referrer = Symbol('_referrer'); + const _selectedStylesheetSet = Symbol('_selectedStylesheetSet'); + const _title = Symbol('_title'); + const _webkitFullscreenElement = Symbol('_webkitFullscreenElement'); + const _webkitFullscreenEnabled = Symbol('_webkitFullscreenEnabled'); + const _webkitHidden = Symbol('_webkitHidden'); + const _webkitVisibilityState = Symbol('_webkitVisibilityState'); + const _adoptNode_1 = Symbol('_adoptNode_1'); + const _caretRangeFromPoint_1 = Symbol('_caretRangeFromPoint_1'); + const _caretRangeFromPoint = Symbol('_caretRangeFromPoint'); + const _createDocumentFragment_1 = Symbol('_createDocumentFragment_1'); + const _createElement_1 = Symbol('_createElement_1'); + const _createElement_2 = Symbol('_createElement_2'); + const _createElement = Symbol('_createElement'); + const _createElementNS_1 = Symbol('_createElementNS_1'); + const _createElementNS_2 = Symbol('_createElementNS_2'); + const _createElementNS = Symbol('_createElementNS'); + const _createEvent_1 = Symbol('_createEvent_1'); + const _createRange_1 = Symbol('_createRange_1'); + const _createTextNode_1 = Symbol('_createTextNode_1'); + const _createTextNode = Symbol('_createTextNode'); + const _elementFromPoint_1 = Symbol('_elementFromPoint_1'); + const _elementFromPoint = Symbol('_elementFromPoint'); + const _execCommand_1 = Symbol('_execCommand_1'); + const _exitFullscreen_1 = Symbol('_exitFullscreen_1'); + const _exitPointerLock_1 = Symbol('_exitPointerLock_1'); + const _getCssCanvasContext_1 = Symbol('_getCssCanvasContext_1'); + const _getCssCanvasContext = Symbol('_getCssCanvasContext'); + const _getElementById_1 = Symbol('_getElementById_1'); + const _getElementsByName_1 = Symbol('_getElementsByName_1'); + const _importNode_1 = Symbol('_importNode_1'); + const _importNode_2 = Symbol('_importNode_2'); + const _queryCommandEnabled_1 = Symbol('_queryCommandEnabled_1'); + const _queryCommandIndeterm_1 = Symbol('_queryCommandIndeterm_1'); + const _queryCommandState_1 = Symbol('_queryCommandState_1'); + const _queryCommandSupported_1 = Symbol('_queryCommandSupported_1'); + const _queryCommandValue_1 = Symbol('_queryCommandValue_1'); + const _transformDocumentToTreeView_1 = Symbol('_transformDocumentToTreeView_1'); + const _webkitExitFullscreen_1 = Symbol('_webkitExitFullscreen_1'); + const _webkitExitFullscreen = Symbol('_webkitExitFullscreen'); + class Document extends Node { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateDocument() { + return new Document.internal_(); + } + internal_() { + super.internal_(); + } + get activeElement() { + return dart.as(wrap_jso(this.raw.activeElement), Element); + } + get [_body]() { + return dart.as(wrap_jso(this.raw.body), HtmlElement); + } + set [_body](val) { + return this.raw.body = unwrap_jso(val); + } + get contentType() { + return dart.as(wrap_jso(this.raw.contentType), core.String); + } + get cookie() { + return dart.as(wrap_jso(this.raw.cookie), core.String); + } + set cookie(val) { + return this.raw.cookie = unwrap_jso(val); + } + get currentScript() { + return dart.as(wrap_jso(this.raw.currentScript), HtmlElement); + } + get window() { + return _convertNativeToDart_Window(this[_get_window]); + } + get [_get_window]() { + return wrap_jso(this.raw.defaultView); + } + get documentElement() { + return dart.as(wrap_jso(this.raw.documentElement), Element); + } + get domain() { + return dart.as(wrap_jso(this.raw.domain), core.String); + } + get fullscreenElement() { + return dart.as(wrap_jso(this.raw.fullscreenElement), Element); + } + get fullscreenEnabled() { + return dart.as(wrap_jso(this.raw.fullscreenEnabled), core.bool); + } + get [_head]() { + return dart.as(wrap_jso(this.raw.head), HeadElement); + } + get hidden() { + return dart.as(wrap_jso(this.raw.hidden), core.bool); + } + get implementation() { + return dart.as(wrap_jso(this.raw.implementation), DomImplementation); + } + get [_lastModified]() { + return dart.as(wrap_jso(this.raw.lastModified), core.String); + } + get pointerLockElement() { + return dart.as(wrap_jso(this.raw.pointerLockElement), Element); + } + get [_preferredStylesheetSet]() { + return dart.as(wrap_jso(this.raw.preferredStylesheetSet), core.String); + } + get readyState() { + return dart.as(wrap_jso(this.raw.readyState), core.String); + } + get [_referrer]() { + return dart.as(wrap_jso(this.raw.referrer), core.String); + } + get rootElement() { + return dart.as(wrap_jso(this.raw.rootElement), Element); + } + get [_selectedStylesheetSet]() { + return dart.as(wrap_jso(this.raw.selectedStylesheetSet), core.String); + } + set [_selectedStylesheetSet](val) { + return this.raw.selectedStylesheetSet = unwrap_jso(val); + } + get [_title]() { + return dart.as(wrap_jso(this.raw.title), core.String); + } + set [_title](val) { + return this.raw.title = unwrap_jso(val); + } + get visibilityState() { + return dart.as(wrap_jso(this.raw.visibilityState), core.String); + } + get [_webkitFullscreenElement]() { + return dart.as(wrap_jso(this.raw.webkitFullscreenElement), Element); + } + get [_webkitFullscreenEnabled]() { + return dart.as(wrap_jso(this.raw.webkitFullscreenEnabled), core.bool); + } + get [_webkitHidden]() { + return dart.as(wrap_jso(this.raw.webkitHidden), core.bool); + } + get [_webkitVisibilityState]() { + return dart.as(wrap_jso(this.raw.webkitVisibilityState), core.String); + } + adoptNode(node) { + return this[_adoptNode_1](node); + } + [_adoptNode_1](node) { + return dart.as(wrap_jso(this.raw.adoptNode(unwrap_jso(node))), Node); + } + [_caretRangeFromPoint](x, y) { + return this[_caretRangeFromPoint_1](x, y); + } + [_caretRangeFromPoint_1](x, y) { + return dart.as(wrap_jso(this.raw.caretRangeFromPoint(unwrap_jso(x), unwrap_jso(y))), Range); + } + createDocumentFragment() { + return this[_createDocumentFragment_1](); + } + [_createDocumentFragment_1]() { + return dart.as(wrap_jso(this.raw.createDocumentFragment()), DocumentFragment); + } + [_createElement](localName_OR_tagName, typeExtension) { + if (typeExtension === void 0) + typeExtension = null; + if (typeExtension == null) { + return this[_createElement_1](localName_OR_tagName); + } + if (typeExtension != null) { + return this[_createElement_2](localName_OR_tagName, typeExtension); + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_createElement_1](tagName) { + return dart.as(wrap_jso(this.raw.createElement(unwrap_jso(tagName))), Element); + } + [_createElement_2](localName, typeExtension) { + return dart.as(wrap_jso(this.raw.createElement(unwrap_jso(localName), unwrap_jso(typeExtension))), Element); + } + [_createElementNS](namespaceURI, qualifiedName, typeExtension) { + if (typeExtension === void 0) + typeExtension = null; + if (typeExtension == null) { + return this[_createElementNS_1](namespaceURI, qualifiedName); + } + if (typeExtension != null) { + return this[_createElementNS_2](namespaceURI, qualifiedName, typeExtension); + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_createElementNS_1](namespaceURI, qualifiedName) { + return dart.as(wrap_jso(this.raw.createElementNS(unwrap_jso(namespaceURI), unwrap_jso(qualifiedName))), Element); + } + [_createElementNS_2](namespaceURI, qualifiedName, typeExtension) { + return dart.as(wrap_jso(this.raw.createElementNS(unwrap_jso(namespaceURI), unwrap_jso(qualifiedName), unwrap_jso(typeExtension))), Element); + } + [_createEvent](eventType) { + return this[_createEvent_1](eventType); + } + [_createEvent_1](eventType) { + return dart.as(wrap_jso(this.raw.createEvent(unwrap_jso(eventType))), Event); + } + createRange() { + return this[_createRange_1](); + } + [_createRange_1]() { + return dart.as(wrap_jso(this.raw.createRange()), Range); + } + [_createTextNode](data) { + return this[_createTextNode_1](data); + } + [_createTextNode_1](data) { + return dart.as(wrap_jso(this.raw.createTextNode(unwrap_jso(data))), Text); + } + [_elementFromPoint](x, y) { + return this[_elementFromPoint_1](x, y); + } + [_elementFromPoint_1](x, y) { + return dart.as(wrap_jso(this.raw.elementFromPoint(unwrap_jso(x), unwrap_jso(y))), Element); + } + execCommand(command, userInterface, value) { + return this[_execCommand_1](command, userInterface, value); + } + [_execCommand_1](command, userInterface, value) { + return dart.as(wrap_jso(this.raw.execCommand(unwrap_jso(command), unwrap_jso(userInterface), unwrap_jso(value))), core.bool); + } + exitFullscreen() { + this[_exitFullscreen_1](); + return; + } + [_exitFullscreen_1]() { + return wrap_jso(this.raw.exitFullscreen()); + } + exitPointerLock() { + this[_exitPointerLock_1](); + return; + } + [_exitPointerLock_1]() { + return wrap_jso(this.raw.exitPointerLock()); + } + [_getCssCanvasContext](contextId, name, width, height) { + return this[_getCssCanvasContext_1](contextId, name, width, height); + } + [_getCssCanvasContext_1](contextId, name, width, height) { + return wrap_jso(this.raw.getCSSCanvasContext(unwrap_jso(contextId), unwrap_jso(name), unwrap_jso(width), unwrap_jso(height))); + } + getElementById(elementId) { + return this[_getElementById_1](elementId); + } + [_getElementById_1](elementId) { + return dart.as(wrap_jso(this.raw.getElementById(unwrap_jso(elementId))), Element); + } + getElementsByClassName(classNames) { + return this[_getElementsByClassName_1](classNames); + } + [_getElementsByClassName_1](classNames) { + return dart.as(wrap_jso(this.raw.getElementsByClassName(unwrap_jso(classNames))), HtmlCollection); + } + getElementsByName(elementName) { + return this[_getElementsByName_1](elementName); + } + [_getElementsByName_1](elementName) { + return dart.as(wrap_jso(this.raw.getElementsByName(unwrap_jso(elementName))), NodeList); + } + getElementsByTagName(localName) { + return this[_getElementsByTagName_1](localName); + } + [_getElementsByTagName_1](localName) { + return dart.as(wrap_jso(this.raw.getElementsByTagName(unwrap_jso(localName))), HtmlCollection); + } + importNode(node, deep) { + if (deep === void 0) + deep = null; + if (deep != null) { + return this[_importNode_1](node, deep); + } + return this[_importNode_2](node); + } + [_importNode_1](node, deep) { + return dart.as(wrap_jso(this.raw.importNode(unwrap_jso(node), unwrap_jso(deep))), Node); + } + [_importNode_2](node) { + return dart.as(wrap_jso(this.raw.importNode(unwrap_jso(node))), Node); + } + queryCommandEnabled(command) { + return this[_queryCommandEnabled_1](command); + } + [_queryCommandEnabled_1](command) { + return dart.as(wrap_jso(this.raw.queryCommandEnabled(unwrap_jso(command))), core.bool); + } + queryCommandIndeterm(command) { + return this[_queryCommandIndeterm_1](command); + } + [_queryCommandIndeterm_1](command) { + return dart.as(wrap_jso(this.raw.queryCommandIndeterm(unwrap_jso(command))), core.bool); + } + queryCommandState(command) { + return this[_queryCommandState_1](command); + } + [_queryCommandState_1](command) { + return dart.as(wrap_jso(this.raw.queryCommandState(unwrap_jso(command))), core.bool); + } + queryCommandSupported(command) { + return this[_queryCommandSupported_1](command); + } + [_queryCommandSupported_1](command) { + return dart.as(wrap_jso(this.raw.queryCommandSupported(unwrap_jso(command))), core.bool); + } + queryCommandValue(command) { + return this[_queryCommandValue_1](command); + } + [_queryCommandValue_1](command) { + return dart.as(wrap_jso(this.raw.queryCommandValue(unwrap_jso(command))), core.String); + } + transformDocumentToTreeView(noStyleMessage) { + this[_transformDocumentToTreeView_1](noStyleMessage); + return; + } + [_transformDocumentToTreeView_1](noStyleMessage) { + return wrap_jso(this.raw.transformDocumentToTreeView(unwrap_jso(noStyleMessage))); + } + [_webkitExitFullscreen]() { + this[_webkitExitFullscreen_1](); + return; + } + [_webkitExitFullscreen_1]() { + return wrap_jso(this.raw.webkitExitFullscreen()); + } + get [_childElementCount]() { + return dart.as(wrap_jso(this.raw.childElementCount), core.int); + } + get [_children]() { + return dart.as(wrap_jso(this.raw.children), core.List$(Node)); + } + get [_firstElementChild]() { + return dart.as(wrap_jso(this.raw.firstElementChild), Element); + } + get [_lastElementChild]() { + return dart.as(wrap_jso(this.raw.lastElementChild), Element); + } + querySelector(selectors) { + return this[_querySelector_1](selectors); + } + [_querySelector_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelector(unwrap_jso(selectors))), Element); + } + [_querySelectorAll](selectors) { + return this[_querySelectorAll_1](selectors); + } + [_querySelectorAll_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelectorAll(unwrap_jso(selectors))), NodeList); + } + get onBeforeCopy() { + return Element.beforeCopyEvent.forTarget(this); + } + get onBeforeCut() { + return Element.beforeCutEvent.forTarget(this); + } + get onBeforePaste() { + return Element.beforePasteEvent.forTarget(this); + } + get onCopy() { + return Element.copyEvent.forTarget(this); + } + get onCut() { + return Element.cutEvent.forTarget(this); + } + get onPaste() { + return Element.pasteEvent.forTarget(this); + } + get onPointerLockChange() { + return Document.pointerLockChangeEvent.forTarget(this); + } + get onPointerLockError() { + return Document.pointerLockErrorEvent.forTarget(this); + } + get onReadyStateChange() { + return Document.readyStateChangeEvent.forTarget(this); + } + get onSearch() { + return Element.searchEvent.forTarget(this); + } + get onSelectionChange() { + return Document.selectionChangeEvent.forTarget(this); + } + get onSelectStart() { + return Element.selectStartEvent.forTarget(this); + } + get onFullscreenChange() { + return Element.fullscreenChangeEvent.forTarget(this); + } + get onFullscreenError() { + return Element.fullscreenErrorEvent.forTarget(this); + } + querySelectorAll(selectors) { + return new _FrozenElementList._wrap(this[_querySelectorAll](selectors)); + } + query(relativeSelectors) { + return this.querySelector(relativeSelectors); + } + queryAll(relativeSelectors) { + return this.querySelectorAll(relativeSelectors); + } + get supportsRegisterElement() { + return true; + } + get supportsRegister() { + return this.supportsRegisterElement; + } + createElement(tagName, typeExtension) { + if (typeExtension === void 0) + typeExtension = null; + return this[_createElement](tagName, typeExtension); + } + createElementNS(namespaceURI, qualifiedName, typeExtension) { + if (typeExtension === void 0) + typeExtension = null; + return this[_createElementNS](namespaceURI, qualifiedName, typeExtension); + } + } + dart.defineNamedConstructor(Document, 'internal_'); + dart.setSignature(Document, { + constructors: () => ({ + _: [Document, []], + internal_: [Document, []] + }), + methods: () => ({ + adoptNode: [Node, [Node]], + [_adoptNode_1]: [Node, [Node]], + [_caretRangeFromPoint]: [Range, [core.int, core.int]], + [_caretRangeFromPoint_1]: [Range, [dart.dynamic, dart.dynamic]], + createDocumentFragment: [DocumentFragment, []], + [_createDocumentFragment_1]: [DocumentFragment, []], + [_createElement]: [Element, [core.String], [core.String]], + [_createElement_1]: [Element, [dart.dynamic]], + [_createElement_2]: [Element, [dart.dynamic, dart.dynamic]], + [_createElementNS]: [Element, [core.String, core.String], [core.String]], + [_createElementNS_1]: [Element, [dart.dynamic, dart.dynamic]], + [_createElementNS_2]: [Element, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_createEvent]: [Event, [core.String]], + [_createEvent_1]: [Event, [dart.dynamic]], + createRange: [Range, []], + [_createRange_1]: [Range, []], + [_createTextNode]: [Text, [core.String]], + [_createTextNode_1]: [Text, [dart.dynamic]], + [_elementFromPoint]: [Element, [core.int, core.int]], + [_elementFromPoint_1]: [Element, [dart.dynamic, dart.dynamic]], + execCommand: [core.bool, [core.String, core.bool, core.String]], + [_execCommand_1]: [core.bool, [dart.dynamic, dart.dynamic, dart.dynamic]], + exitFullscreen: [dart.void, []], + [_exitFullscreen_1]: [dart.void, []], + exitPointerLock: [dart.void, []], + [_exitPointerLock_1]: [dart.void, []], + [_getCssCanvasContext]: [core.Object, [core.String, core.String, core.int, core.int]], + [_getCssCanvasContext_1]: [core.Object, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]], + getElementById: [Element, [core.String]], + [_getElementById_1]: [Element, [dart.dynamic]], + getElementsByClassName: [HtmlCollection, [core.String]], + [_getElementsByClassName_1]: [HtmlCollection, [dart.dynamic]], + getElementsByName: [NodeList, [core.String]], + [_getElementsByName_1]: [NodeList, [dart.dynamic]], + getElementsByTagName: [HtmlCollection, [core.String]], + [_getElementsByTagName_1]: [HtmlCollection, [dart.dynamic]], + importNode: [Node, [Node], [core.bool]], + [_importNode_1]: [Node, [Node, dart.dynamic]], + [_importNode_2]: [Node, [Node]], + queryCommandEnabled: [core.bool, [core.String]], + [_queryCommandEnabled_1]: [core.bool, [dart.dynamic]], + queryCommandIndeterm: [core.bool, [core.String]], + [_queryCommandIndeterm_1]: [core.bool, [dart.dynamic]], + queryCommandState: [core.bool, [core.String]], + [_queryCommandState_1]: [core.bool, [dart.dynamic]], + queryCommandSupported: [core.bool, [core.String]], + [_queryCommandSupported_1]: [core.bool, [dart.dynamic]], + queryCommandValue: [core.String, [core.String]], + [_queryCommandValue_1]: [core.String, [dart.dynamic]], + transformDocumentToTreeView: [dart.void, [core.String]], + [_transformDocumentToTreeView_1]: [dart.void, [dart.dynamic]], + [_webkitExitFullscreen]: [dart.void, []], + [_webkitExitFullscreen_1]: [dart.void, []], + querySelector: [Element, [core.String]], + [_querySelector_1]: [Element, [dart.dynamic]], + [_querySelectorAll]: [NodeList, [core.String]], + [_querySelectorAll_1]: [NodeList, [dart.dynamic]], + querySelectorAll: [ElementList$(Element), [core.String]], + query: [Element, [core.String]], + queryAll: [ElementList$(Element), [core.String]], + createElement: [Element, [core.String], [core.String]], + createElementNS: [Element, [core.String, core.String], [core.String]] + }), + statics: () => ({internalCreateDocument: [Document, []]}), + names: ['internalCreateDocument'] + }); + Document[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('Document')), dart.const(new _js_helper.Native("Document"))]; + Document.pointerLockChangeEvent = dart.const(new (EventStreamProvider$(Event))('pointerlockchange')); + Document.pointerLockErrorEvent = dart.const(new (EventStreamProvider$(Event))('pointerlockerror')); + Document.readyStateChangeEvent = dart.const(new (EventStreamProvider$(Event))('readystatechange')); + Document.selectionChangeEvent = dart.const(new (EventStreamProvider$(Event))('selectionchange')); + const _docChildren = Symbol('_docChildren'); + class DocumentFragment extends Node { + static new() { + return exports.document.createDocumentFragment(); + } + static html(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + return exports.document.body.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer}); + } + static svg(svgContent, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + dart.throw('SVG not supported in DDC'); + } + get [_children]() { + return dart.throw(new core.UnimplementedError('Use _docChildren instead')); + } + get children() { + if (this[_docChildren] == null) { + this[_docChildren] = new html_common.FilteredElementList(this); + } + return this[_docChildren]; + } + set children(value) { + let copy = core.List.from(value); + let children = this.children; + children[dartx.clear](); + children[dartx.addAll](dart.as(copy, core.Iterable$(Element))); + } + querySelectorAll(selectors) { + return new _FrozenElementList._wrap(this[_querySelectorAll](selectors)); + } + get innerHtml() { + let e = Element.tag("div"); + e.append(this.clone(true)); + return e.innerHtml; + } + set innerHtml(value) { + this.setInnerHtml(value); + } + setInnerHtml(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + this.nodes[dartx.clear](); + this.append(exports.document.body.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer})); + } + appendText(text) { + this.append(Text.new(text)); + } + appendHtml(text, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let NodeTreeSanitizer = opts && 'NodeTreeSanitizer' in opts ? opts.NodeTreeSanitizer : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + this.append(DocumentFragment.html(text, {validator: validator, treeSanitizer: dart.as(treeSanitizer, NodeTreeSanitizer)})); + } + query(relativeSelectors) { + return this.querySelector(relativeSelectors); + } + queryAll(relativeSelectors) { + return this.querySelectorAll(relativeSelectors); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateDocumentFragment() { + return new DocumentFragment.internal_(); + } + internal_() { + this[_docChildren] = null; + super.internal_(); + } + getElementById(elementId) { + return this[_getElementById_1](elementId); + } + [_getElementById_1](elementId) { + return dart.as(wrap_jso(this.raw.getElementById(unwrap_jso(elementId))), Element); + } + get [_childElementCount]() { + return dart.as(wrap_jso(this.raw.childElementCount), core.int); + } + get [_firstElementChild]() { + return dart.as(wrap_jso(this.raw.firstElementChild), Element); + } + get [_lastElementChild]() { + return dart.as(wrap_jso(this.raw.lastElementChild), Element); + } + querySelector(selectors) { + return this[_querySelector_1](selectors); + } + [_querySelector_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelector(unwrap_jso(selectors))), Element); + } + [_querySelectorAll](selectors) { + return this[_querySelectorAll_1](selectors); + } + [_querySelectorAll_1](selectors) { + return dart.as(wrap_jso(this.raw.querySelectorAll(unwrap_jso(selectors))), NodeList); + } + } + DocumentFragment[dart.implements] = () => [ParentNode]; + dart.defineNamedConstructor(DocumentFragment, 'internal_'); + dart.setSignature(DocumentFragment, { + constructors: () => ({ + new: [DocumentFragment, []], + html: [DocumentFragment, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + svg: [DocumentFragment, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + _: [DocumentFragment, []], + internal_: [DocumentFragment, []] + }), + methods: () => ({ + querySelectorAll: [ElementList$(Element), [core.String]], + setInnerHtml: [dart.void, [core.String], {validator: NodeValidator, treeSanitizer: NodeTreeSanitizer}], + appendText: [dart.void, [core.String]], + appendHtml: [dart.void, [core.String], {validator: NodeValidator, NodeTreeSanitizer: dart.dynamic, treeSanitizer: dart.dynamic}], + query: [Element, [core.String]], + queryAll: [ElementList$(Element), [core.String]], + getElementById: [Element, [core.String]], + [_getElementById_1]: [Element, [dart.dynamic]], + querySelector: [Element, [core.String]], + [_querySelector_1]: [Element, [dart.dynamic]], + [_querySelectorAll]: [NodeList, [core.String]], + [_querySelectorAll_1]: [NodeList, [dart.dynamic]] + }), + statics: () => ({internalCreateDocumentFragment: [DocumentFragment, []]}), + names: ['internalCreateDocumentFragment'] + }); + DocumentFragment[dart.metadata] = () => [dart.const(new _metadata.DomName('DocumentFragment')), dart.const(new _js_helper.Native("DocumentFragment"))]; + const _createDocument_1 = Symbol('_createDocument_1'); + const _createDocumentType_1 = Symbol('_createDocumentType_1'); + const _createHtmlDocument_1 = Symbol('_createHtmlDocument_1'); + const _hasFeature_1 = Symbol('_hasFeature_1'); + class DomImplementation extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateDomImplementation() { + return new DomImplementation.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + createDocument(namespaceURI, qualifiedName, doctype) { + return this[_createDocument_1](namespaceURI, qualifiedName, doctype); + } + [_createDocument_1](namespaceURI, qualifiedName, doctype) { + return dart.as(wrap_jso(this.raw.createDocument(unwrap_jso(namespaceURI), unwrap_jso(qualifiedName), unwrap_jso(doctype))), Document); + } + createDocumentType(qualifiedName, publicId, systemId) { + return this[_createDocumentType_1](qualifiedName, publicId, systemId); + } + [_createDocumentType_1](qualifiedName, publicId, systemId) { + return dart.as(wrap_jso(this.raw.createDocumentType(unwrap_jso(qualifiedName), unwrap_jso(publicId), unwrap_jso(systemId))), Node); + } + createHtmlDocument(title) { + return this[_createHtmlDocument_1](title); + } + [_createHtmlDocument_1](title) { + return dart.as(wrap_jso(this.raw.createHTMLDocument(unwrap_jso(title))), HtmlDocument); + } + hasFeature(feature, version) { + return this[_hasFeature_1](feature, version); + } + [_hasFeature_1](feature, version) { + return dart.as(wrap_jso(this.raw.hasFeature(unwrap_jso(feature), unwrap_jso(version))), core.bool); + } + } + dart.defineNamedConstructor(DomImplementation, 'internal_'); + dart.setSignature(DomImplementation, { + constructors: () => ({ + _: [DomImplementation, []], + internal_: [DomImplementation, []] + }), + methods: () => ({ + createDocument: [Document, [core.String, core.String, Node]], + [_createDocument_1]: [Document, [dart.dynamic, dart.dynamic, Node]], + createDocumentType: [Node, [core.String, core.String, core.String]], + [_createDocumentType_1]: [Node, [dart.dynamic, dart.dynamic, dart.dynamic]], + createHtmlDocument: [HtmlDocument, [core.String]], + [_createHtmlDocument_1]: [HtmlDocument, [dart.dynamic]], + hasFeature: [core.bool, [core.String, core.String]], + [_hasFeature_1]: [core.bool, [dart.dynamic, dart.dynamic]] + }), + statics: () => ({internalCreateDomImplementation: [DomImplementation, []]}), + names: ['internalCreateDomImplementation'] + }); + DomImplementation[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('DOMImplementation')), dart.const(new _js_helper.Native("DOMImplementation"))]; + const _add_1 = Symbol('_add_1'); + const _remove_1 = Symbol('_remove_1'); + const _toggle_1 = Symbol('_toggle_1'); + const _toggle_2 = Symbol('_toggle_2'); + class DomTokenList extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateDomTokenList() { + return new DomTokenList.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + add(tokens) { + this[_add_1](tokens); + return; + } + [_add_1](tokens) { + return wrap_jso(this.raw.add(unwrap_jso(tokens))); + } + contains(token) { + return this[_contains_1](token); + } + [_contains_1](token) { + return dart.as(wrap_jso(this.raw.contains(unwrap_jso(token))), core.bool); + } + item(index) { + return this[_item_1](index); + } + [_item_1](index) { + return dart.as(wrap_jso(this.raw.item(unwrap_jso(index))), core.String); + } + remove(tokens) { + this[_remove_1](tokens); + return; + } + [_remove_1](tokens) { + return wrap_jso(this.raw.remove(unwrap_jso(tokens))); + } + toggle(token, force) { + if (force === void 0) + force = null; + if (force != null) { + return this[_toggle_1](token, force); + } + return this[_toggle_2](token); + } + [_toggle_1](token, force) { + return dart.as(wrap_jso(this.raw.toggle(unwrap_jso(token), unwrap_jso(force))), core.bool); + } + [_toggle_2](token) { + return dart.as(wrap_jso(this.raw.toggle(unwrap_jso(token))), core.bool); + } + } + dart.defineNamedConstructor(DomTokenList, 'internal_'); + dart.setSignature(DomTokenList, { + constructors: () => ({ + _: [DomTokenList, []], + internal_: [DomTokenList, []] + }), + methods: () => ({ + add: [dart.void, [core.String]], + [_add_1]: [dart.void, [dart.dynamic]], + contains: [core.bool, [core.String]], + [_contains_1]: [core.bool, [dart.dynamic]], + item: [core.String, [core.int]], + [_item_1]: [core.String, [dart.dynamic]], + remove: [dart.void, [core.String]], + [_remove_1]: [dart.void, [dart.dynamic]], + toggle: [core.bool, [core.String], [core.bool]], + [_toggle_1]: [core.bool, [dart.dynamic, dart.dynamic]], + [_toggle_2]: [core.bool, [dart.dynamic]] + }), + statics: () => ({internalCreateDomTokenList: [DomTokenList, []]}), + names: ['internalCreateDomTokenList'] + }); + DomTokenList[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('DOMTokenList')), dart.const(new _js_helper.Native("DOMTokenList"))]; + const _childElements = Symbol('_childElements'); + const _element = Symbol('_element'); + const _filter = Symbol('_filter'); + class _ChildrenElementList extends collection.ListBase$(Element) { + _wrap(element) { + this[_childElements] = dart.as(element[_children], HtmlCollection); + this[_element] = element; + } + contains(element) { + return this[_childElements].contains(element); + } + get isEmpty() { + return this[_element][_firstElementChild] == null; + } + get length() { + return this[_childElements].length; + } + get(index) { + return dart.as(this[_childElements].get(index), Element); + } + set(index, value) { + this[_element][_replaceChild](value, this[_childElements].get(index)); + return value; + } + set length(newLength) { + dart.throw(new core.UnsupportedError('Cannot resize element lists')); + } + add(value) { + this[_element].append(value); + return value; + } + get iterator() { + return this.toList()[dartx.iterator]; + } + addAll(iterable) { + if (dart.is(iterable, _ChildNodeListLazy)) { + iterable = core.List$(Element).from(iterable); + } + for (let element of iterable) { + this[_element].append(element); + } + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.throw(new core.UnsupportedError('Cannot sort element lists')); + } + shuffle(random) { + if (random === void 0) + random = null; + dart.throw(new core.UnsupportedError('Cannot shuffle element lists')); + } + removeWhere(test) { + this[_filter](test, false); + } + retainWhere(test) { + this[_filter](test, true); + } + [_filter](test, retainMatching) { + let removed = null; + if (dart.notNull(retainMatching)) { + removed = this[_element].children[dartx.where](dart.fn(e => !dart.notNull(dart.dcall(test, e)), core.bool, [dart.dynamic])); + } else { + removed = this[_element].children[dartx.where](dart.as(test, __CastType0)); + } + for (let e of dart.as(removed, core.Iterable)) + dart.dsend(e, 'remove'); + } + setRange(start, end, iterable, skipCount) { + if (skipCount === void 0) + skipCount = 0; + dart.throw(new core.UnimplementedError()); + } + replaceRange(start, end, iterable) { + dart.throw(new core.UnimplementedError()); + } + fillRange(start, end, fillValue) { + if (fillValue === void 0) + fillValue = null; + dart.throw(new core.UnimplementedError()); + } + remove(object) { + if (dart.is(object, Element)) { + let element = object; + if (dart.equals(element.parentNode, this[_element])) { + this[_element][_removeChild](element); + return true; + } + } + return false; + } + insert(index, element) { + if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this.length)) { + dart.throw(new core.RangeError.range(index, 0, this.length)); + } + if (index == this.length) { + this[_element].append(element); + } else { + this[_element].insertBefore(element, this.get(index)); + } + } + setAll(index, iterable) { + dart.throw(new core.UnimplementedError()); + } + clear() { + this[_element][_clearChildren](); + } + removeAt(index) { + let result = this.get(index); + if (result != null) { + this[_element][_removeChild](result); + } + return result; + } + removeLast() { + let result = this.last; + if (result != null) { + this[_element][_removeChild](result); + } + return result; + } + get first() { + let result = this[_element][_firstElementChild]; + if (result == null) + dart.throw(new core.StateError("No elements")); + return result; + } + get last() { + let result = this[_element][_lastElementChild]; + if (result == null) + dart.throw(new core.StateError("No elements")); + return result; + } + get single() { + if (dart.notNull(this.length) > 1) + dart.throw(new core.StateError("More than one element")); + return this.first; + } + get rawList() { + return this[_childElements]; + } + } + _ChildrenElementList[dart.implements] = () => [html_common.NodeListWrapper]; + dart.defineNamedConstructor(_ChildrenElementList, '_wrap'); + dart.setSignature(_ChildrenElementList, { + constructors: () => ({_wrap: [_ChildrenElementList, [Element]]}), + methods: () => ({ + get: [Element, [core.int]], + set: [dart.void, [core.int, Element]], + add: [Element, [Element]], + addAll: [dart.void, [core.Iterable$(Element)]], + sort: [dart.void, [], [dart.functionType(core.int, [Element, Element])]], + removeWhere: [dart.void, [dart.functionType(core.bool, [Element])]], + retainWhere: [dart.void, [dart.functionType(core.bool, [Element])]], + [_filter]: [dart.void, [dart.functionType(core.bool, [dart.dynamic]), core.bool]], + setRange: [dart.void, [core.int, core.int, core.Iterable$(Element)], [core.int]], + replaceRange: [dart.void, [core.int, core.int, core.Iterable$(Element)]], + fillRange: [dart.void, [core.int, core.int], [Element]], + insert: [dart.void, [core.int, Element]], + setAll: [dart.void, [core.int, core.Iterable$(Element)]], + removeAt: [Element, [core.int]], + removeLast: [Element, []] + }) + }); + dart.defineExtensionMembers(_ChildrenElementList, [ + 'contains', + 'get', + 'set', + 'add', + 'addAll', + 'sort', + 'shuffle', + 'removeWhere', + 'retainWhere', + 'setRange', + 'replaceRange', + 'fillRange', + 'remove', + 'insert', + 'setAll', + 'clear', + 'removeAt', + 'removeLast', + 'isEmpty', + 'length', + 'length', + 'iterator', + 'first', + 'last', + 'single' + ]); + const ElementList$ = dart.generic(function(T) { + class ElementList extends collection.ListBase$(T) {} + return ElementList; + }); + let ElementList = ElementList$(); + const _nodeList = Symbol('_nodeList'); + class _FrozenElementList extends collection.ListBase$(Element) { + _wrap(nodeList) { + this[_nodeList] = nodeList; + this.dartClass_instance = null; + this.dartClass_instance = this[_nodeList]; + } + get length() { + return this[_nodeList][dartx.length]; + } + get(index) { + return dart.as(this[_nodeList][dartx.get](index), Element); + } + set(index, value) { + dart.throw(new core.UnsupportedError('Cannot modify list')); + return value; + } + set length(newLength) { + dart.throw(new core.UnsupportedError('Cannot modify list')); + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.throw(new core.UnsupportedError('Cannot sort list')); + } + shuffle(random) { + if (random === void 0) + random = null; + dart.throw(new core.UnsupportedError('Cannot shuffle list')); + } + get first() { + return dart.as(this[_nodeList][dartx.first], Element); + } + get last() { + return dart.as(this[_nodeList][dartx.last], Element); + } + get single() { + return dart.as(this[_nodeList][dartx.single], Element); + } + get classes() { + return exports._MultiElementCssClassSet.new(this); + } + get style() { + return new _CssStyleDeclarationSet(this); + } + set classes(value) { + this[_nodeList][dartx.forEach](dart.fn(e => dart.dput(e, 'classes', value), core.Iterable$(core.String), [dart.dynamic])); + } + get contentEdge() { + return new _ContentCssListRect(this); + } + get paddingEdge() { + return this.first.paddingEdge; + } + get borderEdge() { + return this.first.borderEdge; + } + get marginEdge() { + return this.first.marginEdge; + } + get rawList() { + return this[_nodeList]; + } + get onBeforeCopy() { + return Element.beforeCopyEvent[_forElementList](this); + } + get onBeforeCut() { + return Element.beforeCutEvent[_forElementList](this); + } + get onBeforePaste() { + return Element.beforePasteEvent[_forElementList](this); + } + get onCopy() { + return Element.copyEvent[_forElementList](this); + } + get onCut() { + return Element.cutEvent[_forElementList](this); + } + get onPaste() { + return Element.pasteEvent[_forElementList](this); + } + get onSearch() { + return Element.searchEvent[_forElementList](this); + } + get onSelectStart() { + return Element.selectStartEvent[_forElementList](this); + } + get onFullscreenChange() { + return Element.fullscreenChangeEvent[_forElementList](this); + } + get onFullscreenError() { + return Element.fullscreenErrorEvent[_forElementList](this); + } + } + _FrozenElementList[dart.implements] = () => [ElementList$(Element), html_common.NodeListWrapper]; + dart.defineNamedConstructor(_FrozenElementList, '_wrap'); + dart.setSignature(_FrozenElementList, { + constructors: () => ({_wrap: [_FrozenElementList, [core.List$(Node)]]}), + methods: () => ({ + get: [Element, [core.int]], + set: [dart.void, [core.int, Element]], + sort: [dart.void, [], [core.Comparator$(Element)]] + }) + }); + dart.defineExtensionMembers(_FrozenElementList, [ + 'get', + 'set', + 'sort', + 'shuffle', + 'length', + 'length', + 'first', + 'last', + 'single' + ]); + Element._parseDocument = null; + Element._parseRange = null; + Element._defaultValidator = null; + Element._defaultSanitizer = null; + Element._tagsForWhichCreateContextualFragmentIsNotSupported = dart.const(['HEAD', 'AREA', 'BASE', 'BASEFONT', 'BR', 'COL', 'COLGROUP', 'EMBED', 'FRAME', 'FRAMESET', 'HR', 'IMAGE', 'IMG', 'INPUT', 'ISINDEX', 'LINK', 'META', 'PARAM', 'SOURCE', 'STYLE', 'TITLE', 'WBR']); + Element.beforeCopyEvent = dart.const(new (EventStreamProvider$(Event))('beforecopy')); + Element.beforeCutEvent = dart.const(new (EventStreamProvider$(Event))('beforecut')); + Element.beforePasteEvent = dart.const(new (EventStreamProvider$(Event))('beforepaste')); + Element.copyEvent = dart.const(new (EventStreamProvider$(Event))('copy')); + Element.cutEvent = dart.const(new (EventStreamProvider$(Event))('cut')); + Element.pasteEvent = dart.const(new (EventStreamProvider$(Event))('paste')); + Element.searchEvent = dart.const(new (EventStreamProvider$(Event))('search')); + Element.selectStartEvent = dart.const(new (EventStreamProvider$(Event))('selectstart')); + Element.fullscreenChangeEvent = dart.const(new (EventStreamProvider$(Event))('webkitfullscreenchange')); + Element.fullscreenErrorEvent = dart.const(new (EventStreamProvider$(Event))('webkitfullscreenerror')); + class _ElementFactoryProvider extends core.Object { + static createElement_tag(tag, typeExtension) { + return exports.document.createElement(tag, typeExtension); + } + } + dart.setSignature(_ElementFactoryProvider, { + statics: () => ({createElement_tag: [Element, [core.String, core.String]]}), + names: ['createElement_tag'] + }); + const _value = Symbol('_value'); + class ScrollAlignment extends core.Object { + _internal(value) { + this[_value] = value; + } + toString() { + return `ScrollAlignment.${this[_value]}`; + } + } + dart.defineNamedConstructor(ScrollAlignment, '_internal'); + dart.setSignature(ScrollAlignment, { + constructors: () => ({_internal: [ScrollAlignment, [dart.dynamic]]}) + }); + ScrollAlignment.TOP = dart.const(new ScrollAlignment._internal('TOP')); + ScrollAlignment.CENTER = dart.const(new ScrollAlignment._internal('CENTER')); + ScrollAlignment.BOTTOM = dart.const(new ScrollAlignment._internal('BOTTOM')); + Event.AT_TARGET = 2; + Event.BUBBLING_PHASE = 3; + Event.CAPTURING_PHASE = 1; + const _ptr = Symbol('_ptr'); + class Events extends core.Object { + Events(ptr) { + this[_ptr] = ptr; + } + get(type) { + return new _EventStream(this[_ptr], type, false); + } + } + dart.setSignature(Events, { + constructors: () => ({Events: [Events, [EventTarget]]}), + methods: () => ({get: [async.Stream, [core.String]]}) + }); + class ElementEvents extends Events { + ElementEvents(ptr) { + super.Events(ptr); + } + get(type) { + if (dart.notNull(ElementEvents.webkitEvents.keys[dartx.contains](type[dartx.toLowerCase]()))) { + if (dart.notNull(html_common.Device.isWebKit)) { + return new _ElementEventStreamImpl(this[_ptr], ElementEvents.webkitEvents.get(type[dartx.toLowerCase]()), false); + } + } + return new _ElementEventStreamImpl(this[_ptr], type, false); + } + } + dart.setSignature(ElementEvents, { + constructors: () => ({ElementEvents: [ElementEvents, [Element]]}) + }); + dart.defineLazyProperties(ElementEvents, { + get webkitEvents() { + return dart.map({animationend: 'webkitAnimationEnd', animationiteration: 'webkitAnimationIteration', animationstart: 'webkitAnimationStart', fullscreenchange: 'webkitfullscreenchange', fullscreenerror: 'webkitfullscreenerror', keyadded: 'webkitkeyadded', keyerror: 'webkitkeyerror', keymessage: 'webkitkeymessage', needkey: 'webkitneedkey', pointerlockchange: 'webkitpointerlockchange', pointerlockerror: 'webkitpointerlockerror', resourcetimingbufferfull: 'webkitresourcetimingbufferfull', transitionend: 'webkitTransitionEnd', speechchange: 'webkitSpeechChange'}); + } + }); + class HeadElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("head"), HeadElement); + } + static internalCreateHeadElement() { + return new HeadElement.internal_(); + } + internal_() { + super.internal_(); + } + } + dart.defineNamedConstructor(HeadElement, 'internal_'); + dart.setSignature(HeadElement, { + constructors: () => ({ + _: [HeadElement, []], + new: [HeadElement, []], + internal_: [HeadElement, []] + }), + statics: () => ({internalCreateHeadElement: [HeadElement, []]}), + names: ['internalCreateHeadElement'] + }); + HeadElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLHeadElement')), dart.const(new _js_helper.Native("HTMLHeadElement"))]; + const _get_state = Symbol('_get_state'); + const _back_1 = Symbol('_back_1'); + const _forward_1 = Symbol('_forward_1'); + const _go_1 = Symbol('_go_1'); + const _pushState_1 = Symbol('_pushState_1'); + const _pushState_2 = Symbol('_pushState_2'); + const _replaceState_1 = Symbol('_replaceState_1'); + const _replaceState_2 = Symbol('_replaceState_2'); + class History extends DartHtmlDomObject { + static get supportsState() { + return true; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateHistory() { + return new History.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + get state() { + return html_common.convertNativeToDart_SerializedScriptValue(this[_get_state]); + } + get [_get_state]() { + return wrap_jso(this.raw.state); + } + back() { + this[_back_1](); + return; + } + [_back_1]() { + return wrap_jso(this.raw.back()); + } + forward() { + this[_forward_1](); + return; + } + [_forward_1]() { + return wrap_jso(this.raw.forward()); + } + go(distance) { + this[_go_1](distance); + return; + } + [_go_1](distance) { + return wrap_jso(this.raw.go(unwrap_jso(distance))); + } + pushState(data, title, url) { + if (url === void 0) + url = null; + if (url != null) { + let data_1 = html_common.convertDartToNative_SerializedScriptValue(data); + this[_pushState_1](data_1, title, url); + return; + } + let data_1 = html_common.convertDartToNative_SerializedScriptValue(data); + this[_pushState_2](data_1, title); + return; + } + [_pushState_1](data, title, url) { + return wrap_jso(this.raw.pushState(unwrap_jso(data), unwrap_jso(title), unwrap_jso(url))); + } + [_pushState_2](data, title) { + return wrap_jso(this.raw.pushState(unwrap_jso(data), unwrap_jso(title))); + } + replaceState(data, title, url) { + if (url === void 0) + url = null; + if (url != null) { + let data_1 = html_common.convertDartToNative_SerializedScriptValue(data); + this[_replaceState_1](data_1, title, url); + return; + } + let data_1 = html_common.convertDartToNative_SerializedScriptValue(data); + this[_replaceState_2](data_1, title); + return; + } + [_replaceState_1](data, title, url) { + return wrap_jso(this.raw.replaceState(unwrap_jso(data), unwrap_jso(title), unwrap_jso(url))); + } + [_replaceState_2](data, title) { + return wrap_jso(this.raw.replaceState(unwrap_jso(data), unwrap_jso(title))); + } + } + History[dart.implements] = () => [HistoryBase]; + dart.defineNamedConstructor(History, 'internal_'); + dart.setSignature(History, { + constructors: () => ({ + _: [History, []], + internal_: [History, []] + }), + methods: () => ({ + back: [dart.void, []], + [_back_1]: [dart.void, []], + forward: [dart.void, []], + [_forward_1]: [dart.void, []], + go: [dart.void, [core.int]], + [_go_1]: [dart.void, [dart.dynamic]], + pushState: [dart.void, [dart.dynamic, core.String], [core.String]], + [_pushState_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_pushState_2]: [dart.void, [dart.dynamic, dart.dynamic]], + replaceState: [dart.void, [dart.dynamic, core.String], [core.String]], + [_replaceState_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_replaceState_2]: [dart.void, [dart.dynamic, dart.dynamic]] + }), + statics: () => ({internalCreateHistory: [History, []]}), + names: ['internalCreateHistory'] + }); + History[dart.metadata] = () => [dart.const(new _metadata.DomName('History')), dart.const(new _js_helper.Native("History"))]; + const ImmutableListMixin$ = dart.generic(function(E) { + class ImmutableListMixin extends core.Object { + get iterator() { + return new (FixedSizeListIterator$(E))(this); + } + [Symbol.iterator]() { + return new dart.JsIterator(this.iterator); + } + add(value) { + dart.as(value, E); + dart.throw(new core.UnsupportedError("Cannot add to immutable List.")); + } + addAll(iterable) { + dart.as(iterable, core.Iterable$(E)); + dart.throw(new core.UnsupportedError("Cannot add to immutable List.")); + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.as(compare, dart.functionType(core.int, [E, E])); + dart.throw(new core.UnsupportedError("Cannot sort immutable List.")); + } + shuffle(random) { + if (random === void 0) + random = null; + dart.throw(new core.UnsupportedError("Cannot shuffle immutable List.")); + } + insert(index, element) { + dart.as(element, E); + dart.throw(new core.UnsupportedError("Cannot add to immutable List.")); + } + insertAll(index, iterable) { + dart.as(iterable, core.Iterable$(E)); + dart.throw(new core.UnsupportedError("Cannot add to immutable List.")); + } + setAll(index, iterable) { + dart.as(iterable, core.Iterable$(E)); + dart.throw(new core.UnsupportedError("Cannot modify an immutable List.")); + } + removeAt(pos) { + dart.throw(new core.UnsupportedError("Cannot remove from immutable List.")); + } + removeLast() { + dart.throw(new core.UnsupportedError("Cannot remove from immutable List.")); + } + remove(object) { + dart.throw(new core.UnsupportedError("Cannot remove from immutable List.")); + } + removeWhere(test) { + dart.as(test, dart.functionType(core.bool, [E])); + dart.throw(new core.UnsupportedError("Cannot remove from immutable List.")); + } + retainWhere(test) { + dart.as(test, dart.functionType(core.bool, [E])); + dart.throw(new core.UnsupportedError("Cannot remove from immutable List.")); + } + setRange(start, end, iterable, skipCount) { + dart.as(iterable, core.Iterable$(E)); + if (skipCount === void 0) + skipCount = 0; + dart.throw(new core.UnsupportedError("Cannot setRange on immutable List.")); + } + removeRange(start, end) { + dart.throw(new core.UnsupportedError("Cannot removeRange on immutable List.")); + } + replaceRange(start, end, iterable) { + dart.as(iterable, core.Iterable$(E)); + dart.throw(new core.UnsupportedError("Cannot modify an immutable List.")); + } + fillRange(start, end, fillValue) { + if (fillValue === void 0) + fillValue = null; + dart.as(fillValue, E); + dart.throw(new core.UnsupportedError("Cannot modify an immutable List.")); + } + } + ImmutableListMixin[dart.implements] = () => [core.List$(E)]; + dart.setSignature(ImmutableListMixin, { + methods: () => ({ + add: [dart.void, [E]], + addAll: [dart.void, [core.Iterable$(E)]], + sort: [dart.void, [], [dart.functionType(core.int, [E, E])]], + shuffle: [dart.void, [], [math.Random]], + insert: [dart.void, [core.int, E]], + insertAll: [dart.void, [core.int, core.Iterable$(E)]], + setAll: [dart.void, [core.int, core.Iterable$(E)]], + removeAt: [E, [core.int]], + removeLast: [E, []], + remove: [core.bool, [core.Object]], + removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], + retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], + setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int]], + removeRange: [dart.void, [core.int, core.int]], + replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]], + fillRange: [dart.void, [core.int, core.int], [E]] + }) + }); + dart.defineExtensionMembers(ImmutableListMixin, [ + 'add', + 'addAll', + 'sort', + 'shuffle', + 'insert', + 'insertAll', + 'setAll', + 'removeAt', + 'removeLast', + 'remove', + 'removeWhere', + 'retainWhere', + 'setRange', + 'removeRange', + 'replaceRange', + 'fillRange', + 'iterator' + ]); + return ImmutableListMixin; + }); + let ImmutableListMixin = ImmutableListMixin$(); + const _namedItem_1 = Symbol('_namedItem_1'); + class HtmlCollection extends dart.mixin(DartHtmlDomObject, collection.ListMixin$(Node), ImmutableListMixin$(Node)) { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateHtmlCollection() { + return new HtmlCollection.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + get(index) { + if (index >>> 0 !== index || index >= this.length) + dart.throw(core.RangeError.index(index, this)); + return dart.as(wrap_jso(this.raw[index]), Node); + } + set(index, value) { + dart.throw(new core.UnsupportedError("Cannot assign element of immutable List.")); + return value; + } + set length(value) { + dart.throw(new core.UnsupportedError("Cannot resize immutable List.")); + } + get first() { + if (dart.notNull(this.length) > 0) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get last() { + let len = this.length; + if (dart.notNull(len) > 0) { + return dart.as(wrap_jso(this.raw[dart.notNull(len) - 1]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get single() { + let len = this.length; + if (len == 1) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + if (len == 0) + dart.throw(new core.StateError("No elements")); + dart.throw(new core.StateError("More than one element")); + } + elementAt(index) { + return this.get(index); + } + item(index) { + return this[_item_1](index); + } + [_item_1](index) { + return dart.as(wrap_jso(this.raw.item(unwrap_jso(index))), Element); + } + namedItem(name) { + return this[_namedItem_1](name); + } + [_namedItem_1](name) { + return dart.as(wrap_jso(this.raw.namedItem(unwrap_jso(name))), Element); + } + } + HtmlCollection[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, core.List$(Node)]; + dart.defineNamedConstructor(HtmlCollection, 'internal_'); + dart.setSignature(HtmlCollection, { + constructors: () => ({ + _: [HtmlCollection, []], + internal_: [HtmlCollection, []] + }), + methods: () => ({ + get: [Node, [core.int]], + set: [dart.void, [core.int, Node]], + elementAt: [Node, [core.int]], + item: [Element, [core.int]], + [_item_1]: [Element, [dart.dynamic]], + namedItem: [Element, [core.String]], + [_namedItem_1]: [Element, [dart.dynamic]] + }), + statics: () => ({internalCreateHtmlCollection: [HtmlCollection, []]}), + names: ['internalCreateHtmlCollection'] + }); + dart.defineExtensionMembers(HtmlCollection, [ + 'get', + 'set', + 'elementAt', + 'length', + 'length', + 'first', + 'last', + 'single' + ]); + HtmlCollection[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLCollection')), dart.const(new _js_helper.Native("HTMLCollection"))]; + class HtmlDocument extends Document { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateHtmlDocument() { + return new HtmlDocument.internal_(); + } + internal_() { + super.internal_(); + } + get body() { + return dart.as(this[_body], BodyElement); + } + set body(value) { + this[_body] = value; + } + caretRangeFromPoint(x, y) { + return this[_caretRangeFromPoint](x, y); + } + elementFromPoint(x, y) { + return this[_elementFromPoint](x, y); + } + static get supportsCssCanvasContext() { + return !!document.getCSSCanvasContext; + } + get head() { + return this[_head]; + } + get lastModified() { + return this[_lastModified]; + } + get preferredStylesheetSet() { + return this[_preferredStylesheetSet]; + } + get referrer() { + return this[_referrer]; + } + get selectedStylesheetSet() { + return this[_selectedStylesheetSet]; + } + set selectedStylesheetSet(value) { + this[_selectedStylesheetSet] = value; + } + get title() { + return this[_title]; + } + set title(value) { + this[_title] = value; + } + exitFullscreen() { + this[_webkitExitFullscreen](); + } + get fullscreenElement() { + return this[_webkitFullscreenElement]; + } + get fullscreenEnabled() { + return this[_webkitFullscreenEnabled]; + } + get hidden() { + return this[_webkitHidden]; + } + get visibilityState() { + return this[_webkitVisibilityState]; + } + registerElement(tag, customElementClass, opts) { + let extendsTag = opts && 'extendsTag' in opts ? opts.extendsTag : null; + dart.dcall(/* Unimplemented unknown name */_registerCustomElement, window, this, tag, customElementClass, extendsTag); + } + register(tag, customElementClass, opts) { + let extendsTag = opts && 'extendsTag' in opts ? opts.extendsTag : null; + return this.registerElement(tag, customElementClass, {extendsTag: extendsTag}); + } + static _determineVisibilityChangeEventType(e) { + return 'webkitvisibilitychange'; + } + get onVisibilityChange() { + return HtmlDocument.visibilityChangeEvent.forTarget(this); + } + createElementUpgrader(type, opts) { + let extendsTag = opts && 'extendsTag' in opts ? opts.extendsTag : null; + dart.throw('ElementUpgrader not yet supported on DDC'); + } + } + dart.defineNamedConstructor(HtmlDocument, 'internal_'); + dart.setSignature(HtmlDocument, { + constructors: () => ({ + _: [HtmlDocument, []], + internal_: [HtmlDocument, []] + }), + methods: () => ({ + caretRangeFromPoint: [Range, [core.int, core.int]], + elementFromPoint: [Element, [core.int, core.int]], + registerElement: [dart.void, [core.String, core.Type], {extendsTag: core.String}], + register: [dart.void, [core.String, core.Type], {extendsTag: core.String}], + createElementUpgrader: [ElementUpgrader, [core.Type], {extendsTag: core.String}] + }), + statics: () => ({ + internalCreateHtmlDocument: [HtmlDocument, []], + _determineVisibilityChangeEventType: [core.String, [EventTarget]] + }), + names: ['internalCreateHtmlDocument', '_determineVisibilityChangeEventType'] + }); + HtmlDocument[dart.metadata] = () => [dart.const(new _metadata.DomName('HTMLDocument')), dart.const(new _js_helper.Native("HTMLDocument"))]; + const _eventTypeGetter = Symbol('_eventTypeGetter'); + const _CustomEventStreamProvider$ = dart.generic(function(T) { + class _CustomEventStreamProvider extends core.Object { + _CustomEventStreamProvider(eventTypeGetter) { + this[_eventTypeGetter] = eventTypeGetter; + } + forTarget(e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new (_EventStream$(T))(e, dart.as(dart.dcall(this[_eventTypeGetter], e), core.String), useCapture); + } + forElement(e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new (_ElementEventStreamImpl$(T))(e, dart.dcall(this[_eventTypeGetter], e), useCapture); + } + [_forElementList](e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + return new _ElementListEventStreamImpl(dart.as(e, core.Iterable$(Element)), dart.as(dart.dcall(this[_eventTypeGetter], e), core.String), useCapture); + } + getEventType(target) { + return dart.as(dart.dcall(this[_eventTypeGetter], target), core.String); + } + get [_eventType]() { + return dart.throw(new core.UnsupportedError('Access type through getEventType method.')); + } + } + _CustomEventStreamProvider[dart.implements] = () => [EventStreamProvider$(T)]; + dart.setSignature(_CustomEventStreamProvider, { + constructors: () => ({_CustomEventStreamProvider: [_CustomEventStreamProvider$(T), [dart.dynamic]]}), + methods: () => ({ + forTarget: [async.Stream$(T), [EventTarget], {useCapture: core.bool}], + forElement: [ElementStream$(T), [Element], {useCapture: core.bool}], + [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core.bool}], + getEventType: [core.String, [EventTarget]] + }) + }); + return _CustomEventStreamProvider; + }); + let _CustomEventStreamProvider = _CustomEventStreamProvider$(); + HtmlDocument.visibilityChangeEvent = dart.const(new (_CustomEventStreamProvider$(Event))(HtmlDocument._determineVisibilityChangeEventType)); + class HttpRequestEventTarget extends EventTarget { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateHttpRequestEventTarget() { + return new HttpRequestEventTarget.internal_(); + } + internal_() { + super.internal_(); + } + get onAbort() { + return HttpRequestEventTarget.abortEvent.forTarget(this); + } + get onError() { + return HttpRequestEventTarget.errorEvent.forTarget(this); + } + get onLoad() { + return HttpRequestEventTarget.loadEvent.forTarget(this); + } + get onLoadEnd() { + return HttpRequestEventTarget.loadEndEvent.forTarget(this); + } + get onLoadStart() { + return HttpRequestEventTarget.loadStartEvent.forTarget(this); + } + get onProgress() { + return HttpRequestEventTarget.progressEvent.forTarget(this); + } + get onTimeout() { + return HttpRequestEventTarget.timeoutEvent.forTarget(this); + } + } + dart.defineNamedConstructor(HttpRequestEventTarget, 'internal_'); + dart.setSignature(HttpRequestEventTarget, { + constructors: () => ({ + _: [HttpRequestEventTarget, []], + internal_: [HttpRequestEventTarget, []] + }), + statics: () => ({internalCreateHttpRequestEventTarget: [HttpRequestEventTarget, []]}), + names: ['internalCreateHttpRequestEventTarget'] + }); + HttpRequestEventTarget[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('XMLHttpRequestEventTarget')), dart.const(new _metadata.Experimental()), dart.const(new _js_helper.Native("XMLHttpRequestEventTarget"))]; + const _get_response = Symbol('_get_response'); + const _abort_1 = Symbol('_abort_1'); + const _getAllResponseHeaders_1 = Symbol('_getAllResponseHeaders_1'); + const _getResponseHeader_1 = Symbol('_getResponseHeader_1'); + const _overrideMimeType_1 = Symbol('_overrideMimeType_1'); + const _send_1 = Symbol('_send_1'); + const _send_2 = Symbol('_send_2'); + const _send_3 = Symbol('_send_3'); + const _setRequestHeader_1 = Symbol('_setRequestHeader_1'); + class HttpRequest extends HttpRequestEventTarget { + static getString(url, opts) { + let withCredentials = opts && 'withCredentials' in opts ? opts.withCredentials : null; + let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; + return HttpRequest.request(url, {withCredentials: withCredentials, onProgress: onProgress}).then(dart.fn(xhr => xhr.responseText, core.String, [HttpRequest])); + } + static postFormData(url, data, opts) { + let withCredentials = opts && 'withCredentials' in opts ? opts.withCredentials : null; + let responseType = opts && 'responseType' in opts ? opts.responseType : null; + let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeaders : null; + let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; + let parts = []; + data.forEach(dart.fn((key, value) => { + parts[dartx.add](`${core.Uri.encodeQueryComponent(dart.as(key, core.String))}=` + `${core.Uri.encodeQueryComponent(dart.as(value, core.String))}`); + })); + let formData = parts[dartx.join]('&'); + if (requestHeaders == null) { + requestHeaders = dart.map(); + } + requestHeaders.putIfAbsent('Content-Type', dart.fn(() => 'application/x-www-form-urlencoded; charset=UTF-8', core.String, [])); + return HttpRequest.request(url, {method: 'POST', withCredentials: withCredentials, responseType: responseType, requestHeaders: requestHeaders, sendData: formData, onProgress: onProgress}); + } + static request(url, opts) { + let method = opts && 'method' in opts ? opts.method : null; + let withCredentials = opts && 'withCredentials' in opts ? opts.withCredentials : null; + let responseType = opts && 'responseType' in opts ? opts.responseType : null; + let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; + let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeaders : null; + let sendData = opts && 'sendData' in opts ? opts.sendData : null; + let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; + let completer = async.Completer$(HttpRequest).new(); + let xhr = HttpRequest.new(); + if (method == null) { + method = 'GET'; + } + xhr.open(method, url, {async: true}); + if (withCredentials != null) { + xhr.withCredentials = withCredentials; + } + if (responseType != null) { + xhr.responseType = responseType; + } + if (mimeType != null) { + xhr.overrideMimeType(mimeType); + } + if (requestHeaders != null) { + requestHeaders.forEach(dart.fn((header, value) => { + xhr.setRequestHeader(dart.as(header, core.String), dart.as(value, core.String)); + })); + } + if (onProgress != null) { + xhr.onProgress.listen(onProgress); + } + xhr.onLoad.listen(dart.fn(e => { + let accepted = dart.notNull(xhr.status) >= 200 && dart.notNull(xhr.status) < 300; + let fileUri = xhr.status == 0; + let notModified = xhr.status == 304; + let unknownRedirect = dart.notNull(xhr.status) > 307 && dart.notNull(xhr.status) < 400; + if (dart.notNull(accepted) || dart.notNull(fileUri) || dart.notNull(notModified) || dart.notNull(unknownRedirect)) { + completer.complete(xhr); + } else { + completer.completeError(e); + } + })); + xhr.onError.listen(dart.bind(completer, 'completeError')); + if (sendData != null) { + xhr.send(sendData); + } else { + xhr.send(); + } + return completer.future; + } + static get supportsProgressEvent() { + return true; + } + static get supportsCrossOrigin() { + return true; + } + static get supportsLoadEndEvent() { + return true; + } + static get supportsOverrideMimeType() { + return true; + } + static requestCrossOrigin(url, opts) { + let method = opts && 'method' in opts ? opts.method : null; + let sendData = opts && 'sendData' in opts ? opts.sendData : null; + if (dart.notNull(HttpRequest.supportsCrossOrigin)) { + return dart.as(HttpRequest.request(url, {method: method, sendData: sendData}).then(dart.fn(xhr => { + return dart.dload(xhr, 'responseText'); + })), async.Future$(core.String)); + } + } + get responseHeaders() { + let headers = dart.map(); + let headersString = this.getAllResponseHeaders(); + if (headersString == null) { + return headers; + } + let headersList = headersString[dartx.split]('\r\n'); + for (let header of headersList) { + if (dart.notNull(header[dartx.isEmpty])) { + continue; + } + let splitIdx = header[dartx.indexOf](': '); + if (splitIdx == -1) { + continue; + } + let key = header[dartx.substring](0, splitIdx)[dartx.toLowerCase](); + let value = header[dartx.substring](dart.notNull(splitIdx) + 2); + if (dart.notNull(headers.containsKey(key))) { + headers.set(key, `${headers.get(key)}, ${value}`); + } else { + headers.set(key, value); + } + } + return headers; + } + open(method, url, opts) { + let async = opts && 'async' in opts ? opts.async : null; + let user = opts && 'user' in opts ? opts.user : null; + let password = opts && 'password' in opts ? opts.password : null; + if (async == null && user == null && password == null) { + this.raw.open(method, url); + } else { + this.raw.open(method, url, async, user, password); + } + } + get responseType() { + return this.raw.responseType; + } + set responseType(value) { + this.raw.responseType = value; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return HttpRequest._create_1(); + } + static _create_1() { + return dart.as(wrap_jso(new XMLHttpRequest()), HttpRequest); + } + static internalCreateHttpRequest() { + return new HttpRequest.internal_(); + } + internal_() { + super.internal_(); + } + get readyState() { + return dart.as(wrap_jso(this.raw.readyState), core.int); + } + get response() { + return _convertNativeToDart_XHR_Response(this[_get_response]); + } + get [_get_response]() { + return wrap_jso(this.raw.response); + } + get responseText() { + return dart.as(wrap_jso(this.raw.responseText), core.String); + } + get responseUrl() { + return dart.as(wrap_jso(this.raw.responseURL), core.String); + } + get responseXml() { + return dart.as(wrap_jso(this.raw.responseXML), Document); + } + get status() { + return dart.as(wrap_jso(this.raw.status), core.int); + } + get statusText() { + return dart.as(wrap_jso(this.raw.statusText), core.String); + } + get timeout() { + return dart.as(wrap_jso(this.raw.timeout), core.int); + } + set timeout(val) { + return this.raw.timeout = unwrap_jso(val); + } + get upload() { + return dart.as(wrap_jso(this.raw.upload), HttpRequestEventTarget); + } + get withCredentials() { + return dart.as(wrap_jso(this.raw.withCredentials), core.bool); + } + set withCredentials(val) { + return this.raw.withCredentials = unwrap_jso(val); + } + abort() { + this[_abort_1](); + return; + } + [_abort_1]() { + return wrap_jso(this.raw.abort()); + } + getAllResponseHeaders() { + return this[_getAllResponseHeaders_1](); + } + [_getAllResponseHeaders_1]() { + return dart.as(wrap_jso(this.raw.getAllResponseHeaders()), core.String); + } + getResponseHeader(header) { + return this[_getResponseHeader_1](header); + } + [_getResponseHeader_1](header) { + return dart.as(wrap_jso(this.raw.getResponseHeader(unwrap_jso(header))), core.String); + } + overrideMimeType(override) { + this[_overrideMimeType_1](override); + return; + } + [_overrideMimeType_1](override) { + return wrap_jso(this.raw.overrideMimeType(unwrap_jso(override))); + } + send(data) { + if (data === void 0) + data = null; + if (data == null) { + this[_send_1](); + return; + } + if (dart.is(data, Document) || data == null) { + this[_send_2](dart.as(data, Document)); + return; + } + if (typeof data == 'string' || data == null) { + this[_send_3](dart.as(data, core.String)); + return; + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_send_1]() { + return wrap_jso(this.raw.send()); + } + [_send_2](data) { + return wrap_jso(this.raw.send(unwrap_jso(data))); + } + [_send_3](data) { + return wrap_jso(this.raw.send(unwrap_jso(data))); + } + setRequestHeader(header, value) { + this[_setRequestHeader_1](header, value); + return; + } + [_setRequestHeader_1](header, value) { + return wrap_jso(this.raw.setRequestHeader(unwrap_jso(header), unwrap_jso(value))); + } + get onReadyStateChange() { + return HttpRequest.readyStateChangeEvent.forTarget(this); + } + } + dart.defineNamedConstructor(HttpRequest, 'internal_'); + dart.setSignature(HttpRequest, { + constructors: () => ({ + _: [HttpRequest, []], + new: [HttpRequest, []], + internal_: [HttpRequest, []] + }), + methods: () => ({ + open: [dart.void, [core.String, core.String], {async: core.bool, user: core.String, password: core.String}], + abort: [dart.void, []], + [_abort_1]: [dart.void, []], + getAllResponseHeaders: [core.String, []], + [_getAllResponseHeaders_1]: [core.String, []], + getResponseHeader: [core.String, [core.String]], + [_getResponseHeader_1]: [core.String, [dart.dynamic]], + overrideMimeType: [dart.void, [core.String]], + [_overrideMimeType_1]: [dart.void, [dart.dynamic]], + send: [dart.void, [], [dart.dynamic]], + [_send_1]: [dart.void, []], + [_send_2]: [dart.void, [Document]], + [_send_3]: [dart.void, [core.String]], + setRequestHeader: [dart.void, [core.String, core.String]], + [_setRequestHeader_1]: [dart.void, [dart.dynamic, dart.dynamic]] + }), + statics: () => ({ + getString: [async.Future$(core.String), [core.String], {withCredentials: core.bool, onProgress: dart.functionType(dart.void, [ProgressEvent])}], + postFormData: [async.Future$(HttpRequest), [core.String, core.Map$(core.String, core.String)], {withCredentials: core.bool, responseType: core.String, requestHeaders: core.Map$(core.String, core.String), onProgress: dart.functionType(dart.void, [ProgressEvent])}], + request: [async.Future$(HttpRequest), [core.String], {method: core.String, withCredentials: core.bool, responseType: core.String, mimeType: core.String, requestHeaders: core.Map$(core.String, core.String), sendData: dart.dynamic, onProgress: dart.functionType(dart.void, [ProgressEvent])}], + requestCrossOrigin: [async.Future$(core.String), [core.String], {method: core.String, sendData: core.String}], + _create_1: [HttpRequest, []], + internalCreateHttpRequest: [HttpRequest, []] + }), + names: ['getString', 'postFormData', 'request', 'requestCrossOrigin', '_create_1', 'internalCreateHttpRequest'] + }); + HttpRequest[dart.metadata] = () => [dart.const(new _metadata.DomName('XMLHttpRequest')), dart.const(new _js_helper.Native("XMLHttpRequest"))]; + class ProgressEvent extends Event { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateProgressEvent() { + return new ProgressEvent.internal_(); + } + internal_() { + super.internal_(); + } + get lengthComputable() { + return dart.as(wrap_jso(this.raw.lengthComputable), core.bool); + } + get loaded() { + return dart.as(wrap_jso(this.raw.loaded), core.int); + } + get total() { + return dart.as(wrap_jso(this.raw.total), core.int); + } + } + dart.defineNamedConstructor(ProgressEvent, 'internal_'); + dart.setSignature(ProgressEvent, { + constructors: () => ({ + _: [ProgressEvent, []], + internal_: [ProgressEvent, []] + }), + statics: () => ({internalCreateProgressEvent: [ProgressEvent, []]}), + names: ['internalCreateProgressEvent'] + }); + ProgressEvent[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('ProgressEvent')), dart.const(new _js_helper.Native("ProgressEvent"))]; + HttpRequest.readyStateChangeEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('readystatechange')); + HttpRequest.DONE = 4; + HttpRequest.HEADERS_RECEIVED = 2; + HttpRequest.LOADING = 3; + HttpRequest.OPENED = 1; + HttpRequest.UNSENT = 0; + HttpRequestEventTarget.abortEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('abort')); + HttpRequestEventTarget.errorEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('error')); + HttpRequestEventTarget.loadEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('load')); + HttpRequestEventTarget.loadEndEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('loadend')); + HttpRequestEventTarget.loadStartEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('loadstart')); + HttpRequestEventTarget.progressEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('progress')); + HttpRequestEventTarget.timeoutEvent = dart.const(new (EventStreamProvider$(ProgressEvent))('timeout')); + const _get_valueAsDate = Symbol('_get_valueAsDate'); + const _set_valueAsDate = Symbol('_set_valueAsDate'); + const _checkValidity_1 = Symbol('_checkValidity_1'); + const _select_1 = Symbol('_select_1'); + const _setCustomValidity_1 = Symbol('_setCustomValidity_1'); + const _setRangeText_1 = Symbol('_setRangeText_1'); + const _setRangeText_2 = Symbol('_setRangeText_2'); + const _setRangeText_3 = Symbol('_setRangeText_3'); + const _setSelectionRange_1 = Symbol('_setSelectionRange_1'); + const _setSelectionRange_2 = Symbol('_setSelectionRange_2'); + const _stepDown_1 = Symbol('_stepDown_1'); + const _stepDown_2 = Symbol('_stepDown_2'); + const _stepUp_1 = Symbol('_stepUp_1'); + const _stepUp_2 = Symbol('_stepUp_2'); + class InputElement extends HtmlElement { + static new(opts) { + let type = opts && 'type' in opts ? opts.type : null; + let e = dart.as(exports.document.createElement("input"), InputElement); + if (type != null) { + try { + e.type = type; + } catch (_) { + } + + } + return e; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateInputElement() { + return new InputElement.internal_(); + } + internal_() { + super.internal_(); + } + get accept() { + return dart.as(wrap_jso(this.raw.accept), core.String); + } + set accept(val) { + return this.raw.accept = unwrap_jso(val); + } + get alt() { + return dart.as(wrap_jso(this.raw.alt), core.String); + } + set alt(val) { + return this.raw.alt = unwrap_jso(val); + } + get autocomplete() { + return dart.as(wrap_jso(this.raw.autocomplete), core.String); + } + set autocomplete(val) { + return this.raw.autocomplete = unwrap_jso(val); + } + get autofocus() { + return dart.as(wrap_jso(this.raw.autofocus), core.bool); + } + set autofocus(val) { + return this.raw.autofocus = unwrap_jso(val); + } + get capture() { + return dart.as(wrap_jso(this.raw.capture), core.bool); + } + set capture(val) { + return this.raw.capture = unwrap_jso(val); + } + get checked() { + return dart.as(wrap_jso(this.raw.checked), core.bool); + } + set checked(val) { + return this.raw.checked = unwrap_jso(val); + } + get defaultChecked() { + return dart.as(wrap_jso(this.raw.defaultChecked), core.bool); + } + set defaultChecked(val) { + return this.raw.defaultChecked = unwrap_jso(val); + } + get defaultValue() { + return dart.as(wrap_jso(this.raw.defaultValue), core.String); + } + set defaultValue(val) { + return this.raw.defaultValue = unwrap_jso(val); + } + get dirName() { + return dart.as(wrap_jso(this.raw.dirName), core.String); + } + set dirName(val) { + return this.raw.dirName = unwrap_jso(val); + } + get disabled() { + return dart.as(wrap_jso(this.raw.disabled), core.bool); + } + set disabled(val) { + return this.raw.disabled = unwrap_jso(val); + } + get form() { + return dart.as(wrap_jso(this.raw.form), HtmlElement); + } + get formAction() { + return dart.as(wrap_jso(this.raw.formAction), core.String); + } + set formAction(val) { + return this.raw.formAction = unwrap_jso(val); + } + get formEnctype() { + return dart.as(wrap_jso(this.raw.formEnctype), core.String); + } + set formEnctype(val) { + return this.raw.formEnctype = unwrap_jso(val); + } + get formMethod() { + return dart.as(wrap_jso(this.raw.formMethod), core.String); + } + set formMethod(val) { + return this.raw.formMethod = unwrap_jso(val); + } + get formNoValidate() { + return dart.as(wrap_jso(this.raw.formNoValidate), core.bool); + } + set formNoValidate(val) { + return this.raw.formNoValidate = unwrap_jso(val); + } + get formTarget() { + return dart.as(wrap_jso(this.raw.formTarget), core.String); + } + set formTarget(val) { + return this.raw.formTarget = unwrap_jso(val); + } + get height() { + return dart.as(wrap_jso(this.raw.height), core.int); + } + set height(val) { + return this.raw.height = unwrap_jso(val); + } + get incremental() { + return dart.as(wrap_jso(this.raw.incremental), core.bool); + } + set incremental(val) { + return this.raw.incremental = unwrap_jso(val); + } + get indeterminate() { + return dart.as(wrap_jso(this.raw.indeterminate), core.bool); + } + set indeterminate(val) { + return this.raw.indeterminate = unwrap_jso(val); + } + get inputMode() { + return dart.as(wrap_jso(this.raw.inputMode), core.String); + } + set inputMode(val) { + return this.raw.inputMode = unwrap_jso(val); + } + get labels() { + return dart.as(wrap_jso(this.raw.labels), core.List$(Node)); + } + get list() { + return dart.as(wrap_jso(this.raw.list), HtmlElement); + } + get max() { + return dart.as(wrap_jso(this.raw.max), core.String); + } + set max(val) { + return this.raw.max = unwrap_jso(val); + } + get maxLength() { + return dart.as(wrap_jso(this.raw.maxLength), core.int); + } + set maxLength(val) { + return this.raw.maxLength = unwrap_jso(val); + } + get min() { + return dart.as(wrap_jso(this.raw.min), core.String); + } + set min(val) { + return this.raw.min = unwrap_jso(val); + } + get multiple() { + return dart.as(wrap_jso(this.raw.multiple), core.bool); + } + set multiple(val) { + return this.raw.multiple = unwrap_jso(val); + } + get name() { + return dart.as(wrap_jso(this.raw.name), core.String); + } + set name(val) { + return this.raw.name = unwrap_jso(val); + } + get pattern() { + return dart.as(wrap_jso(this.raw.pattern), core.String); + } + set pattern(val) { + return this.raw.pattern = unwrap_jso(val); + } + get placeholder() { + return dart.as(wrap_jso(this.raw.placeholder), core.String); + } + set placeholder(val) { + return this.raw.placeholder = unwrap_jso(val); + } + get readOnly() { + return dart.as(wrap_jso(this.raw.readOnly), core.bool); + } + set readOnly(val) { + return this.raw.readOnly = unwrap_jso(val); + } + get required() { + return dart.as(wrap_jso(this.raw.required), core.bool); + } + set required(val) { + return this.raw.required = unwrap_jso(val); + } + get selectionDirection() { + return dart.as(wrap_jso(this.raw.selectionDirection), core.String); + } + set selectionDirection(val) { + return this.raw.selectionDirection = unwrap_jso(val); + } + get selectionEnd() { + return dart.as(wrap_jso(this.raw.selectionEnd), core.int); + } + set selectionEnd(val) { + return this.raw.selectionEnd = unwrap_jso(val); + } + get selectionStart() { + return dart.as(wrap_jso(this.raw.selectionStart), core.int); + } + set selectionStart(val) { + return this.raw.selectionStart = unwrap_jso(val); + } + get size() { + return dart.as(wrap_jso(this.raw.size), core.int); + } + set size(val) { + return this.raw.size = unwrap_jso(val); + } + get src() { + return dart.as(wrap_jso(this.raw.src), core.String); + } + set src(val) { + return this.raw.src = unwrap_jso(val); + } + get step() { + return dart.as(wrap_jso(this.raw.step), core.String); + } + set step(val) { + return this.raw.step = unwrap_jso(val); + } + get type() { + return dart.as(wrap_jso(this.raw.type), core.String); + } + set type(val) { + return this.raw.type = unwrap_jso(val); + } + get validationMessage() { + return dart.as(wrap_jso(this.raw.validationMessage), core.String); + } + get value() { + return dart.as(wrap_jso(this.raw.value), core.String); + } + set value(val) { + return this.raw.value = unwrap_jso(val); + } + get valueAsDate() { + return html_common.convertNativeToDart_DateTime(this[_get_valueAsDate]); + } + get [_get_valueAsDate]() { + return wrap_jso(this.raw.valueAsDate); + } + set valueAsDate(value) { + this[_set_valueAsDate] = html_common.convertDartToNative_DateTime(value); + } + set [_set_valueAsDate](value) { + this.raw.valueAsDate = unwrap_jso(value); + } + get valueAsNumber() { + return dart.as(wrap_jso(this.raw.valueAsNumber), core.num); + } + set valueAsNumber(val) { + return this.raw.valueAsNumber = unwrap_jso(val); + } + get directory() { + return dart.as(wrap_jso(this.raw.webkitdirectory), core.bool); + } + set directory(val) { + return this.raw.webkitdirectory = unwrap_jso(val); + } + get width() { + return dart.as(wrap_jso(this.raw.width), core.int); + } + set width(val) { + return this.raw.width = unwrap_jso(val); + } + get willValidate() { + return dart.as(wrap_jso(this.raw.willValidate), core.bool); + } + checkValidity() { + return this[_checkValidity_1](); + } + [_checkValidity_1]() { + return dart.as(wrap_jso(this.raw.checkValidity()), core.bool); + } + select() { + this[_select_1](); + return; + } + [_select_1]() { + return wrap_jso(this.raw.select()); + } + setCustomValidity(error) { + this[_setCustomValidity_1](error); + return; + } + [_setCustomValidity_1](error) { + return wrap_jso(this.raw.setCustomValidity(unwrap_jso(error))); + } + setRangeText(replacement, opts) { + let start = opts && 'start' in opts ? opts.start : null; + let end = opts && 'end' in opts ? opts.end : null; + let selectionMode = opts && 'selectionMode' in opts ? opts.selectionMode : null; + if (start == null && end == null && selectionMode == null) { + this[_setRangeText_1](replacement); + return; + } + if (end != null && start != null && selectionMode == null) { + this[_setRangeText_2](replacement, start, end); + return; + } + if (selectionMode != null && end != null && start != null) { + this[_setRangeText_3](replacement, start, end, selectionMode); + return; + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_setRangeText_1](replacement) { + return wrap_jso(this.raw.setRangeText(unwrap_jso(replacement))); + } + [_setRangeText_2](replacement, start, end) { + return wrap_jso(this.raw.setRangeText(unwrap_jso(replacement), unwrap_jso(start), unwrap_jso(end))); + } + [_setRangeText_3](replacement, start, end, selectionMode) { + return wrap_jso(this.raw.setRangeText(unwrap_jso(replacement), unwrap_jso(start), unwrap_jso(end), unwrap_jso(selectionMode))); + } + setSelectionRange(start, end, direction) { + if (direction === void 0) + direction = null; + if (direction != null) { + this[_setSelectionRange_1](start, end, direction); + return; + } + this[_setSelectionRange_2](start, end); + return; + } + [_setSelectionRange_1](start, end, direction) { + return wrap_jso(this.raw.setSelectionRange(unwrap_jso(start), unwrap_jso(end), unwrap_jso(direction))); + } + [_setSelectionRange_2](start, end) { + return wrap_jso(this.raw.setSelectionRange(unwrap_jso(start), unwrap_jso(end))); + } + stepDown(n) { + if (n === void 0) + n = null; + if (n != null) { + this[_stepDown_1](n); + return; + } + this[_stepDown_2](); + return; + } + [_stepDown_1](n) { + return wrap_jso(this.raw.stepDown(unwrap_jso(n))); + } + [_stepDown_2]() { + return wrap_jso(this.raw.stepDown()); + } + stepUp(n) { + if (n === void 0) + n = null; + if (n != null) { + this[_stepUp_1](n); + return; + } + this[_stepUp_2](); + return; + } + [_stepUp_1](n) { + return wrap_jso(this.raw.stepUp(unwrap_jso(n))); + } + [_stepUp_2]() { + return wrap_jso(this.raw.stepUp()); + } + } + InputElement[dart.implements] = () => [HiddenInputElement, SearchInputElement, TextInputElement, UrlInputElement, TelephoneInputElement, EmailInputElement, PasswordInputElement, DateInputElement, MonthInputElement, WeekInputElement, TimeInputElement, LocalDateTimeInputElement, NumberInputElement, RangeInputElement, CheckboxInputElement, RadioButtonInputElement, FileUploadInputElement, SubmitButtonInputElement, ImageButtonInputElement, ResetButtonInputElement, ButtonInputElement]; + dart.defineNamedConstructor(InputElement, 'internal_'); + dart.setSignature(InputElement, { + constructors: () => ({ + new: [InputElement, [], {type: core.String}], + _: [InputElement, []], + internal_: [InputElement, []] + }), + methods: () => ({ + checkValidity: [core.bool, []], + [_checkValidity_1]: [core.bool, []], + select: [dart.void, []], + [_select_1]: [dart.void, []], + setCustomValidity: [dart.void, [core.String]], + [_setCustomValidity_1]: [dart.void, [dart.dynamic]], + setRangeText: [dart.void, [core.String], {start: core.int, end: core.int, selectionMode: core.String}], + [_setRangeText_1]: [dart.void, [dart.dynamic]], + [_setRangeText_2]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_setRangeText_3]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]], + setSelectionRange: [dart.void, [core.int, core.int], [core.String]], + [_setSelectionRange_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_setSelectionRange_2]: [dart.void, [dart.dynamic, dart.dynamic]], + stepDown: [dart.void, [], [core.int]], + [_stepDown_1]: [dart.void, [dart.dynamic]], + [_stepDown_2]: [dart.void, []], + stepUp: [dart.void, [], [core.int]], + [_stepUp_1]: [dart.void, [dart.dynamic]], + [_stepUp_2]: [dart.void, []] + }), + statics: () => ({internalCreateInputElement: [InputElement, []]}), + names: ['internalCreateInputElement'] + }); + InputElement[dart.metadata] = () => [dart.const(new _metadata.DomName('HTMLInputElement')), dart.const(new _js_helper.Native("HTMLInputElement"))]; + class InputElementBase extends core.Object { + InputElementBase() { + this.autofocus = null; + this.disabled = null; + this.incremental = null; + this.indeterminate = null; + this.name = null; + this.value = null; + } + } + InputElementBase[dart.implements] = () => [Element]; + class HiddenInputElement extends core.Object { + static new() { + return InputElement.new({type: 'hidden'}); + } + } + HiddenInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(HiddenInputElement, { + constructors: () => ({new: [HiddenInputElement, []]}) + }); + class TextInputElementBase extends core.Object { + TextInputElementBase() { + this.autocomplete = null; + this.maxLength = null; + this.pattern = null; + this.placeholder = null; + this.readOnly = null; + this.required = null; + this.size = null; + this.selectionDirection = null; + this.selectionEnd = null; + this.selectionStart = null; + } + } + TextInputElementBase[dart.implements] = () => [InputElementBase]; + class SearchInputElement extends core.Object { + static new() { + return InputElement.new({type: 'search'}); + } + static get supported() { + return InputElement.new({type: 'search'}).type == 'search'; + } + } + SearchInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(SearchInputElement, { + constructors: () => ({new: [SearchInputElement, []]}) + }); + SearchInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.FIREFOX)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE, '10')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.SAFARI))]; + class TextInputElement extends core.Object { + static new() { + return InputElement.new({type: 'text'}); + } + } + TextInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(TextInputElement, { + constructors: () => ({new: [TextInputElement, []]}) + }); + class UrlInputElement extends core.Object { + static new() { + return InputElement.new({type: 'url'}); + } + static get supported() { + return InputElement.new({type: 'url'}).type == 'url'; + } + } + UrlInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(UrlInputElement, { + constructors: () => ({new: [UrlInputElement, []]}) + }); + UrlInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.FIREFOX)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE, '10')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.SAFARI))]; + class TelephoneInputElement extends core.Object { + static new() { + return InputElement.new({type: 'tel'}); + } + static get supported() { + return InputElement.new({type: 'tel'}).type == 'tel'; + } + } + TelephoneInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(TelephoneInputElement, { + constructors: () => ({new: [TelephoneInputElement, []]}) + }); + TelephoneInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.FIREFOX)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE, '10')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.SAFARI))]; + class EmailInputElement extends core.Object { + static new() { + return InputElement.new({type: 'email'}); + } + static get supported() { + return InputElement.new({type: 'email'}).type == 'email'; + } + } + EmailInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(EmailInputElement, { + constructors: () => ({new: [EmailInputElement, []]}) + }); + EmailInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.FIREFOX)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE, '10')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.SAFARI))]; + class PasswordInputElement extends core.Object { + static new() { + return InputElement.new({type: 'password'}); + } + } + PasswordInputElement[dart.implements] = () => [TextInputElementBase]; + dart.setSignature(PasswordInputElement, { + constructors: () => ({new: [PasswordInputElement, []]}) + }); + class RangeInputElementBase extends core.Object { + RangeInputElementBase() { + this.max = null; + this.min = null; + this.step = null; + this.valueAsNumber = null; + } + } + RangeInputElementBase[dart.implements] = () => [InputElementBase]; + class DateInputElement extends core.Object { + static new() { + return InputElement.new({type: 'date'}); + } + static get supported() { + return InputElement.new({type: 'date'}).type == 'date'; + } + } + DateInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(DateInputElement, { + constructors: () => ({new: [DateInputElement, []]}) + }); + DateInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME, '25')), dart.const(new _metadata.Experimental())]; + class MonthInputElement extends core.Object { + static new() { + return InputElement.new({type: 'month'}); + } + static get supported() { + return InputElement.new({type: 'month'}).type == 'month'; + } + } + MonthInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(MonthInputElement, { + constructors: () => ({new: [MonthInputElement, []]}) + }); + MonthInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME, '25')), dart.const(new _metadata.Experimental())]; + class WeekInputElement extends core.Object { + static new() { + return InputElement.new({type: 'week'}); + } + static get supported() { + return InputElement.new({type: 'week'}).type == 'week'; + } + } + WeekInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(WeekInputElement, { + constructors: () => ({new: [WeekInputElement, []]}) + }); + WeekInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME, '25')), dart.const(new _metadata.Experimental())]; + class TimeInputElement extends core.Object { + static new() { + return InputElement.new({type: 'time'}); + } + static get supported() { + return InputElement.new({type: 'time'}).type == 'time'; + } + } + TimeInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(TimeInputElement, { + constructors: () => ({new: [TimeInputElement, []]}) + }); + TimeInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.Experimental())]; + class LocalDateTimeInputElement extends core.Object { + static new() { + return InputElement.new({type: 'datetime-local'}); + } + static get supported() { + return InputElement.new({type: 'datetime-local'}).type == 'datetime-local'; + } + } + LocalDateTimeInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(LocalDateTimeInputElement, { + constructors: () => ({new: [LocalDateTimeInputElement, []]}) + }); + LocalDateTimeInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME, '25')), dart.const(new _metadata.Experimental())]; + class NumberInputElement extends core.Object { + static new() { + return InputElement.new({type: 'number'}); + } + static get supported() { + return InputElement.new({type: 'number'}).type == 'number'; + } + } + NumberInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(NumberInputElement, { + constructors: () => ({new: [NumberInputElement, []]}) + }); + NumberInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.SAFARI)), dart.const(new _metadata.Experimental())]; + class RangeInputElement extends core.Object { + static new() { + return InputElement.new({type: 'range'}); + } + static get supported() { + return InputElement.new({type: 'range'}).type == 'range'; + } + } + RangeInputElement[dart.implements] = () => [RangeInputElementBase]; + dart.setSignature(RangeInputElement, { + constructors: () => ({new: [RangeInputElement, []]}) + }); + RangeInputElement[dart.metadata] = () => [dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.IE, '10')), dart.const(new _metadata.Experimental())]; + class CheckboxInputElement extends core.Object { + static new() { + return InputElement.new({type: 'checkbox'}); + } + } + CheckboxInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(CheckboxInputElement, { + constructors: () => ({new: [CheckboxInputElement, []]}) + }); + class RadioButtonInputElement extends core.Object { + static new() { + return InputElement.new({type: 'radio'}); + } + } + RadioButtonInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(RadioButtonInputElement, { + constructors: () => ({new: [RadioButtonInputElement, []]}) + }); + class FileUploadInputElement extends core.Object { + static new() { + return InputElement.new({type: 'file'}); + } + } + FileUploadInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(FileUploadInputElement, { + constructors: () => ({new: [FileUploadInputElement, []]}) + }); + class SubmitButtonInputElement extends core.Object { + static new() { + return InputElement.new({type: 'submit'}); + } + } + SubmitButtonInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(SubmitButtonInputElement, { + constructors: () => ({new: [SubmitButtonInputElement, []]}) + }); + class ImageButtonInputElement extends core.Object { + static new() { + return InputElement.new({type: 'image'}); + } + } + ImageButtonInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(ImageButtonInputElement, { + constructors: () => ({new: [ImageButtonInputElement, []]}) + }); + class ResetButtonInputElement extends core.Object { + static new() { + return InputElement.new({type: 'reset'}); + } + } + ResetButtonInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(ResetButtonInputElement, { + constructors: () => ({new: [ResetButtonInputElement, []]}) + }); + class ButtonInputElement extends core.Object { + static new() { + return InputElement.new({type: 'button'}); + } + } + ButtonInputElement[dart.implements] = () => [InputElementBase]; + dart.setSignature(ButtonInputElement, { + constructors: () => ({new: [ButtonInputElement, []]}) + }); + const _initUIEvent = Symbol('_initUIEvent'); + const _charCode = Symbol('_charCode'); + const _keyCode = Symbol('_keyCode'); + const _layerX = Symbol('_layerX'); + const _layerY = Symbol('_layerY'); + const _pageX = Symbol('_pageX'); + const _pageY = Symbol('_pageY'); + const _get_view = Symbol('_get_view'); + const _initUIEvent_1 = Symbol('_initUIEvent_1'); + class UIEvent extends Event { + static new(type, opts) { + let view = opts && 'view' in opts ? opts.view : null; + let detail = opts && 'detail' in opts ? opts.detail : 0; + let canBubble = opts && 'canBubble' in opts ? opts.canBubble : true; + let cancelable = opts && 'cancelable' in opts ? opts.cancelable : true; + if (view == null) { + view = exports.window; + } + let e = dart.as(exports.document[_createEvent]("UIEvent"), UIEvent); + e[_initUIEvent](type, canBubble, cancelable, view, detail); + return e; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateUIEvent() { + return new UIEvent.internal_(); + } + internal_() { + super.internal_(); + } + get [_charCode]() { + return dart.as(wrap_jso(this.raw.charCode), core.int); + } + get detail() { + return dart.as(wrap_jso(this.raw.detail), core.int); + } + get [_keyCode]() { + return dart.as(wrap_jso(this.raw.keyCode), core.int); + } + get [_layerX]() { + return dart.as(wrap_jso(this.raw.layerX), core.int); + } + get [_layerY]() { + return dart.as(wrap_jso(this.raw.layerY), core.int); + } + get [_pageX]() { + return dart.as(wrap_jso(this.raw.pageX), core.int); + } + get [_pageY]() { + return dart.as(wrap_jso(this.raw.pageY), core.int); + } + get view() { + return _convertNativeToDart_Window(this[_get_view]); + } + get [_get_view]() { + return wrap_jso(this.raw.view); + } + get which() { + return dart.as(wrap_jso(this.raw.which), core.int); + } + [_initUIEvent](type, canBubble, cancelable, view, detail) { + this[_initUIEvent_1](type, canBubble, cancelable, view, detail); + return; + } + [_initUIEvent_1](type, canBubble, cancelable, view, detail) { + return wrap_jso(this.raw.initUIEvent(unwrap_jso(type), unwrap_jso(canBubble), unwrap_jso(cancelable), unwrap_jso(view), unwrap_jso(detail))); + } + get layer() { + return new math.Point(this[_layerX], this[_layerY]); + } + get page() { + return new math.Point(this[_pageX], this[_pageY]); + } + } + dart.defineNamedConstructor(UIEvent, 'internal_'); + dart.setSignature(UIEvent, { + constructors: () => ({ + new: [UIEvent, [core.String], {view: Window, detail: core.int, canBubble: core.bool, cancelable: core.bool}], + _: [UIEvent, []], + internal_: [UIEvent, []] + }), + methods: () => ({ + [_initUIEvent]: [dart.void, [core.String, core.bool, core.bool, Window, core.int]], + [_initUIEvent_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic, Window, dart.dynamic]] + }), + statics: () => ({internalCreateUIEvent: [UIEvent, []]}), + names: ['internalCreateUIEvent'] + }); + UIEvent[dart.metadata] = () => [dart.const(new _metadata.DomName('UIEvent')), dart.const(new _js_helper.Native("UIEvent"))]; + const _initKeyboardEvent = Symbol('_initKeyboardEvent'); + const _keyIdentifier = Symbol('_keyIdentifier'); + const _getModifierState_1 = Symbol('_getModifierState_1'); + class KeyboardEvent extends UIEvent { + static new(type, opts) { + let view = opts && 'view' in opts ? opts.view : null; + let canBubble = opts && 'canBubble' in opts ? opts.canBubble : true; + let cancelable = opts && 'cancelable' in opts ? opts.cancelable : true; + let keyLocation = opts && 'keyLocation' in opts ? opts.keyLocation : 1; + let ctrlKey = opts && 'ctrlKey' in opts ? opts.ctrlKey : false; + let altKey = opts && 'altKey' in opts ? opts.altKey : false; + let shiftKey = opts && 'shiftKey' in opts ? opts.shiftKey : false; + let metaKey = opts && 'metaKey' in opts ? opts.metaKey : false; + if (view == null) { + view = exports.window; + } + let e = dart.as(exports.document[_createEvent]("KeyboardEvent"), KeyboardEvent); + e[_initKeyboardEvent](type, canBubble, cancelable, view, "", keyLocation, ctrlKey, altKey, shiftKey, metaKey); + return e; + } + [_initKeyboardEvent](type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey) { + if (typeof this.raw.initKeyEvent == "function") { + this.raw.initKeyEvent(type, canBubble, cancelable, unwrap_jso(view), ctrlKey, altKey, shiftKey, metaKey, 0, 0); + } else { + this.raw.initKeyboardEvent(type, canBubble, cancelable, unwrap_jso(view), keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey); + } + } + get keyCode() { + return this[_keyCode]; + } + get charCode() { + return this[_charCode]; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateKeyboardEvent() { + return new KeyboardEvent.internal_(); + } + internal_() { + super.internal_(); + } + get altKey() { + return dart.as(wrap_jso(this.raw.altKey), core.bool); + } + get ctrlKey() { + return dart.as(wrap_jso(this.raw.ctrlKey), core.bool); + } + get [_keyIdentifier]() { + return dart.as(wrap_jso(this.raw.keyIdentifier), core.String); + } + get keyLocation() { + return dart.as(wrap_jso(this.raw.keyLocation), core.int); + } + get location() { + return dart.as(wrap_jso(this.raw.location), core.int); + } + get metaKey() { + return dart.as(wrap_jso(this.raw.metaKey), core.bool); + } + get repeat() { + return dart.as(wrap_jso(this.raw.repeat), core.bool); + } + get shiftKey() { + return dart.as(wrap_jso(this.raw.shiftKey), core.bool); + } + getModifierState(keyArgument) { + return this[_getModifierState_1](keyArgument); + } + [_getModifierState_1](keyArgument) { + return dart.as(wrap_jso(this.raw.getModifierState(unwrap_jso(keyArgument))), core.bool); + } + } + dart.defineNamedConstructor(KeyboardEvent, 'internal_'); + dart.setSignature(KeyboardEvent, { + constructors: () => ({ + new: [KeyboardEvent, [core.String], {view: Window, canBubble: core.bool, cancelable: core.bool, keyLocation: core.int, ctrlKey: core.bool, altKey: core.bool, shiftKey: core.bool, metaKey: core.bool}], + _: [KeyboardEvent, []], + internal_: [KeyboardEvent, []] + }), + methods: () => ({ + [_initKeyboardEvent]: [dart.void, [core.String, core.bool, core.bool, Window, core.String, core.int, core.bool, core.bool, core.bool, core.bool]], + getModifierState: [core.bool, [core.String]], + [_getModifierState_1]: [core.bool, [dart.dynamic]] + }), + statics: () => ({internalCreateKeyboardEvent: [KeyboardEvent, []]}), + names: ['internalCreateKeyboardEvent'] + }); + KeyboardEvent[dart.metadata] = () => [dart.const(new _metadata.DomName('KeyboardEvent')), dart.const(new _js_helper.Native("KeyboardEvent"))]; + KeyboardEvent.DOM_KEY_LOCATION_LEFT = 1; + KeyboardEvent.DOM_KEY_LOCATION_NUMPAD = 3; + KeyboardEvent.DOM_KEY_LOCATION_RIGHT = 2; + KeyboardEvent.DOM_KEY_LOCATION_STANDARD = 0; + const _assign_1 = Symbol('_assign_1'); + const _assign_2 = Symbol('_assign_2'); + const _reload_1 = Symbol('_reload_1'); + const _replace_1 = Symbol('_replace_1'); + class Location extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateLocation() { + return new Location.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get hash() { + return dart.as(wrap_jso(this.raw.hash), core.String); + } + set hash(val) { + return this.raw.hash = unwrap_jso(val); + } + get host() { + return dart.as(wrap_jso(this.raw.host), core.String); + } + set host(val) { + return this.raw.host = unwrap_jso(val); + } + get hostname() { + return dart.as(wrap_jso(this.raw.hostname), core.String); + } + set hostname(val) { + return this.raw.hostname = unwrap_jso(val); + } + get href() { + return dart.as(wrap_jso(this.raw.href), core.String); + } + set href(val) { + return this.raw.href = unwrap_jso(val); + } + get pathname() { + return dart.as(wrap_jso(this.raw.pathname), core.String); + } + set pathname(val) { + return this.raw.pathname = unwrap_jso(val); + } + get port() { + return dart.as(wrap_jso(this.raw.port), core.String); + } + set port(val) { + return this.raw.port = unwrap_jso(val); + } + get protocol() { + return dart.as(wrap_jso(this.raw.protocol), core.String); + } + set protocol(val) { + return this.raw.protocol = unwrap_jso(val); + } + get search() { + return dart.as(wrap_jso(this.raw.search), core.String); + } + set search(val) { + return this.raw.search = unwrap_jso(val); + } + assign(url) { + if (url === void 0) + url = null; + if (url != null) { + this[_assign_1](url); + return; + } + this[_assign_2](); + return; + } + [_assign_1](url) { + return wrap_jso(this.raw.assign(unwrap_jso(url))); + } + [_assign_2]() { + return wrap_jso(this.raw.assign()); + } + reload() { + this[_reload_1](); + return; + } + [_reload_1]() { + return wrap_jso(this.raw.reload()); + } + replace(url) { + this[_replace_1](url); + return; + } + [_replace_1](url) { + return wrap_jso(this.raw.replace(unwrap_jso(url))); + } + } + Location[dart.implements] = () => [LocationBase]; + dart.defineNamedConstructor(Location, 'internal_'); + dart.setSignature(Location, { + constructors: () => ({ + _: [Location, []], + internal_: [Location, []] + }), + methods: () => ({ + assign: [dart.void, [], [core.String]], + [_assign_1]: [dart.void, [dart.dynamic]], + [_assign_2]: [dart.void, []], + reload: [dart.void, []], + [_reload_1]: [dart.void, []], + replace: [dart.void, [core.String]], + [_replace_1]: [dart.void, [dart.dynamic]] + }), + statics: () => ({internalCreateLocation: [Location, []]}), + names: ['internalCreateLocation'] + }); + Location[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('Location')), dart.const(new _js_helper.Native("Location"))]; + const _clientX = Symbol('_clientX'); + const _clientY = Symbol('_clientY'); + const _movementX = Symbol('_movementX'); + const _movementY = Symbol('_movementY'); + const _get_relatedTarget = Symbol('_get_relatedTarget'); + const _screenX = Symbol('_screenX'); + const _screenY = Symbol('_screenY'); + const _webkitMovementX = Symbol('_webkitMovementX'); + const _webkitMovementY = Symbol('_webkitMovementY'); + const _initMouseEvent_1 = Symbol('_initMouseEvent_1'); + const _initMouseEvent = Symbol('_initMouseEvent'); + class MouseEvent extends UIEvent { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateMouseEvent() { + return new MouseEvent.internal_(); + } + internal_() { + super.internal_(); + } + get altKey() { + return dart.as(wrap_jso(this.raw.altKey), core.bool); + } + get button() { + return dart.as(wrap_jso(this.raw.button), core.int); + } + get [_clientX]() { + return dart.as(wrap_jso(this.raw.clientX), core.int); + } + get [_clientY]() { + return dart.as(wrap_jso(this.raw.clientY), core.int); + } + get ctrlKey() { + return dart.as(wrap_jso(this.raw.ctrlKey), core.bool); + } + get fromElement() { + return dart.as(wrap_jso(this.raw.fromElement), Node); + } + get metaKey() { + return dart.as(wrap_jso(this.raw.metaKey), core.bool); + } + get [_movementX]() { + return dart.as(wrap_jso(this.raw.movementX), core.int); + } + get [_movementY]() { + return dart.as(wrap_jso(this.raw.movementY), core.int); + } + get region() { + return dart.as(wrap_jso(this.raw.region), core.String); + } + get relatedTarget() { + return _convertNativeToDart_EventTarget(this[_get_relatedTarget]); + } + get [_get_relatedTarget]() { + return wrap_jso(this.raw.relatedTarget); + } + get [_screenX]() { + return dart.as(wrap_jso(this.raw.screenX), core.int); + } + get [_screenY]() { + return dart.as(wrap_jso(this.raw.screenY), core.int); + } + get shiftKey() { + return dart.as(wrap_jso(this.raw.shiftKey), core.bool); + } + get toElement() { + return dart.as(wrap_jso(this.raw.toElement), Node); + } + get [_webkitMovementX]() { + return dart.as(wrap_jso(this.raw.webkitMovementX), core.int); + } + get [_webkitMovementY]() { + return dart.as(wrap_jso(this.raw.webkitMovementY), core.int); + } + [_initMouseEvent](type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) { + let relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget); + this[_initMouseEvent_1](type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1); + return; + } + [_initMouseEvent_1](type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) { + return wrap_jso(this.raw.initMouseEvent(unwrap_jso(type), unwrap_jso(canBubble), unwrap_jso(cancelable), unwrap_jso(view), unwrap_jso(detail), unwrap_jso(screenX), unwrap_jso(screenY), unwrap_jso(clientX), unwrap_jso(clientY), unwrap_jso(ctrlKey), unwrap_jso(altKey), unwrap_jso(shiftKey), unwrap_jso(metaKey), unwrap_jso(button), unwrap_jso(relatedTarget))); + } + } + dart.defineNamedConstructor(MouseEvent, 'internal_'); + dart.setSignature(MouseEvent, { + constructors: () => ({ + _: [MouseEvent, []], + internal_: [MouseEvent, []] + }), + methods: () => ({ + [_initMouseEvent]: [dart.void, [core.String, core.bool, core.bool, Window, core.int, core.int, core.int, core.int, core.int, core.bool, core.bool, core.bool, core.bool, core.int, EventTarget]], + [_initMouseEvent_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic, Window, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]] + }), + statics: () => ({internalCreateMouseEvent: [MouseEvent, []]}), + names: ['internalCreateMouseEvent'] + }); + MouseEvent[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('MouseEvent')), dart.const(new _js_helper.Native("MouseEvent,DragEvent,PointerEvent,MSPointerEvent"))]; + const _getBattery_1 = Symbol('_getBattery_1'); + const _getStorageUpdates_1 = Symbol('_getStorageUpdates_1'); + const _registerProtocolHandler_1 = Symbol('_registerProtocolHandler_1'); + const _sendBeacon_1 = Symbol('_sendBeacon_1'); + class Navigator extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateNavigator() { + return new Navigator.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get cookieEnabled() { + return dart.as(wrap_jso(this.raw.cookieEnabled), core.bool); + } + get doNotTrack() { + return dart.as(wrap_jso(this.raw.doNotTrack), core.String); + } + get maxTouchPoints() { + return dart.as(wrap_jso(this.raw.maxTouchPoints), core.int); + } + get productSub() { + return dart.as(wrap_jso(this.raw.productSub), core.String); + } + get vendor() { + return dart.as(wrap_jso(this.raw.vendor), core.String); + } + get vendorSub() { + return dart.as(wrap_jso(this.raw.vendorSub), core.String); + } + getBattery() { + return this[_getBattery_1](); + } + [_getBattery_1]() { + return dart.as(wrap_jso(this.raw.getBattery()), async.Future); + } + getStorageUpdates() { + this[_getStorageUpdates_1](); + return; + } + [_getStorageUpdates_1]() { + return wrap_jso(this.raw.getStorageUpdates()); + } + registerProtocolHandler(scheme, url, title) { + this[_registerProtocolHandler_1](scheme, url, title); + return; + } + [_registerProtocolHandler_1](scheme, url, title) { + return wrap_jso(this.raw.registerProtocolHandler(unwrap_jso(scheme), unwrap_jso(url), unwrap_jso(title))); + } + sendBeacon(url, data) { + return this[_sendBeacon_1](url, data); + } + [_sendBeacon_1](url, data) { + return dart.as(wrap_jso(this.raw.sendBeacon(unwrap_jso(url), unwrap_jso(data))), core.bool); + } + get hardwareConcurrency() { + return dart.as(wrap_jso(this.raw.hardwareConcurrency), core.int); + } + } + Navigator[dart.implements] = () => [NavigatorCpu]; + dart.defineNamedConstructor(Navigator, 'internal_'); + dart.setSignature(Navigator, { + constructors: () => ({ + _: [Navigator, []], + internal_: [Navigator, []] + }), + methods: () => ({ + getBattery: [async.Future, []], + [_getBattery_1]: [async.Future, []], + getStorageUpdates: [dart.void, []], + [_getStorageUpdates_1]: [dart.void, []], + registerProtocolHandler: [dart.void, [core.String, core.String, core.String]], + [_registerProtocolHandler_1]: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + sendBeacon: [core.bool, [core.String, core.String]], + [_sendBeacon_1]: [core.bool, [dart.dynamic, dart.dynamic]] + }), + statics: () => ({internalCreateNavigator: [Navigator, []]}), + names: ['internalCreateNavigator'] + }); + Navigator[dart.metadata] = () => [dart.const(new _metadata.DomName('Navigator')), dart.const(new _js_helper.Native("Navigator"))]; + class NavigatorCpu extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + get hardwareConcurrency() { + return dart.as(wrap_jso(this.raw.hardwareConcurrency), core.int); + } + } + dart.setSignature(NavigatorCpu, { + constructors: () => ({_: [NavigatorCpu, []]}) + }); + NavigatorCpu[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('NavigatorCPU')), dart.const(new _metadata.Experimental())]; + class _ChildNodeListLazy extends collection.ListBase$(Node) { + _ChildNodeListLazy(this$) { + this[_this] = this$; + } + get first() { + let result = this[_this].firstChild; + if (result == null) + dart.throw(new core.StateError("No elements")); + return result; + } + get last() { + let result = this[_this].lastChild; + if (result == null) + dart.throw(new core.StateError("No elements")); + return result; + } + get single() { + let l = this.length; + if (l == 0) + dart.throw(new core.StateError("No elements")); + if (dart.notNull(l) > 1) + dart.throw(new core.StateError("More than one element")); + return this[_this].firstChild; + } + add(value) { + this[_this].append(value); + } + addAll(iterable) { + if (dart.is(iterable, _ChildNodeListLazy)) { + let otherList = iterable; + if (!dart.notNull(core.identical(otherList[_this], this[_this]))) { + for (let i = 0, len = otherList.length; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1) { + this[_this].append(otherList[_this].firstChild); + } + } + return; + } + for (let node of iterable) { + this[_this].append(node); + } + } + insert(index, node) { + if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this.length)) { + dart.throw(new core.RangeError.range(index, 0, this.length)); + } + if (index == this.length) { + this[_this].append(node); + } else { + this[_this].insertBefore(node, this.get(index)); + } + } + insertAll(index, iterable) { + if (index == this.length) { + this.addAll(iterable); + } else { + let item = this.get(index); + this[_this].insertAllBefore(iterable, item); + } + } + setAll(index, iterable) { + dart.throw(new core.UnsupportedError("Cannot setAll on Node list")); + } + removeLast() { + let result = this.last; + if (result != null) { + this[_this][_removeChild](result); + } + return result; + } + removeAt(index) { + let result = this.get(index); + if (result != null) { + this[_this][_removeChild](result); + } + return result; + } + remove(object) { + if (!dart.is(object, Node)) + return false; + let node = dart.as(object, Node); + if (!dart.equals(this[_this], node.parentNode)) + return false; + this[_this][_removeChild](node); + return true; + } + [_filter](test, removeMatching) { + let child = this[_this].firstChild; + while (child != null) { + let nextChild = child.nextNode; + if (test(child) == removeMatching) { + this[_this][_removeChild](child); + } + child = nextChild; + } + } + removeWhere(test) { + this[_filter](test, true); + } + retainWhere(test) { + this[_filter](test, false); + } + clear() { + this[_this][_clearChildren](); + } + set(index, value) { + this[_this][_replaceChild](value, this.get(index)); + return value; + } + get iterator() { + return this[_this].childNodes[dartx.iterator]; + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.throw(new core.UnsupportedError("Cannot sort Node list")); + } + shuffle(random) { + if (random === void 0) + random = null; + dart.throw(new core.UnsupportedError("Cannot shuffle Node list")); + } + setRange(start, end, iterable, skipCount) { + if (skipCount === void 0) + skipCount = 0; + dart.throw(new core.UnsupportedError("Cannot setRange on Node list")); + } + fillRange(start, end, fill) { + if (fill === void 0) + fill = null; + dart.throw(new core.UnsupportedError("Cannot fillRange on Node list")); + } + get length() { + return this[_this].childNodes[dartx.length]; + } + set length(value) { + dart.throw(new core.UnsupportedError("Cannot set length on immutable List.")); + } + get(index) { + return this[_this].childNodes[dartx.get](index); + } + get rawList() { + return this[_this].childNodes; + } + } + _ChildNodeListLazy[dart.implements] = () => [html_common.NodeListWrapper]; + dart.setSignature(_ChildNodeListLazy, { + constructors: () => ({_ChildNodeListLazy: [_ChildNodeListLazy, [Node]]}), + methods: () => ({ + add: [dart.void, [Node]], + addAll: [dart.void, [core.Iterable$(Node)]], + insert: [dart.void, [core.int, Node]], + insertAll: [dart.void, [core.int, core.Iterable$(Node)]], + setAll: [dart.void, [core.int, core.Iterable$(Node)]], + removeLast: [Node, []], + removeAt: [Node, [core.int]], + [_filter]: [dart.void, [dart.functionType(core.bool, [Node]), core.bool]], + removeWhere: [dart.void, [dart.functionType(core.bool, [Node])]], + retainWhere: [dart.void, [dart.functionType(core.bool, [Node])]], + set: [dart.void, [core.int, Node]], + sort: [dart.void, [], [core.Comparator$(Node)]], + setRange: [dart.void, [core.int, core.int, core.Iterable$(Node)], [core.int]], + fillRange: [dart.void, [core.int, core.int], [Node]], + get: [Node, [core.int]] + }) + }); + dart.defineExtensionMembers(_ChildNodeListLazy, [ + 'add', + 'addAll', + 'insert', + 'insertAll', + 'setAll', + 'removeLast', + 'removeAt', + 'remove', + 'removeWhere', + 'retainWhere', + 'clear', + 'set', + 'sort', + 'shuffle', + 'setRange', + 'fillRange', + 'get', + 'first', + 'last', + 'single', + 'iterator', + 'length', + 'length' + ]); + Node.ATTRIBUTE_NODE = 2; + Node.CDATA_SECTION_NODE = 4; + Node.COMMENT_NODE = 8; + Node.DOCUMENT_FRAGMENT_NODE = 11; + Node.DOCUMENT_NODE = 9; + Node.DOCUMENT_TYPE_NODE = 10; + Node.ELEMENT_NODE = 1; + Node.ENTITY_NODE = 6; + Node.ENTITY_REFERENCE_NODE = 5; + Node.NOTATION_NODE = 12; + Node.PROCESSING_INSTRUCTION_NODE = 7; + Node.TEXT_NODE = 3; + const _item = Symbol('_item'); + class NodeList extends dart.mixin(DartHtmlDomObject, collection.ListMixin$(Node), ImmutableListMixin$(Node)) { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateNodeList() { + return new NodeList.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + get(index) { + if (index >>> 0 !== index || index >= this.length) + dart.throw(core.RangeError.index(index, this)); + return dart.as(wrap_jso(this.raw[index]), Node); + } + set(index, value) { + dart.throw(new core.UnsupportedError("Cannot assign element of immutable List.")); + return value; + } + set length(value) { + dart.throw(new core.UnsupportedError("Cannot resize immutable List.")); + } + get first() { + if (dart.notNull(this.length) > 0) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get last() { + let len = this.length; + if (dart.notNull(len) > 0) { + return dart.as(wrap_jso(this.raw[dart.notNull(len) - 1]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get single() { + let len = this.length; + if (len == 1) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + if (len == 0) + dart.throw(new core.StateError("No elements")); + dart.throw(new core.StateError("More than one element")); + } + elementAt(index) { + return this.get(index); + } + [_item](index) { + return this[_item_1](index); + } + [_item_1](index) { + return dart.as(wrap_jso(this.raw.item(unwrap_jso(index))), Node); + } + } + NodeList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, core.List$(Node)]; + dart.defineNamedConstructor(NodeList, 'internal_'); + dart.setSignature(NodeList, { + constructors: () => ({ + _: [NodeList, []], + internal_: [NodeList, []] + }), + methods: () => ({ + get: [Node, [core.int]], + set: [dart.void, [core.int, Node]], + elementAt: [Node, [core.int]], + [_item]: [Node, [core.int]], + [_item_1]: [Node, [dart.dynamic]] + }), + statics: () => ({internalCreateNodeList: [NodeList, []]}), + names: ['internalCreateNodeList'] + }); + dart.defineExtensionMembers(NodeList, [ + 'get', + 'set', + 'elementAt', + 'length', + 'length', + 'first', + 'last', + 'single' + ]); + NodeList[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('NodeList')), dart.const(new _js_helper.Native("NodeList,RadioNodeList"))]; + class ParentNode extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + get [_childElementCount]() { + return dart.as(wrap_jso(this.raw.childElementCount), core.int); + } + get [_children]() { + return dart.as(wrap_jso(this.raw.children), core.List$(Node)); + } + get [_firstElementChild]() { + return dart.as(wrap_jso(this.raw.firstElementChild), Element); + } + get [_lastElementChild]() { + return dart.as(wrap_jso(this.raw.lastElementChild), Element); + } + querySelector(selectors) { + return dart.as(wrap_jso(this.raw.querySelector(unwrap_jso(selectors))), Element); + } + [_querySelectorAll](selectors) { + return dart.as(wrap_jso(this.raw.querySelectorAll(unwrap_jso(selectors))), core.List$(Node)); + } + } + dart.setSignature(ParentNode, { + constructors: () => ({_: [ParentNode, []]}), + methods: () => ({ + querySelector: [Element, [core.String]], + [_querySelectorAll]: [core.List$(Node), [core.String]] + }) + }); + ParentNode[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('ParentNode')), dart.const(new _metadata.Experimental())]; + const _cloneContents_1 = Symbol('_cloneContents_1'); + const _cloneRange_1 = Symbol('_cloneRange_1'); + const _collapse_1 = Symbol('_collapse_1'); + const _collapse_2 = Symbol('_collapse_2'); + const _compareBoundaryPoints_1 = Symbol('_compareBoundaryPoints_1'); + const _comparePoint_1 = Symbol('_comparePoint_1'); + const _createContextualFragment_1 = Symbol('_createContextualFragment_1'); + const _deleteContents_1 = Symbol('_deleteContents_1'); + const _detach_1 = Symbol('_detach_1'); + const _expand_1 = Symbol('_expand_1'); + const _extractContents_1 = Symbol('_extractContents_1'); + const _insertNode_1 = Symbol('_insertNode_1'); + const _isPointInRange_1 = Symbol('_isPointInRange_1'); + const _selectNode_1 = Symbol('_selectNode_1'); + const _selectNodeContents_1 = Symbol('_selectNodeContents_1'); + const _setEnd_1 = Symbol('_setEnd_1'); + const _setEndAfter_1 = Symbol('_setEndAfter_1'); + const _setEndBefore_1 = Symbol('_setEndBefore_1'); + const _setStart_1 = Symbol('_setStart_1'); + const _setStartAfter_1 = Symbol('_setStartAfter_1'); + const _setStartBefore_1 = Symbol('_setStartBefore_1'); + const _surroundContents_1 = Symbol('_surroundContents_1'); + class Range extends DartHtmlDomObject { + static new() { + return exports.document.createRange(); + } + static fromPoint(point) { + return exports.document[_caretRangeFromPoint](dart.as(point.x, core.int), dart.as(point.y, core.int)); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateRange() { + return new Range.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get collapsed() { + return dart.as(wrap_jso(this.raw.collapsed), core.bool); + } + get commonAncestorContainer() { + return dart.as(wrap_jso(this.raw.commonAncestorContainer), Node); + } + get endContainer() { + return dart.as(wrap_jso(this.raw.endContainer), Node); + } + get endOffset() { + return dart.as(wrap_jso(this.raw.endOffset), core.int); + } + get startContainer() { + return dart.as(wrap_jso(this.raw.startContainer), Node); + } + get startOffset() { + return dart.as(wrap_jso(this.raw.startOffset), core.int); + } + cloneContents() { + return this[_cloneContents_1](); + } + [_cloneContents_1]() { + return dart.as(wrap_jso(this.raw.cloneContents()), DocumentFragment); + } + cloneRange() { + return this[_cloneRange_1](); + } + [_cloneRange_1]() { + return dart.as(wrap_jso(this.raw.cloneRange()), Range); + } + collapse(toStart) { + if (toStart === void 0) + toStart = null; + if (toStart != null) { + this[_collapse_1](toStart); + return; + } + this[_collapse_2](); + return; + } + [_collapse_1](toStart) { + return wrap_jso(this.raw.collapse(unwrap_jso(toStart))); + } + [_collapse_2]() { + return wrap_jso(this.raw.collapse()); + } + compareBoundaryPoints(how, sourceRange) { + return this[_compareBoundaryPoints_1](how, sourceRange); + } + [_compareBoundaryPoints_1](how, sourceRange) { + return dart.as(wrap_jso(this.raw.compareBoundaryPoints(unwrap_jso(how), unwrap_jso(sourceRange))), core.int); + } + comparePoint(refNode, offset) { + return this[_comparePoint_1](refNode, offset); + } + [_comparePoint_1](refNode, offset) { + return dart.as(wrap_jso(this.raw.comparePoint(unwrap_jso(refNode), unwrap_jso(offset))), core.int); + } + createContextualFragment(html) { + return this[_createContextualFragment_1](html); + } + [_createContextualFragment_1](html) { + return dart.as(wrap_jso(this.raw.createContextualFragment(unwrap_jso(html))), DocumentFragment); + } + deleteContents() { + this[_deleteContents_1](); + return; + } + [_deleteContents_1]() { + return wrap_jso(this.raw.deleteContents()); + } + detach() { + this[_detach_1](); + return; + } + [_detach_1]() { + return wrap_jso(this.raw.detach()); + } + expand(unit) { + this[_expand_1](unit); + return; + } + [_expand_1](unit) { + return wrap_jso(this.raw.expand(unwrap_jso(unit))); + } + extractContents() { + return this[_extractContents_1](); + } + [_extractContents_1]() { + return dart.as(wrap_jso(this.raw.extractContents()), DocumentFragment); + } + getBoundingClientRect() { + return this[_getBoundingClientRect_1](); + } + [_getBoundingClientRect_1]() { + return dart.as(wrap_jso(this.raw.getBoundingClientRect()), math.Rectangle); + } + insertNode(newNode) { + this[_insertNode_1](newNode); + return; + } + [_insertNode_1](newNode) { + return wrap_jso(this.raw.insertNode(unwrap_jso(newNode))); + } + isPointInRange(refNode, offset) { + return this[_isPointInRange_1](refNode, offset); + } + [_isPointInRange_1](refNode, offset) { + return dart.as(wrap_jso(this.raw.isPointInRange(unwrap_jso(refNode), unwrap_jso(offset))), core.bool); + } + selectNode(refNode) { + this[_selectNode_1](refNode); + return; + } + [_selectNode_1](refNode) { + return wrap_jso(this.raw.selectNode(unwrap_jso(refNode))); + } + selectNodeContents(refNode) { + this[_selectNodeContents_1](refNode); + return; + } + [_selectNodeContents_1](refNode) { + return wrap_jso(this.raw.selectNodeContents(unwrap_jso(refNode))); + } + setEnd(refNode, offset) { + this[_setEnd_1](refNode, offset); + return; + } + [_setEnd_1](refNode, offset) { + return wrap_jso(this.raw.setEnd(unwrap_jso(refNode), unwrap_jso(offset))); + } + setEndAfter(refNode) { + this[_setEndAfter_1](refNode); + return; + } + [_setEndAfter_1](refNode) { + return wrap_jso(this.raw.setEndAfter(unwrap_jso(refNode))); + } + setEndBefore(refNode) { + this[_setEndBefore_1](refNode); + return; + } + [_setEndBefore_1](refNode) { + return wrap_jso(this.raw.setEndBefore(unwrap_jso(refNode))); + } + setStart(refNode, offset) { + this[_setStart_1](refNode, offset); + return; + } + [_setStart_1](refNode, offset) { + return wrap_jso(this.raw.setStart(unwrap_jso(refNode), unwrap_jso(offset))); + } + setStartAfter(refNode) { + this[_setStartAfter_1](refNode); + return; + } + [_setStartAfter_1](refNode) { + return wrap_jso(this.raw.setStartAfter(unwrap_jso(refNode))); + } + setStartBefore(refNode) { + this[_setStartBefore_1](refNode); + return; + } + [_setStartBefore_1](refNode) { + return wrap_jso(this.raw.setStartBefore(unwrap_jso(refNode))); + } + surroundContents(newParent) { + this[_surroundContents_1](newParent); + return; + } + [_surroundContents_1](newParent) { + return wrap_jso(this.raw.surroundContents(unwrap_jso(newParent))); + } + static get supportsCreateContextualFragment() { + return true; + } + } + dart.defineNamedConstructor(Range, 'internal_'); + dart.setSignature(Range, { + constructors: () => ({ + new: [Range, []], + fromPoint: [Range, [math.Point]], + _: [Range, []], + internal_: [Range, []] + }), + methods: () => ({ + cloneContents: [DocumentFragment, []], + [_cloneContents_1]: [DocumentFragment, []], + cloneRange: [Range, []], + [_cloneRange_1]: [Range, []], + collapse: [dart.void, [], [core.bool]], + [_collapse_1]: [dart.void, [dart.dynamic]], + [_collapse_2]: [dart.void, []], + compareBoundaryPoints: [core.int, [core.int, Range]], + [_compareBoundaryPoints_1]: [core.int, [dart.dynamic, Range]], + comparePoint: [core.int, [Node, core.int]], + [_comparePoint_1]: [core.int, [Node, dart.dynamic]], + createContextualFragment: [DocumentFragment, [core.String]], + [_createContextualFragment_1]: [DocumentFragment, [dart.dynamic]], + deleteContents: [dart.void, []], + [_deleteContents_1]: [dart.void, []], + detach: [dart.void, []], + [_detach_1]: [dart.void, []], + expand: [dart.void, [core.String]], + [_expand_1]: [dart.void, [dart.dynamic]], + extractContents: [DocumentFragment, []], + [_extractContents_1]: [DocumentFragment, []], + getBoundingClientRect: [math.Rectangle, []], + [_getBoundingClientRect_1]: [math.Rectangle, []], + insertNode: [dart.void, [Node]], + [_insertNode_1]: [dart.void, [Node]], + isPointInRange: [core.bool, [Node, core.int]], + [_isPointInRange_1]: [core.bool, [Node, dart.dynamic]], + selectNode: [dart.void, [Node]], + [_selectNode_1]: [dart.void, [Node]], + selectNodeContents: [dart.void, [Node]], + [_selectNodeContents_1]: [dart.void, [Node]], + setEnd: [dart.void, [Node, core.int]], + [_setEnd_1]: [dart.void, [Node, dart.dynamic]], + setEndAfter: [dart.void, [Node]], + [_setEndAfter_1]: [dart.void, [Node]], + setEndBefore: [dart.void, [Node]], + [_setEndBefore_1]: [dart.void, [Node]], + setStart: [dart.void, [Node, core.int]], + [_setStart_1]: [dart.void, [Node, dart.dynamic]], + setStartAfter: [dart.void, [Node]], + [_setStartAfter_1]: [dart.void, [Node]], + setStartBefore: [dart.void, [Node]], + [_setStartBefore_1]: [dart.void, [Node]], + surroundContents: [dart.void, [Node]], + [_surroundContents_1]: [dart.void, [Node]] + }), + statics: () => ({internalCreateRange: [Range, []]}), + names: ['internalCreateRange'] + }); + Range[dart.metadata] = () => [dart.const(new _metadata.DomName('Range')), dart.const(new _metadata.Unstable()), dart.const(new _js_helper.Native("Range"))]; + Range.END_TO_END = 2; + Range.END_TO_START = 3; + Range.NODE_AFTER = 1; + Range.NODE_BEFORE = 0; + Range.NODE_BEFORE_AND_AFTER = 2; + Range.NODE_INSIDE = 3; + Range.START_TO_END = 1; + Range.START_TO_START = 0; + const RequestAnimationFrameCallback = dart.typedef('RequestAnimationFrameCallback', () => dart.functionType(dart.void, [core.num])); + class ShadowRoot extends DocumentFragment { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateShadowRoot() { + return new ShadowRoot.internal_(); + } + internal_() { + super.internal_(); + } + get activeElement() { + return dart.as(wrap_jso(this.raw.activeElement), Element); + } + get host() { + return dart.as(wrap_jso(this.raw.host), Element); + } + get innerHtml() { + return dart.as(wrap_jso(this.raw.innerHTML), core.String); + } + set innerHtml(val) { + return this.raw.innerHTML = unwrap_jso(val); + } + get olderShadowRoot() { + return dart.as(wrap_jso(this.raw.olderShadowRoot), ShadowRoot); + } + clone(deep) { + return this[_clone_1](deep); + } + [_clone_1](deep) { + return dart.as(wrap_jso(this.raw.cloneNode(unwrap_jso(deep))), Node); + } + elementFromPoint(x, y) { + return this[_elementFromPoint_1](x, y); + } + [_elementFromPoint_1](x, y) { + return dart.as(wrap_jso(this.raw.elementFromPoint(unwrap_jso(x), unwrap_jso(y))), Element); + } + getElementsByClassName(className) { + return this[_getElementsByClassName_1](className); + } + [_getElementsByClassName_1](className) { + return dart.as(wrap_jso(this.raw.getElementsByClassName(unwrap_jso(className))), HtmlCollection); + } + getElementsByTagName(tagName) { + return this[_getElementsByTagName_1](tagName); + } + [_getElementsByTagName_1](tagName) { + return dart.as(wrap_jso(this.raw.getElementsByTagName(unwrap_jso(tagName))), HtmlCollection); + } + static _shadowRootDeprecationReport() { + if (!dart.notNull(ShadowRoot._shadowRootDeprecationReported)) { + exports.window.console.warn('ShadowRoot.resetStyleInheritance and ShadowRoot.applyAuthorStyles now deprecated in dart:html.\nPlease remove them from your code.\n'); + ShadowRoot._shadowRootDeprecationReported = true; + } + } + get resetStyleInheritance() { + ShadowRoot._shadowRootDeprecationReport(); + return false; + } + set resetStyleInheritance(value) { + ShadowRoot._shadowRootDeprecationReport(); + } + get applyAuthorStyles() { + ShadowRoot._shadowRootDeprecationReport(); + return false; + } + set applyAuthorStyles(value) { + ShadowRoot._shadowRootDeprecationReport(); + } + } + dart.defineNamedConstructor(ShadowRoot, 'internal_'); + dart.setSignature(ShadowRoot, { + constructors: () => ({ + _: [ShadowRoot, []], + internal_: [ShadowRoot, []] + }), + methods: () => ({ + elementFromPoint: [Element, [core.int, core.int]], + [_elementFromPoint_1]: [Element, [dart.dynamic, dart.dynamic]], + getElementsByClassName: [HtmlCollection, [core.String]], + [_getElementsByClassName_1]: [HtmlCollection, [dart.dynamic]], + getElementsByTagName: [HtmlCollection, [core.String]], + [_getElementsByTagName_1]: [HtmlCollection, [dart.dynamic]] + }), + statics: () => ({ + internalCreateShadowRoot: [ShadowRoot, []], + _shadowRootDeprecationReport: [dart.void, []] + }), + names: ['internalCreateShadowRoot', '_shadowRootDeprecationReport'] + }); + ShadowRoot[dart.metadata] = () => [dart.const(new _metadata.DomName('ShadowRoot')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME, '26')), dart.const(new _metadata.Experimental()), dart.const(new _js_helper.Native("ShadowRoot"))]; + ShadowRoot.supported = true; + ShadowRoot._shadowRootDeprecationReported = false; + class StyleElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("style"), StyleElement); + } + static internalCreateStyleElement() { + return new StyleElement.internal_(); + } + internal_() { + super.internal_(); + } + get disabled() { + return dart.as(wrap_jso(this.raw.disabled), core.bool); + } + set disabled(val) { + return this.raw.disabled = unwrap_jso(val); + } + get media() { + return dart.as(wrap_jso(this.raw.media), core.String); + } + set media(val) { + return this.raw.media = unwrap_jso(val); + } + get type() { + return dart.as(wrap_jso(this.raw.type), core.String); + } + set type(val) { + return this.raw.type = unwrap_jso(val); + } + } + dart.defineNamedConstructor(StyleElement, 'internal_'); + dart.setSignature(StyleElement, { + constructors: () => ({ + _: [StyleElement, []], + new: [StyleElement, []], + internal_: [StyleElement, []] + }), + statics: () => ({internalCreateStyleElement: [StyleElement, []]}), + names: ['internalCreateStyleElement'] + }); + StyleElement[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('HTMLStyleElement')), dart.const(new _js_helper.Native("HTMLStyleElement"))]; + class TemplateElement extends HtmlElement { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static new() { + return dart.as(exports.document.createElement("template"), TemplateElement); + } + static internalCreateTemplateElement() { + return new TemplateElement.internal_(); + } + internal_() { + super.internal_(); + } + static get supported() { + return Element.isTagSupported('template'); + } + get content() { + return dart.as(wrap_jso(this.raw.content), DocumentFragment); + } + setInnerHtml(html, opts) { + let validator = opts && 'validator' in opts ? opts.validator : null; + let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null; + this.text = null; + let fragment = this.createFragment(html, {validator: validator, treeSanitizer: treeSanitizer}); + this.content.append(fragment); + } + } + dart.defineNamedConstructor(TemplateElement, 'internal_'); + dart.setSignature(TemplateElement, { + constructors: () => ({ + _: [TemplateElement, []], + new: [TemplateElement, []], + internal_: [TemplateElement, []] + }), + statics: () => ({internalCreateTemplateElement: [TemplateElement, []]}), + names: ['internalCreateTemplateElement'] + }); + TemplateElement[dart.metadata] = () => [dart.const(new _metadata.Experimental()), dart.const(new _metadata.DomName('HTMLTemplateElement')), dart.const(new _metadata.SupportedBrowser(_metadata.SupportedBrowser.CHROME)), dart.const(new _metadata.Experimental()), dart.const(new _js_helper.Native("HTMLTemplateElement"))]; + const _splitText_1 = Symbol('_splitText_1'); + class Text extends CharacterData { + static new(data) { + return exports.document[_createTextNode](data); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateText() { + return new Text.internal_(); + } + internal_() { + super.internal_(); + } + get wholeText() { + return dart.as(wrap_jso(this.raw.wholeText), core.String); + } + getDestinationInsertionPoints() { + return this[_getDestinationInsertionPoints_1](); + } + [_getDestinationInsertionPoints_1]() { + return dart.as(wrap_jso(this.raw.getDestinationInsertionPoints()), NodeList); + } + splitText(offset) { + return this[_splitText_1](offset); + } + [_splitText_1](offset) { + return dart.as(wrap_jso(this.raw.splitText(unwrap_jso(offset))), Text); + } + } + dart.defineNamedConstructor(Text, 'internal_'); + dart.setSignature(Text, { + constructors: () => ({ + new: [Text, [core.String]], + _: [Text, []], + internal_: [Text, []] + }), + methods: () => ({ + getDestinationInsertionPoints: [NodeList, []], + [_getDestinationInsertionPoints_1]: [NodeList, []], + splitText: [Text, [core.int]], + [_splitText_1]: [Text, [dart.dynamic]] + }), + statics: () => ({internalCreateText: [Text, []]}), + names: ['internalCreateText'] + }); + Text[dart.metadata] = () => [dart.const(new _metadata.DomName('Text')), dart.const(new _js_helper.Native("Text"))]; + class UrlUtils extends DartHtmlDomObject { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + get hash() { + return dart.as(wrap_jso(this.raw.hash), core.String); + } + set hash(val) { + return this.raw.hash = unwrap_jso(val); + } + get host() { + return dart.as(wrap_jso(this.raw.host), core.String); + } + set host(val) { + return this.raw.host = unwrap_jso(val); + } + get hostname() { + return dart.as(wrap_jso(this.raw.hostname), core.String); + } + set hostname(val) { + return this.raw.hostname = unwrap_jso(val); + } + get href() { + return dart.as(wrap_jso(this.raw.href), core.String); + } + set href(val) { + return this.raw.href = unwrap_jso(val); + } + get origin() { + return dart.as(wrap_jso(this.raw.origin), core.String); + } + get password() { + return dart.as(wrap_jso(this.raw.password), core.String); + } + set password(val) { + return this.raw.password = unwrap_jso(val); + } + get pathname() { + return dart.as(wrap_jso(this.raw.pathname), core.String); + } + set pathname(val) { + return this.raw.pathname = unwrap_jso(val); + } + get port() { + return dart.as(wrap_jso(this.raw.port), core.String); + } + set port(val) { + return this.raw.port = unwrap_jso(val); + } + get protocol() { + return dart.as(wrap_jso(this.raw.protocol), core.String); + } + set protocol(val) { + return this.raw.protocol = unwrap_jso(val); + } + get search() { + return dart.as(wrap_jso(this.raw.search), core.String); + } + set search(val) { + return this.raw.search = unwrap_jso(val); + } + get username() { + return dart.as(wrap_jso(this.raw.username), core.String); + } + set username(val) { + return this.raw.username = unwrap_jso(val); + } + toString() { + return dart.as(wrap_jso(this.raw.toString()), core.String); + } + } + dart.setSignature(UrlUtils, { + constructors: () => ({_: [UrlUtils, []]}) + }); + UrlUtils[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('URLUtils')), dart.const(new _metadata.Experimental())]; + const _open2 = Symbol('_open2'); + const _open3 = Symbol('_open3'); + const _location = Symbol('_location'); + const _ensureRequestAnimationFrame = Symbol('_ensureRequestAnimationFrame'); + const _requestAnimationFrame = Symbol('_requestAnimationFrame'); + const _cancelAnimationFrame = Symbol('_cancelAnimationFrame'); + const _get_opener = Symbol('_get_opener'); + const _pageXOffset = Symbol('_pageXOffset'); + const _pageYOffset = Symbol('_pageYOffset'); + const _get_parent = Symbol('_get_parent'); + const _get_self = Symbol('_get_self'); + const _get_top = Symbol('_get_top'); + const __getter___2 = Symbol('__getter___2'); + const _alert_1 = Symbol('_alert_1'); + const _alert_2 = Symbol('_alert_2'); + const _close_1 = Symbol('_close_1'); + const _confirm_1 = Symbol('_confirm_1'); + const _confirm_2 = Symbol('_confirm_2'); + const _find_1 = Symbol('_find_1'); + const _getComputedStyle_1 = Symbol('_getComputedStyle_1'); + const _moveBy_1 = Symbol('_moveBy_1'); + const _moveTo_1 = Symbol('_moveTo_1'); + const _moveTo = Symbol('_moveTo'); + const _print_1 = Symbol('_print_1'); + const _resizeBy_1 = Symbol('_resizeBy_1'); + const _resizeTo_1 = Symbol('_resizeTo_1'); + const _scroll_1 = Symbol('_scroll_1'); + const _scroll_2 = Symbol('_scroll_2'); + const _scroll_3 = Symbol('_scroll_3'); + const _scroll_4 = Symbol('_scroll_4'); + const _scrollBy_1 = Symbol('_scrollBy_1'); + const _scrollBy_2 = Symbol('_scrollBy_2'); + const _scrollBy_3 = Symbol('_scrollBy_3'); + const _scrollBy_4 = Symbol('_scrollBy_4'); + const _scrollTo_1 = Symbol('_scrollTo_1'); + const _scrollTo_2 = Symbol('_scrollTo_2'); + const _scrollTo_3 = Symbol('_scrollTo_3'); + const _scrollTo_4 = Symbol('_scrollTo_4'); + const _showModalDialog_1 = Symbol('_showModalDialog_1'); + const _showModalDialog_2 = Symbol('_showModalDialog_2'); + const _showModalDialog_3 = Symbol('_showModalDialog_3'); + const _stop_1 = Symbol('_stop_1'); + class Window extends EventTarget { + get animationFrame() { + let completer = async.Completer$(core.num).sync(); + this.requestAnimationFrame(dart.fn(time => { + completer.complete(time); + })); + return completer.future; + } + get document() { + return dart.as(wrap_jso(this.raw.document), Document); + } + [_open2](url, name) { + return dart.as(wrap_jso(this.raw.open(url, name)), WindowBase); + } + [_open3](url, name, options) { + return dart.as(wrap_jso(this.raw.open(url, name, options)), WindowBase); + } + open(url, name, options) { + if (options === void 0) + options = null; + if (options == null) { + return _DOMWindowCrossFrame._createSafe(this[_open2](url, name)); + } else { + return _DOMWindowCrossFrame._createSafe(this[_open3](url, name, options)); + } + } + get location() { + return dart.as(this[_location], Location); + } + set location(value) { + this[_location] = value; + } + get [_location]() { + return wrap_jso(this.raw.location); + } + set [_location](value) { + this.raw.location = unwrap_jso(value); + } + requestAnimationFrame(callback) { + this[_ensureRequestAnimationFrame](); + return this[_requestAnimationFrame](dart.as(_wrapZone(callback), RequestAnimationFrameCallback)); + } + cancelAnimationFrame(id) { + this[_ensureRequestAnimationFrame](); + this[_cancelAnimationFrame](id); + } + [_requestAnimationFrame](callback) { + return this.raw.requestAnimationFrame; + } + [_cancelAnimationFrame](id) { + this.raw.cancelAnimationFrame(id); + } + [_ensureRequestAnimationFrame]() { + if (!!(this.raw.requestAnimationFrame && this.raw.cancelAnimationFrame)) + return; + (function($this) { + var vendors = ['ms', 'moz', 'webkit', 'o']; + for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) { + $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame']; + $this.cancelAnimationFrame = $this[vendors[i] + 'CancelAnimationFrame'] || $this[vendors[i] + 'CancelRequestAnimationFrame']; + } + if ($this.requestAnimationFrame && $this.cancelAnimationFrame) + return; + $this.requestAnimationFrame = function(callback) { + return window.setTimeout(function() { + callback(Date.now()); + }, 16); + }; + $this.cancelAnimationFrame = function(id) { + clearTimeout(id); + }; + })(this.raw); + } + get console() { + return Console._safeConsole; + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreateWindow() { + return new Window.internal_(); + } + internal_() { + super.internal_(); + } + get closed() { + return dart.as(wrap_jso(this.raw.closed), core.bool); + } + get defaultStatus() { + return dart.as(wrap_jso(this.raw.defaultStatus), core.String); + } + set defaultStatus(val) { + return this.raw.defaultStatus = unwrap_jso(val); + } + get defaultstatus() { + return dart.as(wrap_jso(this.raw.defaultstatus), core.String); + } + set defaultstatus(val) { + return this.raw.defaultstatus = unwrap_jso(val); + } + get devicePixelRatio() { + return dart.as(wrap_jso(this.raw.devicePixelRatio), core.double); + } + get history() { + return dart.as(wrap_jso(this.raw.history), History); + } + get innerHeight() { + return dart.as(wrap_jso(this.raw.innerHeight), core.int); + } + get innerWidth() { + return dart.as(wrap_jso(this.raw.innerWidth), core.int); + } + get name() { + return dart.as(wrap_jso(this.raw.name), core.String); + } + set name(val) { + return this.raw.name = unwrap_jso(val); + } + get navigator() { + return dart.as(wrap_jso(this.raw.navigator), Navigator); + } + get offscreenBuffering() { + return dart.as(wrap_jso(this.raw.offscreenBuffering), core.bool); + } + get opener() { + return _convertNativeToDart_Window(this[_get_opener]); + } + get [_get_opener]() { + return wrap_jso(this.raw.opener); + } + set opener(value) { + this.raw.opener = unwrap_jso(value); + } + get orientation() { + return dart.as(wrap_jso(this.raw.orientation), core.int); + } + get outerHeight() { + return dart.as(wrap_jso(this.raw.outerHeight), core.int); + } + get outerWidth() { + return dart.as(wrap_jso(this.raw.outerWidth), core.int); + } + get [_pageXOffset]() { + return dart.as(wrap_jso(this.raw.pageXOffset), core.double); + } + get [_pageYOffset]() { + return dart.as(wrap_jso(this.raw.pageYOffset), core.double); + } + get parent() { + return _convertNativeToDart_Window(this[_get_parent]); + } + get [_get_parent]() { + return wrap_jso(this.raw.parent); + } + get screenLeft() { + return dart.as(wrap_jso(this.raw.screenLeft), core.int); + } + get screenTop() { + return dart.as(wrap_jso(this.raw.screenTop), core.int); + } + get screenX() { + return dart.as(wrap_jso(this.raw.screenX), core.int); + } + get screenY() { + return dart.as(wrap_jso(this.raw.screenY), core.int); + } + get self() { + return _convertNativeToDart_Window(this[_get_self]); + } + get [_get_self]() { + return wrap_jso(this.raw.self); + } + get status() { + return dart.as(wrap_jso(this.raw.status), core.String); + } + set status(val) { + return this.raw.status = unwrap_jso(val); + } + get top() { + return _convertNativeToDart_Window(this[_get_top]); + } + get [_get_top]() { + return wrap_jso(this.raw.top); + } + get window() { + return _convertNativeToDart_Window(this[_get_window]); + } + get [_get_window]() { + return wrap_jso(this.raw.window); + } + [__getter__](index_OR_name) { + if (typeof index_OR_name == 'number') { + return _convertNativeToDart_Window(this[__getter___1](dart.as(index_OR_name, core.int))); + } + if (typeof index_OR_name == 'string') { + return _convertNativeToDart_Window(this[__getter___2](dart.as(index_OR_name, core.String))); + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [__getter___1](index) { + return wrap_jso(this.raw.__getter__(unwrap_jso(index))); + } + [__getter___2](name) { + return wrap_jso(this.raw.__getter__(unwrap_jso(name))); + } + alert(message) { + if (message === void 0) + message = null; + if (message != null) { + this[_alert_1](message); + return; + } + this[_alert_2](); + return; + } + [_alert_1](message) { + return wrap_jso(this.raw.alert(unwrap_jso(message))); + } + [_alert_2]() { + return wrap_jso(this.raw.alert()); + } + close() { + this[_close_1](); + return; + } + [_close_1]() { + return wrap_jso(this.raw.close()); + } + confirm(message) { + if (message === void 0) + message = null; + if (message != null) { + return this[_confirm_1](message); + } + return this[_confirm_2](); + } + [_confirm_1](message) { + return dart.as(wrap_jso(this.raw.confirm(unwrap_jso(message))), core.bool); + } + [_confirm_2]() { + return dart.as(wrap_jso(this.raw.confirm()), core.bool); + } + find(string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, showDialog) { + return this[_find_1](string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, showDialog); + } + [_find_1](string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, showDialog) { + return dart.as(wrap_jso(this.raw.find(unwrap_jso(string), unwrap_jso(caseSensitive), unwrap_jso(backwards), unwrap_jso(wrap), unwrap_jso(wholeWord), unwrap_jso(searchInFrames), unwrap_jso(showDialog))), core.bool); + } + [_getComputedStyle](element, pseudoElement) { + return this[_getComputedStyle_1](element, pseudoElement); + } + [_getComputedStyle_1](element, pseudoElement) { + return dart.as(wrap_jso(this.raw.getComputedStyle(unwrap_jso(element), unwrap_jso(pseudoElement))), CssStyleDeclaration); + } + moveBy(x, y) { + this[_moveBy_1](x, y); + return; + } + [_moveBy_1](x, y) { + return wrap_jso(this.raw.moveBy(unwrap_jso(x), unwrap_jso(y))); + } + [_moveTo](x, y) { + this[_moveTo_1](x, y); + return; + } + [_moveTo_1](x, y) { + return wrap_jso(this.raw.moveTo(unwrap_jso(x), unwrap_jso(y))); + } + print() { + this[_print_1](); + return; + } + [_print_1]() { + return wrap_jso(this.raw.print()); + } + resizeBy(x, y) { + this[_resizeBy_1](x, y); + return; + } + [_resizeBy_1](x, y) { + return wrap_jso(this.raw.resizeBy(unwrap_jso(x), unwrap_jso(y))); + } + resizeTo(width, height) { + this[_resizeTo_1](width, height); + return; + } + [_resizeTo_1](width, height) { + return wrap_jso(this.raw.resizeTo(unwrap_jso(width), unwrap_jso(height))); + } + scroll(x, y, scrollOptions) { + if (scrollOptions === void 0) + scrollOptions = null; + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scroll_1](dart.as(x, core.num), dart.as(y, core.num)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scroll_2](dart.as(x, core.num), dart.as(y, core.num), scrollOptions_1); + return; + } + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scroll_3](dart.as(x, core.int), dart.as(y, core.int)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scroll_4](dart.as(x, core.int), dart.as(y, core.int), scrollOptions_1); + return; + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_scroll_1](x, y) { + return wrap_jso(this.raw.scroll(unwrap_jso(x), unwrap_jso(y))); + } + [_scroll_2](x, y, scrollOptions) { + return wrap_jso(this.raw.scroll(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + [_scroll_3](x, y) { + return wrap_jso(this.raw.scroll(unwrap_jso(x), unwrap_jso(y))); + } + [_scroll_4](x, y, scrollOptions) { + return wrap_jso(this.raw.scroll(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + scrollBy(x, y, scrollOptions) { + if (scrollOptions === void 0) + scrollOptions = null; + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scrollBy_1](dart.as(x, core.num), dart.as(y, core.num)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scrollBy_2](dart.as(x, core.num), dart.as(y, core.num), scrollOptions_1); + return; + } + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scrollBy_3](dart.as(x, core.int), dart.as(y, core.int)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scrollBy_4](dart.as(x, core.int), dart.as(y, core.int), scrollOptions_1); + return; + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_scrollBy_1](x, y) { + return wrap_jso(this.raw.scrollBy(unwrap_jso(x), unwrap_jso(y))); + } + [_scrollBy_2](x, y, scrollOptions) { + return wrap_jso(this.raw.scrollBy(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + [_scrollBy_3](x, y) { + return wrap_jso(this.raw.scrollBy(unwrap_jso(x), unwrap_jso(y))); + } + [_scrollBy_4](x, y, scrollOptions) { + return wrap_jso(this.raw.scrollBy(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + scrollTo(x, y, scrollOptions) { + if (scrollOptions === void 0) + scrollOptions = null; + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scrollTo_1](dart.as(x, core.num), dart.as(y, core.num)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scrollTo_2](dart.as(x, core.num), dart.as(y, core.num), scrollOptions_1); + return; + } + if (typeof y == 'number' && typeof x == 'number' && scrollOptions == null) { + this[_scrollTo_3](dart.as(x, core.int), dart.as(y, core.int)); + return; + } + if (scrollOptions != null && typeof y == 'number' && typeof x == 'number') { + let scrollOptions_1 = html_common.convertDartToNative_Dictionary(scrollOptions); + this[_scrollTo_4](dart.as(x, core.int), dart.as(y, core.int), scrollOptions_1); + return; + } + dart.throw(new core.ArgumentError("Incorrect number or type of arguments")); + } + [_scrollTo_1](x, y) { + return wrap_jso(this.raw.scrollTo(unwrap_jso(x), unwrap_jso(y))); + } + [_scrollTo_2](x, y, scrollOptions) { + return wrap_jso(this.raw.scrollTo(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + [_scrollTo_3](x, y) { + return wrap_jso(this.raw.scrollTo(unwrap_jso(x), unwrap_jso(y))); + } + [_scrollTo_4](x, y, scrollOptions) { + return wrap_jso(this.raw.scrollTo(unwrap_jso(x), unwrap_jso(y), unwrap_jso(scrollOptions))); + } + showModalDialog(url, dialogArgs, featureArgs) { + if (dialogArgs === void 0) + dialogArgs = null; + if (featureArgs === void 0) + featureArgs = null; + if (featureArgs != null) { + return this[_showModalDialog_1](url, dialogArgs, featureArgs); + } + if (dialogArgs != null) { + return this[_showModalDialog_2](url, dialogArgs); + } + return this[_showModalDialog_3](url); + } + [_showModalDialog_1](url, dialogArgs, featureArgs) { + return wrap_jso(this.raw.showModalDialog(unwrap_jso(url), unwrap_jso(dialogArgs), unwrap_jso(featureArgs))); + } + [_showModalDialog_2](url, dialogArgs) { + return wrap_jso(this.raw.showModalDialog(unwrap_jso(url), unwrap_jso(dialogArgs))); + } + [_showModalDialog_3](url) { + return wrap_jso(this.raw.showModalDialog(unwrap_jso(url))); + } + stop() { + this[_stop_1](); + return; + } + [_stop_1]() { + return wrap_jso(this.raw.stop()); + } + get onContentLoaded() { + return Window.contentLoadedEvent.forTarget(this); + } + get onSearch() { + return Element.searchEvent.forTarget(this); + } + moveTo(p) { + this[_moveTo](dart.as(p.x, core.num), dart.as(p.y, core.num)); + } + get pageXOffset() { + return this.raw.pageXOffset[dartx.round](); + } + get pageYOffset() { + return this.raw.pageYOffset[dartx.round](); + } + get scrollX() { + return "scrollX" in this.raw ? this.raw.scrollX[dartx.round]() : this.document.documentElement.scrollLeft; + } + get scrollY() { + return "scrollY" in this.raw ? this.raw.scrollY[dartx.round]() : this.document.documentElement.scrollTop; + } + postMessage(message, targetOrigin, messagePorts) { + if (messagePorts === void 0) + messagePorts = null; + if (messagePorts != null) { + dart.throw('postMessage unsupported'); + } + this.raw.postMessage(message, targetOrigin); + } + } + Window[dart.implements] = () => [WindowBase]; + dart.defineNamedConstructor(Window, 'internal_'); + dart.setSignature(Window, { + constructors: () => ({ + _: [Window, []], + internal_: [Window, []] + }), + methods: () => ({ + [_open2]: [WindowBase, [dart.dynamic, dart.dynamic]], + [_open3]: [WindowBase, [dart.dynamic, dart.dynamic, dart.dynamic]], + open: [WindowBase, [core.String, core.String], [core.String]], + requestAnimationFrame: [core.int, [RequestAnimationFrameCallback]], + cancelAnimationFrame: [dart.void, [core.int]], + [_requestAnimationFrame]: [core.int, [RequestAnimationFrameCallback]], + [_cancelAnimationFrame]: [dart.void, [core.int]], + [_ensureRequestAnimationFrame]: [dart.dynamic, []], + [__getter__]: [WindowBase, [dart.dynamic]], + [__getter___1]: [dart.dynamic, [core.int]], + [__getter___2]: [dart.dynamic, [core.String]], + alert: [dart.void, [], [core.String]], + [_alert_1]: [dart.void, [dart.dynamic]], + [_alert_2]: [dart.void, []], + close: [dart.void, []], + [_close_1]: [dart.void, []], + confirm: [core.bool, [], [core.String]], + [_confirm_1]: [core.bool, [dart.dynamic]], + [_confirm_2]: [core.bool, []], + find: [core.bool, [core.String, core.bool, core.bool, core.bool, core.bool, core.bool, core.bool]], + [_find_1]: [core.bool, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]], + [_getComputedStyle]: [CssStyleDeclaration, [Element, core.String]], + [_getComputedStyle_1]: [CssStyleDeclaration, [Element, dart.dynamic]], + moveBy: [dart.void, [core.num, core.num]], + [_moveBy_1]: [dart.void, [dart.dynamic, dart.dynamic]], + [_moveTo]: [dart.void, [core.num, core.num]], + [_moveTo_1]: [dart.void, [dart.dynamic, dart.dynamic]], + print: [dart.void, []], + [_print_1]: [dart.void, []], + resizeBy: [dart.void, [core.num, core.num]], + [_resizeBy_1]: [dart.void, [dart.dynamic, dart.dynamic]], + resizeTo: [dart.void, [core.num, core.num]], + [_resizeTo_1]: [dart.void, [dart.dynamic, dart.dynamic]], + scroll: [dart.void, [dart.dynamic, dart.dynamic], [core.Map]], + [_scroll_1]: [dart.void, [core.num, core.num]], + [_scroll_2]: [dart.void, [core.num, core.num, dart.dynamic]], + [_scroll_3]: [dart.void, [core.int, core.int]], + [_scroll_4]: [dart.void, [core.int, core.int, dart.dynamic]], + scrollBy: [dart.void, [dart.dynamic, dart.dynamic], [core.Map]], + [_scrollBy_1]: [dart.void, [core.num, core.num]], + [_scrollBy_2]: [dart.void, [core.num, core.num, dart.dynamic]], + [_scrollBy_3]: [dart.void, [core.int, core.int]], + [_scrollBy_4]: [dart.void, [core.int, core.int, dart.dynamic]], + scrollTo: [dart.void, [dart.dynamic, dart.dynamic], [core.Map]], + [_scrollTo_1]: [dart.void, [core.num, core.num]], + [_scrollTo_2]: [dart.void, [core.num, core.num, dart.dynamic]], + [_scrollTo_3]: [dart.void, [core.int, core.int]], + [_scrollTo_4]: [dart.void, [core.int, core.int, dart.dynamic]], + showModalDialog: [core.Object, [core.String], [core.Object, core.String]], + [_showModalDialog_1]: [core.Object, [dart.dynamic, dart.dynamic, dart.dynamic]], + [_showModalDialog_2]: [core.Object, [dart.dynamic, dart.dynamic]], + [_showModalDialog_3]: [core.Object, [dart.dynamic]], + stop: [dart.void, []], + [_stop_1]: [dart.void, []], + moveTo: [dart.void, [math.Point]], + postMessage: [dart.void, [dart.dynamic, core.String], [core.List]] + }), + statics: () => ({internalCreateWindow: [Window, []]}), + names: ['internalCreateWindow'] + }); + Window[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('Window')), dart.const(new _js_helper.Native("Window"))]; + Window.contentLoadedEvent = dart.const(new (EventStreamProvider$(Event))('DOMContentLoaded')); + Window.PERSISTENT = 1; + Window.TEMPORARY = 0; + class _Attr extends Node { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreate_Attr() { + return new _Attr.internal_(); + } + internal_() { + super.internal_(); + } + get name() { + return dart.as(wrap_jso(this.raw.name), core.String); + } + get text() { + return dart.as(wrap_jso(this.raw.textContent), core.String); + } + set text(value) { + this.raw.textContent = unwrap_jso(value); + } + get value() { + return dart.as(wrap_jso(this.raw.value), core.String); + } + set value(val) { + return this.raw.value = unwrap_jso(val); + } + } + dart.defineNamedConstructor(_Attr, 'internal_'); + dart.setSignature(_Attr, { + constructors: () => ({ + _: [_Attr, []], + internal_: [_Attr, []] + }), + statics: () => ({internalCreate_Attr: [_Attr, []]}), + names: ['internalCreate_Attr'] + }); + _Attr[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('Attr')), dart.const(new _js_helper.Native("Attr"))]; + class _ClientRect extends DartHtmlDomObject { + toString() { + return `Rectangle (${this.left}, ${this.top}) ${this.width} x ${this.height}`; + } + ['=='](other) { + if (!dart.is(other, math.Rectangle)) + return false; + return dart.equals(this.left, dart.dload(other, 'left')) && dart.equals(this.top, dart.dload(other, 'top')) && dart.equals(this.width, dart.dload(other, 'width')) && dart.equals(this.height, dart.dload(other, 'height')); + } + get hashCode() { + return _JenkinsSmiHash.hash4(dart.hashCode(this.left), dart.hashCode(this.top), dart.hashCode(this.width), dart.hashCode(this.height)); + } + intersection(other) { + let x0 = math.max(this.left, dart.as(other.left, core.num)); + let x1 = math.min(dart.notNull(this.left) + dart.notNull(this.width), dart.as(dart.dsend(other.left, '+', other.width), core.num)); + if (dart.notNull(x0) <= dart.notNull(x1)) { + let y0 = math.max(this.top, dart.as(other.top, core.num)); + let y1 = math.min(dart.notNull(this.top) + dart.notNull(this.height), dart.as(dart.dsend(other.top, '+', other.height), core.num)); + if (dart.notNull(y0) <= dart.notNull(y1)) { + return new math.Rectangle(x0, y0, dart.notNull(x1) - dart.notNull(x0), dart.notNull(y1) - dart.notNull(y0)); + } + } + return null; + } + intersects(other) { + return dart.notNull(this.left) <= dart.notNull(other.left) + dart.notNull(other.width) && dart.notNull(other.left) <= dart.notNull(this.left) + dart.notNull(this.width) && dart.notNull(this.top) <= dart.notNull(other.top) + dart.notNull(other.height) && dart.notNull(other.top) <= dart.notNull(this.top) + dart.notNull(this.height); + } + boundingBox(other) { + let right = math.max(dart.notNull(this.left) + dart.notNull(this.width), dart.as(dart.dsend(other.left, '+', other.width), core.num)); + let bottom = math.max(dart.notNull(this.top) + dart.notNull(this.height), dart.as(dart.dsend(other.top, '+', other.height), core.num)); + let left = math.min(this.left, dart.as(other.left, core.num)); + let top = math.min(this.top, dart.as(other.top, core.num)); + return new math.Rectangle(left, top, dart.notNull(right) - dart.notNull(left), dart.notNull(bottom) - dart.notNull(top)); + } + containsRectangle(another) { + return dart.notNull(this.left) <= dart.notNull(another.left) && dart.notNull(this.left) + dart.notNull(this.width) >= dart.notNull(another.left) + dart.notNull(another.width) && dart.notNull(this.top) <= dart.notNull(another.top) && dart.notNull(this.top) + dart.notNull(this.height) >= dart.notNull(another.top) + dart.notNull(another.height); + } + containsPoint(another) { + return dart.notNull(another.x) >= dart.notNull(this.left) && dart.notNull(another.x) <= dart.notNull(this.left) + dart.notNull(this.width) && dart.notNull(another.y) >= dart.notNull(this.top) && dart.notNull(another.y) <= dart.notNull(this.top) + dart.notNull(this.height); + } + get topLeft() { + return new math.Point(this.left, this.top); + } + get topRight() { + return new math.Point(dart.notNull(this.left) + dart.notNull(this.width), this.top); + } + get bottomRight() { + return new math.Point(dart.notNull(this.left) + dart.notNull(this.width), dart.notNull(this.top) + dart.notNull(this.height)); + } + get bottomLeft() { + return new math.Point(this.left, dart.notNull(this.top) + dart.notNull(this.height)); + } + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreate_ClientRect() { + return new _ClientRect.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + get bottom() { + return dart.as(wrap_jso(this.raw.bottom), core.double); + } + get height() { + return dart.as(wrap_jso(this.raw.height), core.double); + } + get left() { + return dart.as(wrap_jso(this.raw.left), core.double); + } + get right() { + return dart.as(wrap_jso(this.raw.right), core.double); + } + get top() { + return dart.as(wrap_jso(this.raw.top), core.double); + } + get width() { + return dart.as(wrap_jso(this.raw.width), core.double); + } + } + _ClientRect[dart.implements] = () => [math.Rectangle]; + dart.defineNamedConstructor(_ClientRect, 'internal_'); + dart.setSignature(_ClientRect, { + constructors: () => ({ + _: [_ClientRect, []], + internal_: [_ClientRect, []] + }), + methods: () => ({ + intersection: [math.Rectangle, [math.Rectangle]], + intersects: [core.bool, [math.Rectangle$(core.num)]], + boundingBox: [math.Rectangle, [math.Rectangle]], + containsRectangle: [core.bool, [math.Rectangle$(core.num)]], + containsPoint: [core.bool, [math.Point$(core.num)]] + }), + statics: () => ({internalCreate_ClientRect: [_ClientRect, []]}), + names: ['internalCreate_ClientRect'] + }); + _ClientRect[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('ClientRect')), dart.const(new _js_helper.Native("ClientRect"))]; + class _JenkinsSmiHash extends core.Object { + static combine(hash, value) { + hash = 536870911 & dart.notNull(hash) + dart.notNull(value); + hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) << 10); + return dart.notNull(hash) ^ dart.notNull(hash) >> 6; + } + static finish(hash) { + hash = 536870911 & dart.notNull(hash) + ((67108863 & dart.notNull(hash)) << 3); + hash = dart.notNull(hash) ^ dart.notNull(hash) >> 11; + return 536870911 & dart.notNull(hash) + ((16383 & dart.notNull(hash)) << 15); + } + static hash2(a, b) { + return _JenkinsSmiHash.finish(_JenkinsSmiHash.combine(_JenkinsSmiHash.combine(0, dart.as(a, core.int)), dart.as(b, core.int))); + } + static hash4(a, b, c, d) { + return _JenkinsSmiHash.finish(_JenkinsSmiHash.combine(_JenkinsSmiHash.combine(_JenkinsSmiHash.combine(_JenkinsSmiHash.combine(0, dart.as(a, core.int)), dart.as(b, core.int)), dart.as(c, core.int)), dart.as(d, core.int))); + } + } + dart.setSignature(_JenkinsSmiHash, { + statics: () => ({ + combine: [core.int, [core.int, core.int]], + finish: [core.int, [core.int]], + hash2: [core.int, [dart.dynamic, dart.dynamic]], + hash4: [core.int, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]] + }), + names: ['combine', 'finish', 'hash2', 'hash4'] + }); + const _getNamedItem_1 = Symbol('_getNamedItem_1'); + const _getNamedItemNS_1 = Symbol('_getNamedItemNS_1'); + const _removeNamedItem_1 = Symbol('_removeNamedItem_1'); + const _removeNamedItemNS_1 = Symbol('_removeNamedItemNS_1'); + const _setNamedItem_1 = Symbol('_setNamedItem_1'); + const _setNamedItemNS_1 = Symbol('_setNamedItemNS_1'); + class _NamedNodeMap extends dart.mixin(DartHtmlDomObject, collection.ListMixin$(Node), ImmutableListMixin$(Node)) { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreate_NamedNodeMap() { + return new _NamedNodeMap.internal_(); + } + internal_() { + super.DartHtmlDomObject(); + } + ['=='](other) { + return dart.equals(unwrap_jso(other), unwrap_jso(this)) || dart.notNull(core.identical(this, other)); + } + get hashCode() { + return dart.hashCode(unwrap_jso(this)); + } + get length() { + return dart.as(wrap_jso(this.raw.length), core.int); + } + get(index) { + if (index >>> 0 !== index || index >= this.length) + dart.throw(core.RangeError.index(index, this)); + return dart.as(wrap_jso(this.raw[index]), Node); + } + set(index, value) { + dart.throw(new core.UnsupportedError("Cannot assign element of immutable List.")); + return value; + } + set length(value) { + dart.throw(new core.UnsupportedError("Cannot resize immutable List.")); + } + get first() { + if (dart.notNull(this.length) > 0) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get last() { + let len = this.length; + if (dart.notNull(len) > 0) { + return dart.as(wrap_jso(this.raw[dart.notNull(len) - 1]), Node); + } + dart.throw(new core.StateError("No elements")); + } + get single() { + let len = this.length; + if (len == 1) { + return dart.as(wrap_jso(this.raw[0]), Node); + } + if (len == 0) + dart.throw(new core.StateError("No elements")); + dart.throw(new core.StateError("More than one element")); + } + elementAt(index) { + return this.get(index); + } + [__getter__](name) { + return this[__getter___1](name); + } + [__getter___1](name) { + return dart.as(wrap_jso(this.raw.__getter__(unwrap_jso(name))), Node); + } + getNamedItem(name) { + return this[_getNamedItem_1](name); + } + [_getNamedItem_1](name) { + return dart.as(wrap_jso(this.raw.getNamedItem(unwrap_jso(name))), Node); + } + getNamedItemNS(namespaceURI, localName) { + return this[_getNamedItemNS_1](namespaceURI, localName); + } + [_getNamedItemNS_1](namespaceURI, localName) { + return dart.as(wrap_jso(this.raw.getNamedItemNS(unwrap_jso(namespaceURI), unwrap_jso(localName))), Node); + } + item(index) { + return this[_item_1](index); + } + [_item_1](index) { + return dart.as(wrap_jso(this.raw.item(unwrap_jso(index))), Node); + } + removeNamedItem(name) { + return this[_removeNamedItem_1](name); + } + [_removeNamedItem_1](name) { + return dart.as(wrap_jso(this.raw.removeNamedItem(unwrap_jso(name))), Node); + } + removeNamedItemNS(namespaceURI, localName) { + return this[_removeNamedItemNS_1](namespaceURI, localName); + } + [_removeNamedItemNS_1](namespaceURI, localName) { + return dart.as(wrap_jso(this.raw.removeNamedItemNS(unwrap_jso(namespaceURI), unwrap_jso(localName))), Node); + } + setNamedItem(node) { + return this[_setNamedItem_1](node); + } + [_setNamedItem_1](node) { + return dart.as(wrap_jso(this.raw.setNamedItem(unwrap_jso(node))), Node); + } + setNamedItemNS(node) { + return this[_setNamedItemNS_1](node); + } + [_setNamedItemNS_1](node) { + return dart.as(wrap_jso(this.raw.setNamedItemNS(unwrap_jso(node))), Node); + } + } + _NamedNodeMap[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, core.List$(Node)]; + dart.defineNamedConstructor(_NamedNodeMap, 'internal_'); + dart.setSignature(_NamedNodeMap, { + constructors: () => ({ + _: [_NamedNodeMap, []], + internal_: [_NamedNodeMap, []] + }), + methods: () => ({ + get: [Node, [core.int]], + set: [dart.void, [core.int, Node]], + elementAt: [Node, [core.int]], + [__getter__]: [Node, [core.String]], + [__getter___1]: [Node, [dart.dynamic]], + getNamedItem: [Node, [core.String]], + [_getNamedItem_1]: [Node, [dart.dynamic]], + getNamedItemNS: [Node, [core.String, core.String]], + [_getNamedItemNS_1]: [Node, [dart.dynamic, dart.dynamic]], + item: [Node, [core.int]], + [_item_1]: [Node, [dart.dynamic]], + removeNamedItem: [Node, [core.String]], + [_removeNamedItem_1]: [Node, [dart.dynamic]], + removeNamedItemNS: [Node, [core.String, core.String]], + [_removeNamedItemNS_1]: [Node, [dart.dynamic, dart.dynamic]], + setNamedItem: [Node, [Node]], + [_setNamedItem_1]: [Node, [Node]], + setNamedItemNS: [Node, [Node]], + [_setNamedItemNS_1]: [Node, [Node]] + }), + statics: () => ({internalCreate_NamedNodeMap: [_NamedNodeMap, []]}), + names: ['internalCreate_NamedNodeMap'] + }); + dart.defineExtensionMembers(_NamedNodeMap, [ + 'get', + 'set', + 'elementAt', + 'length', + 'length', + 'first', + 'last', + 'single' + ]); + _NamedNodeMap[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('NamedNodeMap')), core.deprecated, dart.const(new _js_helper.Native("NamedNodeMap,MozNamedAttrMap"))]; + class _XMLHttpRequestProgressEvent extends ProgressEvent { + static _() { + dart.throw(new core.UnsupportedError("Not supported")); + } + static internalCreate_XMLHttpRequestProgressEvent() { + return new _XMLHttpRequestProgressEvent.internal_(); + } + internal_() { + super.internal_(); + } + } + dart.defineNamedConstructor(_XMLHttpRequestProgressEvent, 'internal_'); + dart.setSignature(_XMLHttpRequestProgressEvent, { + constructors: () => ({ + _: [_XMLHttpRequestProgressEvent, []], + internal_: [_XMLHttpRequestProgressEvent, []] + }), + statics: () => ({internalCreate_XMLHttpRequestProgressEvent: [_XMLHttpRequestProgressEvent, []]}), + names: ['internalCreate_XMLHttpRequestProgressEvent'] + }); + _XMLHttpRequestProgressEvent[dart.metadata] = () => [dart.const(new _metadata.DocsEditable()), dart.const(new _metadata.DomName('XMLHttpRequestProgressEvent')), dart.const(new _metadata.Experimental()), dart.const(new _js_helper.Native("XMLHttpRequestProgressEvent"))]; + const _matches = Symbol('_matches'); + class _AttributeMap extends core.Object { + _AttributeMap(element) { + this[_element] = element; + } + addAll(other) { + other.forEach(dart.fn(((k, v) => { + this.set(dart.as(k, core.String), dart.as(v, core.String)); + }).bind(this))); + } + containsValue(value) { + for (let v of this.values) { + if (dart.equals(value, v)) { + return true; + } + } + return false; + } + putIfAbsent(key, ifAbsent) { + if (!dart.notNull(this.containsKey(key))) { + this.set(key, ifAbsent()); + } + return this.get(key); + } + clear() { + for (let key of this.keys) { + this.remove(key); + } + } + forEach(f) { + for (let key of this.keys) { + let value = this.get(key); + f(key, value); + } + } + get keys() { + let attributes = this[_element][_attributes]; + let keys = core.List$(core.String).new(); + for (let i = 0, len = attributes.length; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1) { + if (dart.notNull(this[_matches](attributes.get(i)))) { + keys[dartx.add](dart.as(attributes.get(i).name, core.String)); + } + } + return keys; + } + get values() { + let attributes = this[_element][_attributes]; + let values = core.List$(core.String).new(); + for (let i = 0, len = attributes.length; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1) { + if (dart.notNull(this[_matches](attributes.get(i)))) { + values[dartx.add](dart.as(attributes.get(i).value, core.String)); + } + } + return values; + } + get isEmpty() { + return this.length == 0; + } + get isNotEmpty() { + return !dart.notNull(this.isEmpty); + } + } + _AttributeMap[dart.implements] = () => [core.Map$(core.String, core.String)]; + dart.setSignature(_AttributeMap, { + constructors: () => ({_AttributeMap: [_AttributeMap, [Element]]}), + methods: () => ({ + addAll: [dart.void, [core.Map$(core.String, core.String)]], + containsValue: [core.bool, [core.Object]], + putIfAbsent: [core.String, [core.String, dart.functionType(core.String, [])]], + clear: [dart.void, []], + forEach: [dart.void, [dart.functionType(dart.void, [core.String, core.String])]] + }) + }); + class _ElementAttributeMap extends _AttributeMap { + _ElementAttributeMap(element) { + super._AttributeMap(element); + } + containsKey(key) { + return this[_element][_hasAttribute](dart.as(key, core.String)); + } + get(key) { + return this[_element].getAttribute(dart.as(key, core.String)); + } + set(key, value) { + this[_element].setAttribute(key, value); + return value; + } + remove(key) { + let value = this[_element].getAttribute(dart.as(key, core.String)); + this[_element][_removeAttribute](dart.as(key, core.String)); + return value; + } + get length() { + return this.keys[dartx.length]; + } + [_matches](node) { + return node[_namespaceUri] == null; + } + } + dart.setSignature(_ElementAttributeMap, { + constructors: () => ({_ElementAttributeMap: [_ElementAttributeMap, [Element]]}), + methods: () => ({ + containsKey: [core.bool, [core.Object]], + get: [core.String, [core.Object]], + set: [dart.void, [core.String, core.String]], + remove: [core.String, [core.Object]], + [_matches]: [core.bool, [Node]] + }) + }); + const _namespace = Symbol('_namespace'); + class _NamespacedAttributeMap extends _AttributeMap { + _NamespacedAttributeMap(element, namespace) { + this[_namespace] = namespace; + super._AttributeMap(element); + } + containsKey(key) { + return this[_element][_hasAttributeNS](this[_namespace], dart.as(key, core.String)); + } + get(key) { + return this[_element].getAttributeNS(this[_namespace], dart.as(key, core.String)); + } + set(key, value) { + this[_element].setAttributeNS(this[_namespace], key, value); + return value; + } + remove(key) { + let value = this.get(key); + this[_element][_removeAttributeNS](this[_namespace], dart.as(key, core.String)); + return value; + } + get length() { + return this.keys[dartx.length]; + } + [_matches](node) { + return node[_namespaceUri] == this[_namespace]; + } + } + dart.setSignature(_NamespacedAttributeMap, { + constructors: () => ({_NamespacedAttributeMap: [_NamespacedAttributeMap, [Element, core.String]]}), + methods: () => ({ + containsKey: [core.bool, [core.Object]], + get: [core.String, [core.Object]], + set: [dart.void, [core.String, core.String]], + remove: [core.String, [core.Object]], + [_matches]: [core.bool, [Node]] + }) + }); + const _attr = Symbol('_attr'); + const _strip = Symbol('_strip'); + const _toHyphenedName = Symbol('_toHyphenedName'); + const _toCamelCase = Symbol('_toCamelCase'); + class _DataAttributeMap extends core.Object { + _DataAttributeMap(attributes) { + this[_attributes] = attributes; + } + addAll(other) { + other.forEach(dart.fn(((k, v) => { + this.set(dart.as(k, core.String), dart.as(v, core.String)); + }).bind(this))); + } + containsValue(value) { + return this.values[dartx.any](dart.fn(v => dart.equals(v, value), core.bool, [dart.dynamic])); + } + containsKey(key) { + return this[_attributes].containsKey(this[_attr](dart.as(key, core.String))); + } + get(key) { + return this[_attributes].get(this[_attr](dart.as(key, core.String))); + } + set(key, value) { + this[_attributes].set(this[_attr](key), value); + return value; + } + putIfAbsent(key, ifAbsent) { + return this[_attributes].putIfAbsent(this[_attr](key), ifAbsent); + } + remove(key) { + return this[_attributes].remove(this[_attr](dart.as(key, core.String))); + } + clear() { + for (let key of this.keys) { + this.remove(key); + } + } + forEach(f) { + this[_attributes].forEach(dart.fn(((key, value) => { + if (dart.notNull(this[_matches](key))) { + f(this[_strip](key), value); + } + }).bind(this), dart.dynamic, [core.String, core.String])); + } + get keys() { + let keys = core.List$(core.String).new(); + this[_attributes].forEach(dart.fn(((key, value) => { + if (dart.notNull(this[_matches](key))) { + keys[dartx.add](this[_strip](key)); + } + }).bind(this), dart.dynamic, [core.String, core.String])); + return keys; + } + get values() { + let values = core.List$(core.String).new(); + this[_attributes].forEach(dart.fn(((key, value) => { + if (dart.notNull(this[_matches](key))) { + values[dartx.add](value); + } + }).bind(this), dart.dynamic, [core.String, core.String])); + return values; + } + get length() { + return this.keys[dartx.length]; + } + get isEmpty() { + return this.length == 0; + } + get isNotEmpty() { + return !dart.notNull(this.isEmpty); + } + [_attr](key) { + return `data-${this[_toHyphenedName](key)}`; + } + [_matches](key) { + return key[dartx.startsWith]('data-'); + } + [_strip](key) { + return this[_toCamelCase](key[dartx.substring](5)); + } + [_toCamelCase](hyphenedName, opts) { + let startUppercase = opts && 'startUppercase' in opts ? opts.startUppercase : false; + let segments = hyphenedName[dartx.split]('-'); + let start = dart.notNull(startUppercase) ? 0 : 1; + for (let i = start; dart.notNull(i) < dart.notNull(segments[dartx.length]); i = dart.notNull(i) + 1) { + let segment = segments[dartx.get](i); + if (dart.notNull(segment[dartx.length]) > 0) { + segments[dartx.set](i, `${segment[dartx.get](0)[dartx.toUpperCase]()}${segment[dartx.substring](1)}`); + } + } + return segments[dartx.join](''); + } + [_toHyphenedName](word) { + let sb = new core.StringBuffer(); + for (let i = 0; dart.notNull(i) < dart.notNull(word[dartx.length]); i = dart.notNull(i) + 1) { + let lower = word[dartx.get](i)[dartx.toLowerCase](); + if (word[dartx.get](i) != lower && dart.notNull(i) > 0) + sb.write('-'); + sb.write(lower); + } + return dart.toString(sb); + } + } + _DataAttributeMap[dart.implements] = () => [core.Map$(core.String, core.String)]; + dart.setSignature(_DataAttributeMap, { + constructors: () => ({_DataAttributeMap: [_DataAttributeMap, [core.Map$(core.String, core.String)]]}), + methods: () => ({ + addAll: [dart.void, [core.Map$(core.String, core.String)]], + containsValue: [core.bool, [core.Object]], + containsKey: [core.bool, [core.Object]], + get: [core.String, [core.Object]], + set: [dart.void, [core.String, core.String]], + putIfAbsent: [core.String, [core.String, dart.functionType(core.String, [])]], + remove: [core.String, [core.Object]], + clear: [dart.void, []], + forEach: [dart.void, [dart.functionType(dart.void, [core.String, core.String])]], + [_attr]: [core.String, [core.String]], + [_matches]: [core.bool, [core.String]], + [_strip]: [core.String, [core.String]], + [_toCamelCase]: [core.String, [core.String], {startUppercase: core.bool}], + [_toHyphenedName]: [core.String, [core.String]] + }) + }); + class CanvasImageSource extends core.Object {} + class WindowBase extends core.Object {} + WindowBase[dart.implements] = () => [EventTarget]; + class LocationBase extends core.Object {} + class HistoryBase extends core.Object {} + class CssClassSet extends core.Object {} + CssClassSet[dart.implements] = () => [core.Set$(core.String)]; + const _addOrSubtractToBoxModel = Symbol('_addOrSubtractToBoxModel'); + class CssRect extends math.MutableRectangle$(core.num) { + CssRect(element) { + this[_element] = element; + super.MutableRectangle(0, 0, 0, 0); + } + set height(newHeight) { + dart.throw(new core.UnsupportedError("Can only set height for content rect.")); + } + set width(newWidth) { + dart.throw(new core.UnsupportedError("Can only set width for content rect.")); + } + [_addOrSubtractToBoxModel](dimensions, augmentingMeasurement) { + let styles = this[_element].getComputedStyle(); + let val = 0; + for (let measurement of dimensions) { + if (augmentingMeasurement == exports._MARGIN) { + val = dart.notNull(val) + dart.notNull(dart.asInt(new Dimension.css(styles.getPropertyValue(`${augmentingMeasurement}-${measurement}`)).value)); + } + if (augmentingMeasurement == exports._CONTENT) { + val = dart.notNull(val) - dart.notNull(dart.asInt(new Dimension.css(styles.getPropertyValue(`${exports._PADDING}-${measurement}`)).value)); + } + if (augmentingMeasurement != exports._MARGIN) { + val = dart.notNull(val) - dart.notNull(dart.asInt(new Dimension.css(styles.getPropertyValue(`border-${measurement}-width`)).value)); + } + } + return val; + } + } + dart.setSignature(CssRect, { + constructors: () => ({CssRect: [CssRect, [Element]]}), + methods: () => ({[_addOrSubtractToBoxModel]: [core.num, [core.List$(core.String), core.String]]}) + }); + class _ContentCssRect extends CssRect { + _ContentCssRect(element) { + super.CssRect(dart.as(element, Element)); + } + get height() { + return dart.notNull(this[_element].offsetHeight) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._HEIGHT, core.List$(core.String)), exports._CONTENT)); + } + get width() { + return dart.notNull(this[_element].offsetWidth) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._WIDTH, core.List$(core.String)), exports._CONTENT)); + } + set height(newHeight) { + if (dart.is(newHeight, Dimension)) { + let result = dart.notNull(newHeight.value) < 0 ? new Dimension.px(0) : newHeight; + this[_element].style.height = dart.toString(result); + } else { + let result = dart.notNull(dart.as(newHeight, core.int)) < 0 ? 0 : newHeight; + this[_element].style.height = `${result}px`; + } + } + set width(newWidth) { + if (dart.is(newWidth, Dimension)) { + let result = dart.notNull(newWidth.value) < 0 ? new Dimension.px(0) : newWidth; + this[_element].style.width = dart.toString(result); + } else { + let result = dart.notNull(dart.as(newWidth, core.int)) < 0 ? 0 : newWidth; + this[_element].style.width = `${result}px`; + } + } + get left() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().left, '-', this[_addOrSubtractToBoxModel](dart.list(['left'], core.String), exports._CONTENT)), core.num); + } + get top() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().top, '-', this[_addOrSubtractToBoxModel](dart.list(['top'], core.String), exports._CONTENT)), core.num); + } + } + dart.setSignature(_ContentCssRect, { + constructors: () => ({_ContentCssRect: [_ContentCssRect, [dart.dynamic]]}) + }); + const _elementList = Symbol('_elementList'); + class _ContentCssListRect extends _ContentCssRect { + _ContentCssListRect(elementList) { + this[_elementList] = null; + super._ContentCssRect(dart.dload(elementList, 'first')); + this[_elementList] = dart.as(elementList, core.List$(Element)); + } + set height(newHeight) { + this[_elementList][dartx.forEach](dart.fn(e => dart.dput(dart.dload(e, 'contentEdge'), 'height', newHeight), core.Object, [dart.dynamic])); + } + set width(newWidth) { + this[_elementList][dartx.forEach](dart.fn(e => dart.dput(dart.dload(e, 'contentEdge'), 'width', newWidth), core.Object, [dart.dynamic])); + } + } + dart.setSignature(_ContentCssListRect, { + constructors: () => ({_ContentCssListRect: [_ContentCssListRect, [dart.dynamic]]}) + }); + class _PaddingCssRect extends CssRect { + _PaddingCssRect(element) { + super.CssRect(dart.as(element, Element)); + } + get height() { + return dart.notNull(this[_element].offsetHeight) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._HEIGHT, core.List$(core.String)), exports._PADDING)); + } + get width() { + return dart.notNull(this[_element].offsetWidth) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._WIDTH, core.List$(core.String)), exports._PADDING)); + } + get left() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().left, '-', this[_addOrSubtractToBoxModel](dart.list(['left'], core.String), exports._PADDING)), core.num); + } + get top() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().top, '-', this[_addOrSubtractToBoxModel](dart.list(['top'], core.String), exports._PADDING)), core.num); + } + } + dart.setSignature(_PaddingCssRect, { + constructors: () => ({_PaddingCssRect: [_PaddingCssRect, [dart.dynamic]]}) + }); + class _BorderCssRect extends CssRect { + _BorderCssRect(element) { + super.CssRect(dart.as(element, Element)); + } + get height() { + return this[_element].offsetHeight; + } + get width() { + return this[_element].offsetWidth; + } + get left() { + return dart.as(this[_element].getBoundingClientRect().left, core.num); + } + get top() { + return dart.as(this[_element].getBoundingClientRect().top, core.num); + } + } + dart.setSignature(_BorderCssRect, { + constructors: () => ({_BorderCssRect: [_BorderCssRect, [dart.dynamic]]}) + }); + class _MarginCssRect extends CssRect { + _MarginCssRect(element) { + super.CssRect(dart.as(element, Element)); + } + get height() { + return dart.notNull(this[_element].offsetHeight) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._HEIGHT, core.List$(core.String)), exports._MARGIN)); + } + get width() { + return dart.notNull(this[_element].offsetWidth) + dart.notNull(this[_addOrSubtractToBoxModel](dart.as(exports._WIDTH, core.List$(core.String)), exports._MARGIN)); + } + get left() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().left, '-', this[_addOrSubtractToBoxModel](dart.list(['left'], core.String), exports._MARGIN)), core.num); + } + get top() { + return dart.as(dart.dsend(this[_element].getBoundingClientRect().top, '-', this[_addOrSubtractToBoxModel](dart.list(['top'], core.String), exports._MARGIN)), core.num); + } + } + dart.setSignature(_MarginCssRect, { + constructors: () => ({_MarginCssRect: [_MarginCssRect, [dart.dynamic]]}) + }); + exports._CONTENT = 'content'; + exports._PADDING = 'padding'; + exports._MARGIN = 'margin'; + dart.defineLazyProperties(exports, { + get _HEIGHT() { + return ['top', 'bottom']; + }, + get _WIDTH() { + return ['right', 'left']; + } + }); + const _sets = Symbol('_sets'); + dart.defineLazyClass(exports, { + get _MultiElementCssClassSet() { + class _MultiElementCssClassSet extends html_common.CssClassSetImpl { + static new(elements) { + return new exports._MultiElementCssClassSet._(elements, dart.as(elements[dartx.map](dart.fn(e => e.classes, CssClassSet, [Element]))[dartx.toList](), core.List$(html_common.CssClassSetImpl))); + } + _(elementIterable, sets) { + this[_elementIterable] = elementIterable; + this[_sets] = sets; + } + readClasses() { + let s = collection.LinkedHashSet$(core.String).new(); + this[_sets][dartx.forEach](dart.fn(e => s.addAll(e.readClasses()), dart.void, [html_common.CssClassSetImpl])); + return s; + } + writeClasses(s) { + let classes = s.join(' '); + for (let e of this[_elementIterable]) { + e.className = classes; + } + } + modify(f) { + this[_sets][dartx.forEach](dart.fn(e => e.modify(f), dart.dynamic, [html_common.CssClassSetImpl])); + } + toggle(value, shouldAdd) { + if (shouldAdd === void 0) + shouldAdd = null; + return this[_sets][dartx.fold](false, dart.fn((changed, e) => dart.notNull(e.toggle(value, shouldAdd)) || dart.notNull(changed), core.bool, [core.bool, html_common.CssClassSetImpl])); + } + remove(value) { + return this[_sets][dartx.fold](false, dart.fn((changed, e) => dart.notNull(e.remove(value)) || dart.notNull(changed), core.bool, [core.bool, html_common.CssClassSetImpl])); + } + } + dart.defineNamedConstructor(_MultiElementCssClassSet, '_'); + dart.setSignature(_MultiElementCssClassSet, { + constructors: () => ({ + new: [exports._MultiElementCssClassSet, [core.Iterable$(Element)]], + _: [exports._MultiElementCssClassSet, [core.Iterable$(Element), core.List$(html_common.CssClassSetImpl)]] + }), + methods: () => ({ + readClasses: [core.Set$(core.String), []], + writeClasses: [dart.void, [core.Set$(core.String)]] + }) + }); + return _MultiElementCssClassSet; + } + }); + dart.defineLazyClass(exports, { + get _ElementCssClassSet() { + class _ElementCssClassSet extends html_common.CssClassSetImpl { + _ElementCssClassSet(element) { + this[_element] = element; + } + readClasses() { + let s = collection.LinkedHashSet$(core.String).new(); + let classname = this[_element].className; + for (let name of classname[dartx.split](' ')) { + let trimmed = name[dartx.trim](); + if (!dart.notNull(trimmed[dartx.isEmpty])) { + s.add(trimmed); + } + } + return s; + } + writeClasses(s) { + this[_element].className = s.join(' '); + } + get length() { + return exports._ElementCssClassSet._classListLength(exports._ElementCssClassSet._classListOf(this[_element])); + } + get isEmpty() { + return this.length == 0; + } + get isNotEmpty() { + return this.length != 0; + } + clear() { + this[_element].className = ''; + } + contains(value) { + return exports._ElementCssClassSet._contains(this[_element], value); + } + add(value) { + return exports._ElementCssClassSet._add(this[_element], value); + } + remove(value) { + return typeof value == 'string' && dart.notNull(exports._ElementCssClassSet._remove(this[_element], value)); + } + toggle(value, shouldAdd) { + if (shouldAdd === void 0) + shouldAdd = null; + return exports._ElementCssClassSet._toggle(this[_element], value, shouldAdd); + } + addAll(iterable) { + exports._ElementCssClassSet._addAll(this[_element], iterable); + } + removeAll(iterable) { + exports._ElementCssClassSet._removeAll(this[_element], dart.as(iterable, core.Iterable$(core.String))); + } + retainAll(iterable) { + exports._ElementCssClassSet._removeWhere(this[_element], dart.bind(iterable[dartx.toSet](), 'contains'), false); + } + removeWhere(test) { + exports._ElementCssClassSet._removeWhere(this[_element], test, true); + } + retainWhere(test) { + exports._ElementCssClassSet._removeWhere(this[_element], test, false); + } + static _contains(_element, value) { + return typeof value == 'string' && dart.notNull(exports._ElementCssClassSet._classListContains(exports._ElementCssClassSet._classListOf(_element), value)); + } + static _add(_element, value) { + let list = exports._ElementCssClassSet._classListOf(_element); + let added = !dart.notNull(exports._ElementCssClassSet._classListContainsBeforeAddOrRemove(list, value)); + exports._ElementCssClassSet._classListAdd(list, value); + return added; + } + static _remove(_element, value) { + let list = exports._ElementCssClassSet._classListOf(_element); + let removed = exports._ElementCssClassSet._classListContainsBeforeAddOrRemove(list, value); + exports._ElementCssClassSet._classListRemove(list, value); + return removed; + } + static _toggle(_element, value, shouldAdd) { + return shouldAdd == null ? exports._ElementCssClassSet._toggleDefault(_element, value) : exports._ElementCssClassSet._toggleOnOff(_element, value, shouldAdd); + } + static _toggleDefault(_element, value) { + let list = exports._ElementCssClassSet._classListOf(_element); + return exports._ElementCssClassSet._classListToggle1(list, value); + } + static _toggleOnOff(_element, value, shouldAdd) { + let list = exports._ElementCssClassSet._classListOf(_element); + if (dart.notNull(shouldAdd)) { + exports._ElementCssClassSet._classListAdd(list, value); + return true; + } else { + exports._ElementCssClassSet._classListRemove(list, value); + return false; + } + } + static _addAll(_element, iterable) { + let list = exports._ElementCssClassSet._classListOf(_element); + for (let value of iterable) { + exports._ElementCssClassSet._classListAdd(list, value); + } + } + static _removeAll(_element, iterable) { + let list = exports._ElementCssClassSet._classListOf(_element); + for (let value of iterable) { + exports._ElementCssClassSet._classListRemove(list, value); + } + } + static _removeWhere(_element, test, doRemove) { + let list = exports._ElementCssClassSet._classListOf(_element); + let i = 0; + while (dart.notNull(i) < dart.notNull(exports._ElementCssClassSet._classListLength(list))) { + let item = list.item(i); + if (doRemove == test(item)) { + exports._ElementCssClassSet._classListRemove(list, item); + } else { + i = dart.notNull(i) + 1; + } + } + } + static _classListOf(e) { + return dart.as(wrap_jso(e.raw.classList), DomTokenList); + } + static _classListLength(list) { + return dart.as(list.raw.length, core.int); + } + static _classListContains(list, value) { + return dart.as(list.raw.contains(value), core.bool); + } + static _classListContainsBeforeAddOrRemove(list, value) { + return dart.as(list.raw.contains(value), core.bool); + } + static _classListAdd(list, value) { + list.raw.add(value); + } + static _classListRemove(list, value) { + list.raw.remove(value); + } + static _classListToggle1(list, value) { + return list.raw.toggle(value); + } + static _classListToggle2(list, value, shouldAdd) { + return list.raw.toggle(value, shouldAdd); + } + } + dart.setSignature(_ElementCssClassSet, { + constructors: () => ({_ElementCssClassSet: [exports._ElementCssClassSet, [Element]]}), + methods: () => ({ + readClasses: [core.Set$(core.String), []], + writeClasses: [dart.void, [core.Set$(core.String)]] + }), + statics: () => ({ + _contains: [core.bool, [Element, core.Object]], + _add: [core.bool, [Element, core.String]], + _remove: [core.bool, [Element, core.String]], + _toggle: [core.bool, [Element, core.String, core.bool]], + _toggleDefault: [core.bool, [Element, core.String]], + _toggleOnOff: [core.bool, [Element, core.String, core.bool]], + _addAll: [dart.void, [Element, core.Iterable$(core.String)]], + _removeAll: [dart.void, [Element, core.Iterable$(core.String)]], + _removeWhere: [dart.void, [Element, dart.functionType(core.bool, [core.String]), core.bool]], + _classListOf: [DomTokenList, [Element]], + _classListLength: [core.int, [DomTokenList]], + _classListContains: [core.bool, [DomTokenList, core.String]], + _classListContainsBeforeAddOrRemove: [core.bool, [DomTokenList, core.String]], + _classListAdd: [dart.void, [DomTokenList, core.String]], + _classListRemove: [dart.void, [DomTokenList, core.String]], + _classListToggle1: [core.bool, [DomTokenList, core.String]], + _classListToggle2: [core.bool, [DomTokenList, core.String, core.bool]] + }), + names: ['_contains', '_add', '_remove', '_toggle', '_toggleDefault', '_toggleOnOff', '_addAll', '_removeAll', '_removeWhere', '_classListOf', '_classListLength', '_classListContains', '_classListContainsBeforeAddOrRemove', '_classListAdd', '_classListRemove', '_classListToggle1', '_classListToggle2'] + }); + dart.defineExtensionMembers(_ElementCssClassSet, ['contains', 'length', 'isEmpty', 'isNotEmpty']); + return _ElementCssClassSet; + } + }); + const _unit = Symbol('_unit'); + class Dimension extends core.Object { + percent(value) { + this[_value] = value; + this[_unit] = '%'; + } + px(value) { + this[_value] = value; + this[_unit] = 'px'; + } + pc(value) { + this[_value] = value; + this[_unit] = 'pc'; + } + pt(value) { + this[_value] = value; + this[_unit] = 'pt'; + } + inch(value) { + this[_value] = value; + this[_unit] = 'in'; + } + cm(value) { + this[_value] = value; + this[_unit] = 'cm'; + } + mm(value) { + this[_value] = value; + this[_unit] = 'mm'; + } + em(value) { + this[_value] = value; + this[_unit] = 'em'; + } + ex(value) { + this[_value] = value; + this[_unit] = 'ex'; + } + css(cssValue) { + this[_value] = null; + this[_unit] = null; + if (cssValue == '') + cssValue = '0px'; + if (dart.notNull(cssValue[dartx.endsWith]('%'))) { + this[_unit] = '%'; + } else { + this[_unit] = cssValue[dartx.substring](dart.notNull(cssValue[dartx.length]) - 2); + } + if (dart.notNull(cssValue[dartx.contains]('.'))) { + this[_value] = core.double.parse(cssValue[dartx.substring](0, dart.notNull(cssValue[dartx.length]) - dart.notNull(this[_unit][dartx.length]))); + } else { + this[_value] = core.int.parse(cssValue[dartx.substring](0, dart.notNull(cssValue[dartx.length]) - dart.notNull(this[_unit][dartx.length]))); + } + } + toString() { + return `${this[_value]}${this[_unit]}`; + } + get value() { + return this[_value]; + } + } + dart.defineNamedConstructor(Dimension, 'percent'); + dart.defineNamedConstructor(Dimension, 'px'); + dart.defineNamedConstructor(Dimension, 'pc'); + dart.defineNamedConstructor(Dimension, 'pt'); + dart.defineNamedConstructor(Dimension, 'inch'); + dart.defineNamedConstructor(Dimension, 'cm'); + dart.defineNamedConstructor(Dimension, 'mm'); + dart.defineNamedConstructor(Dimension, 'em'); + dart.defineNamedConstructor(Dimension, 'ex'); + dart.defineNamedConstructor(Dimension, 'css'); + dart.setSignature(Dimension, { + constructors: () => ({ + percent: [Dimension, [core.num]], + px: [Dimension, [core.num]], + pc: [Dimension, [core.num]], + pt: [Dimension, [core.num]], + inch: [Dimension, [core.num]], + cm: [Dimension, [core.num]], + mm: [Dimension, [core.num]], + em: [Dimension, [core.num]], + ex: [Dimension, [core.num]], + css: [Dimension, [core.String]] + }) + }); + Dimension[dart.metadata] = () => [dart.const(new _metadata.Experimental())]; + const EventListener = dart.typedef('EventListener', () => dart.functionType(dart.dynamic, [Event])); + const ElementStream$ = dart.generic(function(T) { + class ElementStream extends core.Object {} + ElementStream[dart.implements] = () => [async.Stream$(T)]; + return ElementStream; + }); + let ElementStream = ElementStream$(); + const _target = Symbol('_target'); + const _useCapture = Symbol('_useCapture'); + const _EventStream$ = dart.generic(function(T) { + class _EventStream extends async.Stream$(T) { + _EventStream(target, eventType, useCapture) { + this[_target] = target; + this[_eventType] = eventType; + this[_useCapture] = useCapture; + super.Stream(); + } + asBroadcastStream(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; + dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + return this; + } + get isBroadcast() { + return true; + } + listen(onData, opts) { + dart.as(onData, dart.functionType(dart.void, [T])); + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + dart.as(onDone, dart.functionType(dart.void, [])); + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; + return new (_EventStreamSubscription$(T))(this[_target], this[_eventType], onData, this[_useCapture]); + } + } + dart.setSignature(_EventStream, { + constructors: () => ({_EventStream: [_EventStream$(T), [EventTarget, core.String, core.bool]]}), + methods: () => ({ + asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(dart.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void, [async.StreamSubscription$(T)])}], + listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnError: core.bool}] + }) + }); + return _EventStream; + }); + let _EventStream = _EventStream$(); + const _ElementEventStreamImpl$ = dart.generic(function(T) { + class _ElementEventStreamImpl extends _EventStream$(T) { + _ElementEventStreamImpl(target, eventType, useCapture) { + super._EventStream(dart.as(target, EventTarget), dart.as(eventType, core.String), dart.as(useCapture, core.bool)); + } + matches(selector) { + return dart.as(this.where(dart.fn(event => dart.as(dart.dsend(dart.dload(event, 'target'), 'matchesWithAncestors', selector), core.bool), core.bool, [dart.dynamic])).map(dart.fn(e => { + dart.dput(e, _selector, selector); + return e; + })), async.Stream$(T)); + } + capture(onData) { + dart.as(onData, dart.functionType(dart.void, [T])); + return new (_EventStreamSubscription$(T))(this[_target], this[_eventType], onData, true); + } + } + _ElementEventStreamImpl[dart.implements] = () => [ElementStream$(T)]; + dart.setSignature(_ElementEventStreamImpl, { + constructors: () => ({_ElementEventStreamImpl: [_ElementEventStreamImpl$(T), [dart.dynamic, dart.dynamic, dart.dynamic]]}), + methods: () => ({ + matches: [async.Stream$(T), [core.String]], + capture: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T])]] + }) + }); + return _ElementEventStreamImpl; + }); + let _ElementEventStreamImpl = _ElementEventStreamImpl$(); + const _targetList = Symbol('_targetList'); + const _ElementListEventStreamImpl$ = dart.generic(function(T) { + class _ElementListEventStreamImpl extends async.Stream$(T) { + _ElementListEventStreamImpl(targetList, eventType, useCapture) { + this[_targetList] = targetList; + this[_eventType] = eventType; + this[_useCapture] = useCapture; + super.Stream(); + } + matches(selector) { + return dart.as(this.where(dart.fn(event => dart.as(dart.dsend(dart.dload(event, 'target'), 'matchesWithAncestors', selector), core.bool), core.bool, [dart.dynamic])).map(dart.fn(e => { + dart.dput(e, _selector, selector); + return e; + })), async.Stream$(T)); + } + listen(onData, opts) { + dart.as(onData, dart.functionType(dart.void, [T])); + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + dart.as(onDone, dart.functionType(dart.void, [])); + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; + let pool = new _StreamPool.broadcast(); + for (let target of this[_targetList]) { + pool.add(new _EventStream(target, this[_eventType], this[_useCapture])); + } + return dart.as(pool.stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}), async.StreamSubscription$(T)); + } + capture(onData) { + dart.as(onData, dart.functionType(dart.void, [T])); + let pool = new _StreamPool.broadcast(); + for (let target of this[_targetList]) { + pool.add(new _EventStream(target, this[_eventType], true)); + } + return dart.as(pool.stream.listen(onData), async.StreamSubscription$(T)); + } + asBroadcastStream(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; + dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + return this; + } + get isBroadcast() { + return true; + } + } + _ElementListEventStreamImpl[dart.implements] = () => [ElementStream$(T)]; + dart.setSignature(_ElementListEventStreamImpl, { + constructors: () => ({_ElementListEventStreamImpl: [_ElementListEventStreamImpl$(T), [core.Iterable$(Element), core.String, core.bool]]}), + methods: () => ({ + matches: [async.Stream$(T), [core.String]], + listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnError: core.bool}], + capture: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T])]], + asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(dart.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void, [async.StreamSubscription$(T)])}] + }) + }); + return _ElementListEventStreamImpl; + }); + let _ElementListEventStreamImpl = _ElementListEventStreamImpl$(); + const _onData = Symbol('_onData'); + const _pauseCount = Symbol('_pauseCount'); + const _tryResume = Symbol('_tryResume'); + const _canceled = Symbol('_canceled'); + const _unlisten = Symbol('_unlisten'); + const _EventStreamSubscription$ = dart.generic(function(T) { + class _EventStreamSubscription extends async.StreamSubscription$(T) { + _EventStreamSubscription(target, eventType, onData, useCapture) { + this[_target] = target; + this[_eventType] = eventType; + this[_useCapture] = useCapture; + this[_onData] = _wrapZone(dart.as(onData, __CastType2)); + this[_pauseCount] = 0; + this[_tryResume](); + } + cancel() { + if (dart.notNull(this[_canceled])) + return null; + this[_unlisten](); + this[_target] = null; + this[_onData] = null; + return null; + } + get [_canceled]() { + return this[_target] == null; + } + onData(handleData) { + dart.as(handleData, dart.functionType(dart.void, [T])); + if (dart.notNull(this[_canceled])) { + dart.throw(new core.StateError("Subscription has been canceled.")); + } + this[_unlisten](); + this[_onData] = _wrapZone(handleData); + this[_tryResume](); + } + onError(handleError) {} + onDone(handleDone) { + dart.as(handleDone, dart.functionType(dart.void, [])); + } + pause(resumeSignal) { + if (resumeSignal === void 0) + resumeSignal = null; + if (dart.notNull(this[_canceled])) + return; + this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1; + this[_unlisten](); + if (resumeSignal != null) { + resumeSignal.whenComplete(dart.bind(this, 'resume')); + } + } + get isPaused() { + return dart.notNull(this[_pauseCount]) > 0; + } + resume() { + if (dart.notNull(this[_canceled]) || !dart.notNull(this.isPaused)) + return; + this[_pauseCount] = dart.notNull(this[_pauseCount]) - 1; + this[_tryResume](); + } + [_tryResume]() { + if (this[_onData] != null && !dart.notNull(this.isPaused)) { + this[_target].addEventListener(this[_eventType], dart.as(this[_onData], EventListener), this[_useCapture]); + } + } + [_unlisten]() { + if (this[_onData] != null) { + this[_target].removeEventListener(this[_eventType], dart.as(this[_onData], EventListener), this[_useCapture]); + } + } + asFuture(futureValue) { + if (futureValue === void 0) + futureValue = null; + let completer = async.Completer.new(); + return completer.future; + } + } + dart.setSignature(_EventStreamSubscription, { + constructors: () => ({_EventStreamSubscription: [_EventStreamSubscription$(T), [EventTarget, core.String, dart.dynamic, core.bool]]}), + methods: () => ({ + cancel: [async.Future, []], + onData: [dart.void, [dart.functionType(dart.void, [T])]], + onError: [dart.void, [core.Function]], + onDone: [dart.void, [dart.functionType(dart.void, [])]], + pause: [dart.void, [], [async.Future]], + resume: [dart.void, []], + [_tryResume]: [dart.void, []], + [_unlisten]: [dart.void, []], + asFuture: [async.Future, [], [dart.dynamic]] + }) + }); + return _EventStreamSubscription; + }); + let _EventStreamSubscription = _EventStreamSubscription$(); + const CustomStream$ = dart.generic(function(T) { + class CustomStream extends core.Object {} + CustomStream[dart.implements] = () => [async.Stream$(T)]; + return CustomStream; + }); + let CustomStream = CustomStream$(); + const _streamController = Symbol('_streamController'); + const _type = Symbol('_type'); + const _CustomEventStreamImpl$ = dart.generic(function(T) { + class _CustomEventStreamImpl extends async.Stream$(T) { + _CustomEventStreamImpl(type) { + this[_streamController] = null; + this[_type] = null; + super.Stream(); + this[_type] = type; + this[_streamController] = async.StreamController$(T).broadcast({sync: true}); + } + listen(onData, opts) { + dart.as(onData, dart.functionType(dart.void, [T])); + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + dart.as(onDone, dart.functionType(dart.void, [])); + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; + return this[_streamController].stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}); + } + asBroadcastStream(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; + dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription$(T)])); + return this[_streamController].stream; + } + get isBroadcast() { + return true; + } + add(event) { + dart.as(event, T); + if (event.type == this[_type]) + this[_streamController].add(event); + } + } + _CustomEventStreamImpl[dart.implements] = () => [CustomStream$(T)]; + dart.setSignature(_CustomEventStreamImpl, { + constructors: () => ({_CustomEventStreamImpl: [_CustomEventStreamImpl$(T), [core.String]]}), + methods: () => ({ + listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnError: core.bool}], + asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(dart.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void, [async.StreamSubscription$(T)])}], + add: [dart.void, [T]] + }) + }); + return _CustomEventStreamImpl; + }); + let _CustomEventStreamImpl = _CustomEventStreamImpl$(); + class _WrappedEvent extends core.Object { + _WrappedEvent(wrapped) { + this.wrapped = wrapped; + this[_selector] = null; + } + get bubbles() { + return this.wrapped.bubbles; + } + get cancelable() { + return this.wrapped.cancelable; + } + get clipboardData() { + return this.wrapped.clipboardData; + } + get currentTarget() { + return this.wrapped.currentTarget; + } + get defaultPrevented() { + return this.wrapped.defaultPrevented; + } + get eventPhase() { + return this.wrapped.eventPhase; + } + get target() { + return this.wrapped.target; + } + get timeStamp() { + return this.wrapped.timeStamp; + } + get type() { + return this.wrapped.type; + } + [_initEvent](eventTypeArg, canBubbleArg, cancelableArg) { + dart.throw(new core.UnsupportedError('Cannot initialize this Event.')); + } + preventDefault() { + this.wrapped.preventDefault(); + } + stopImmediatePropagation() { + this.wrapped.stopImmediatePropagation(); + } + stopPropagation() { + this.wrapped.stopPropagation(); + } + get matchingTarget() { + if (this[_selector] == null) { + dart.throw(new core.UnsupportedError('Cannot call matchingTarget if this Event did' + ' not arise as a result of event delegation.')); + } + let currentTarget = this.currentTarget; + let target = this.target; + let matchedTarget = null; + do { + if (dart.notNull(dart.as(dart.dcall(target.matches, this[_selector]), core.bool))) + return dart.as(target, Element); + target = dart.as(target.parent, EventTarget); + } while (target != null && !dart.equals(target, currentTarget.parent)); + dart.throw(new core.StateError('No selector matched for populating matchedTarget.')); + } + get path() { + return this.wrapped.path; + } + get [_get_currentTarget]() { + return this.wrapped[_get_currentTarget]; + } + get [_get_target]() { + return this.wrapped[_get_target]; + } + } + _WrappedEvent[dart.implements] = () => [Event]; + dart.setSignature(_WrappedEvent, { + constructors: () => ({_WrappedEvent: [_WrappedEvent, [Event]]}), + methods: () => ({ + [_initEvent]: [dart.void, [core.String, core.bool, core.bool]], + preventDefault: [dart.void, []], + stopImmediatePropagation: [dart.void, []], + stopPropagation: [dart.void, []] + }) + }); + const _shadowKeyCode = Symbol('_shadowKeyCode'); + const _shadowCharCode = Symbol('_shadowCharCode'); + const _shadowAltKey = Symbol('_shadowAltKey'); + const _parent = Symbol('_parent'); + const _realKeyCode = Symbol('_realKeyCode'); + const _realCharCode = Symbol('_realCharCode'); + const _realAltKey = Symbol('_realAltKey'); + const _currentTarget = Symbol('_currentTarget'); + const _shadowKeyIdentifier = Symbol('_shadowKeyIdentifier'); + class KeyEvent extends _WrappedEvent { + get keyCode() { + return this[_shadowKeyCode]; + } + get charCode() { + return this.type == 'keypress' ? this[_shadowCharCode] : 0; + } + get altKey() { + return this[_shadowAltKey]; + } + get which() { + return this.keyCode; + } + get [_realKeyCode]() { + return this[_parent].keyCode; + } + get [_realCharCode]() { + return this[_parent].charCode; + } + get [_realAltKey]() { + return this[_parent].altKey; + } + static _makeRecord() { + let interceptor = _foreign_helper.JS_INTERCEPTOR_CONSTANT(KeyboardEvent); + return dart.dcall(/* Unimplemented unknown name */makeLeafDispatchRecord, interceptor); + } + wrap(parent) { + this[_parent] = null; + this[_shadowAltKey] = null; + this[_shadowCharCode] = null; + this[_shadowKeyCode] = null; + this[_currentTarget] = null; + super._WrappedEvent(parent); + this[_parent] = parent; + this[_shadowAltKey] = this[_realAltKey]; + this[_shadowCharCode] = this[_realCharCode]; + this[_shadowKeyCode] = this[_realKeyCode]; + this[_currentTarget] = this[_parent].currentTarget; + } + static new(type, opts) { + let view = opts && 'view' in opts ? opts.view : null; + let canBubble = opts && 'canBubble' in opts ? opts.canBubble : true; + let cancelable = opts && 'cancelable' in opts ? opts.cancelable : true; + let keyCode = opts && 'keyCode' in opts ? opts.keyCode : 0; + let charCode = opts && 'charCode' in opts ? opts.charCode : 0; + let keyLocation = opts && 'keyLocation' in opts ? opts.keyLocation : 1; + let ctrlKey = opts && 'ctrlKey' in opts ? opts.ctrlKey : false; + let altKey = opts && 'altKey' in opts ? opts.altKey : false; + let shiftKey = opts && 'shiftKey' in opts ? opts.shiftKey : false; + let metaKey = opts && 'metaKey' in opts ? opts.metaKey : false; + let currentTarget = opts && 'currentTarget' in opts ? opts.currentTarget : null; + if (view == null) { + view = exports.window; + } + let eventObj = null; + if (dart.notNull(KeyEvent.canUseDispatchEvent)) { + eventObj = Event.eventType('Event', type, {canBubble: canBubble, cancelable: cancelable}); + eventObj.keyCode = keyCode; + eventObj.which = keyCode; + eventObj.charCode = charCode; + eventObj.keyLocation = keyLocation; + eventObj.ctrlKey = ctrlKey; + eventObj.altKey = altKey; + eventObj.shiftKey = shiftKey; + eventObj.metaKey = metaKey; + } else { + eventObj = Event.eventType('KeyboardEvent', type, {canBubble: canBubble, cancelable: cancelable}); + Object.defineProperty(eventObj, 'keyCode', { + get: function() { + return this.keyCodeVal; + } + }); + Object.defineProperty(eventObj, 'which', { + get: function() { + return this.keyCodeVal; + } + }); + Object.defineProperty(eventObj, 'charCode', { + get: function() { + return this.charCodeVal; + } + }); + let keyIdentifier = KeyEvent._convertToHexString(charCode, keyCode); + dart.dsend(eventObj, _initKeyboardEvent, type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey); + eventObj.keyCodeVal = keyCode; + eventObj.charCodeVal = charCode; + } + dart.dcall(/* Unimplemented unknown name */setDispatchProperty, eventObj, KeyEvent._keyboardEventDispatchRecord); + let keyEvent = new KeyEvent.wrap(dart.as(eventObj, KeyboardEvent)); + if (keyEvent[_currentTarget] == null) { + keyEvent[_currentTarget] = currentTarget == null ? exports.window : currentTarget; + } + return keyEvent; + } + static get canUseDispatchEvent() { + return typeof document.body.dispatchEvent == "function" && document.body.dispatchEvent.length > 0; + } + get currentTarget() { + return this[_currentTarget]; + } + static _convertToHexString(charCode, keyCode) { + if (charCode != -1) { + let hex = charCode[dartx.toRadixString](16); + let sb = new core.StringBuffer('U+'); + for (let i = 0; dart.notNull(i) < 4 - dart.notNull(hex[dartx.length]); i = dart.notNull(i) + 1) + sb.write('0'); + sb.write(hex); + return dart.toString(sb); + } else { + return KeyCode._convertKeyCodeToKeyName(keyCode); + } + } + get clipboardData() { + return this[_parent].clipboardData; + } + get ctrlKey() { + return this[_parent].ctrlKey; + } + get detail() { + return this[_parent].detail; + } + get keyLocation() { + return this[_parent].keyLocation; + } + get layer() { + return this[_parent].layer; + } + get metaKey() { + return this[_parent].metaKey; + } + get page() { + return this[_parent].page; + } + get shiftKey() { + return this[_parent].shiftKey; + } + get view() { + return dart.as(this[_parent].view, Window); + } + [_initUIEvent](type, canBubble, cancelable, view, detail) { + dart.throw(new core.UnsupportedError("Cannot initialize a UI Event from a KeyEvent.")); + } + get [_shadowKeyIdentifier]() { + return this[_parent].keyIdentifier; + } + get [_charCode]() { + return this.charCode; + } + get [_keyCode]() { + return this.keyCode; + } + get [_keyIdentifier]() { + dart.throw(new core.UnsupportedError("keyIdentifier is unsupported.")); + } + [_initKeyboardEvent](type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey) { + dart.throw(new core.UnsupportedError("Cannot initialize a KeyboardEvent from a KeyEvent.")); + } + get [_layerX]() { + return dart.throw(new core.UnsupportedError('Not applicable to KeyEvent')); + } + get [_layerY]() { + return dart.throw(new core.UnsupportedError('Not applicable to KeyEvent')); + } + get [_pageX]() { + return dart.throw(new core.UnsupportedError('Not applicable to KeyEvent')); + } + get [_pageY]() { + return dart.throw(new core.UnsupportedError('Not applicable to KeyEvent')); + } + getModifierState(keyArgument) { + return dart.throw(new core.UnimplementedError()); + } + get location() { + return dart.throw(new core.UnimplementedError()); + } + get repeat() { + return dart.throw(new core.UnimplementedError()); + } + get [_get_view]() { + return dart.throw(new core.UnimplementedError()); + } + } + KeyEvent[dart.implements] = () => [KeyboardEvent]; + dart.defineNamedConstructor(KeyEvent, 'wrap'); + dart.setSignature(KeyEvent, { + constructors: () => ({ + wrap: [KeyEvent, [KeyboardEvent]], + new: [KeyEvent, [core.String], {view: Window, canBubble: core.bool, cancelable: core.bool, keyCode: core.int, charCode: core.int, keyLocation: core.int, ctrlKey: core.bool, altKey: core.bool, shiftKey: core.bool, metaKey: core.bool, currentTarget: EventTarget}] + }), + methods: () => ({ + [_initUIEvent]: [dart.void, [core.String, core.bool, core.bool, Window, core.int]], + [_initKeyboardEvent]: [dart.void, [core.String, core.bool, core.bool, Window, core.String, core.int, core.bool, core.bool, core.bool, core.bool]], + getModifierState: [core.bool, [core.String]] + }), + statics: () => ({ + _makeRecord: [dart.dynamic, []], + _convertToHexString: [core.String, [core.int, core.int]] + }), + names: ['_makeRecord', '_convertToHexString'] + }); + KeyEvent[dart.metadata] = () => [dart.const(new _metadata.Experimental())]; + class _CustomKeyEventStreamImpl extends _CustomEventStreamImpl$(KeyEvent) { + _CustomKeyEventStreamImpl(type) { + super._CustomEventStreamImpl(type); + } + add(event) { + if (event.type == this[_type]) { + event.currentTarget.dispatchEvent(event[_parent]); + this[_streamController].add(event); + } + } + } + _CustomKeyEventStreamImpl[dart.implements] = () => [CustomStream$(KeyEvent)]; + dart.setSignature(_CustomKeyEventStreamImpl, { + constructors: () => ({_CustomKeyEventStreamImpl: [_CustomKeyEventStreamImpl, [core.String]]}), + methods: () => ({add: [dart.void, [KeyEvent]]}) + }); + const _subscriptions = Symbol('_subscriptions'); + const _controller = Symbol('_controller'); + const _StreamPool$ = dart.generic(function(T) { + class _StreamPool extends core.Object { + broadcast() { + this[_subscriptions] = core.Map$(async.Stream$(T), async.StreamSubscription$(T)).new(); + this[_controller] = null; + this[_controller] = async.StreamController$(T).broadcast({sync: true, onCancel: dart.bind(this, 'close')}); + } + get stream() { + return this[_controller].stream; + } + add(stream) { + dart.as(stream, async.Stream$(T)); + if (dart.notNull(this[_subscriptions].containsKey(stream))) + return; + this[_subscriptions].set(stream, stream.listen(dart.bind(this[_controller], 'add'), {onError: dart.bind(this[_controller], 'addError'), onDone: dart.fn((() => this.remove(stream)).bind(this), dart.void, [])})); + } + remove(stream) { + dart.as(stream, async.Stream$(T)); + let subscription = this[_subscriptions].remove(stream); + if (subscription != null) + subscription.cancel(); + } + close() { + for (let subscription of this[_subscriptions].values) { + subscription.cancel(); + } + this[_subscriptions].clear(); + this[_controller].close(); + } + } + dart.defineNamedConstructor(_StreamPool, 'broadcast'); + dart.setSignature(_StreamPool, { + constructors: () => ({broadcast: [_StreamPool$(T), []]}), + methods: () => ({ + add: [dart.void, [async.Stream$(T)]], + remove: [dart.void, [async.Stream$(T)]], + close: [dart.void, []] + }) + }); + return _StreamPool; + }); + let _StreamPool = _StreamPool$(); + class _Html5NodeValidator extends core.Object { + _Html5NodeValidator(opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + this.uriPolicy = uriPolicy != null ? uriPolicy : UriPolicy.new(); + if (dart.notNull(_Html5NodeValidator._attributeValidators.isEmpty)) { + for (let attr of _Html5NodeValidator._standardAttributes) { + _Html5NodeValidator._attributeValidators.set(attr, _Html5NodeValidator._standardAttributeValidator); + } + for (let attr of _Html5NodeValidator._uriAttributes) { + _Html5NodeValidator._attributeValidators.set(attr, _Html5NodeValidator._uriAttributeValidator); + } + } + } + allowsElement(element) { + return _Html5NodeValidator._allowedElements.contains(Element._safeTagName(element)); + } + allowsAttribute(element, attributeName, value) { + let tagName = Element._safeTagName(element); + let validator = _Html5NodeValidator._attributeValidators.get(`${tagName}::${attributeName}`); + if (validator == null) { + validator = _Html5NodeValidator._attributeValidators.get(`*::${attributeName}`); + } + if (validator == null) { + return false; + } + return dart.as(dart.dcall(validator, element, attributeName, value, this), core.bool); + } + static _standardAttributeValidator(element, attributeName, value, context) { + return true; + } + static _uriAttributeValidator(element, attributeName, value, context) { + return context.uriPolicy.allowsUri(value); + } + } + _Html5NodeValidator[dart.implements] = () => [NodeValidator]; + dart.setSignature(_Html5NodeValidator, { + constructors: () => ({_Html5NodeValidator: [_Html5NodeValidator, [], {uriPolicy: UriPolicy}]}), + methods: () => ({ + allowsElement: [core.bool, [Element]], + allowsAttribute: [core.bool, [Element, core.String, core.String]] + }), + statics: () => ({ + _standardAttributeValidator: [core.bool, [Element, core.String, core.String, _Html5NodeValidator]], + _uriAttributeValidator: [core.bool, [Element, core.String, core.String, _Html5NodeValidator]] + }), + names: ['_standardAttributeValidator', '_uriAttributeValidator'] + }); + _Html5NodeValidator._standardAttributes = dart.const(dart.list(['*::class', '*::dir', '*::draggable', '*::hidden', '*::id', '*::inert', '*::itemprop', '*::itemref', '*::itemscope', '*::lang', '*::spellcheck', '*::title', '*::translate', 'A::accesskey', 'A::coords', 'A::hreflang', 'A::name', 'A::shape', 'A::tabindex', 'A::target', 'A::type', 'AREA::accesskey', 'AREA::alt', 'AREA::coords', 'AREA::nohref', 'AREA::shape', 'AREA::tabindex', 'AREA::target', 'AUDIO::controls', 'AUDIO::loop', 'AUDIO::mediagroup', 'AUDIO::muted', 'AUDIO::preload', 'BDO::dir', 'BODY::alink', 'BODY::bgcolor', 'BODY::link', 'BODY::text', 'BODY::vlink', 'BR::clear', 'BUTTON::accesskey', 'BUTTON::disabled', 'BUTTON::name', 'BUTTON::tabindex', 'BUTTON::type', 'BUTTON::value', 'CANVAS::height', 'CANVAS::width', 'CAPTION::align', 'COL::align', 'COL::char', 'COL::charoff', 'COL::span', 'COL::valign', 'COL::width', 'COLGROUP::align', 'COLGROUP::char', 'COLGROUP::charoff', 'COLGROUP::span', 'COLGROUP::valign', 'COLGROUP::width', 'COMMAND::checked', 'COMMAND::command', 'COMMAND::disabled', 'COMMAND::label', 'COMMAND::radiogroup', 'COMMAND::type', 'DATA::value', 'DEL::datetime', 'DETAILS::open', 'DIR::compact', 'DIV::align', 'DL::compact', 'FIELDSET::disabled', 'FONT::color', 'FONT::face', 'FONT::size', 'FORM::accept', 'FORM::autocomplete', 'FORM::enctype', 'FORM::method', 'FORM::name', 'FORM::novalidate', 'FORM::target', 'FRAME::name', 'H1::align', 'H2::align', 'H3::align', 'H4::align', 'H5::align', 'H6::align', 'HR::align', 'HR::noshade', 'HR::size', 'HR::width', 'HTML::version', 'IFRAME::align', 'IFRAME::frameborder', 'IFRAME::height', 'IFRAME::marginheight', 'IFRAME::marginwidth', 'IFRAME::width', 'IMG::align', 'IMG::alt', 'IMG::border', 'IMG::height', 'IMG::hspace', 'IMG::ismap', 'IMG::name', 'IMG::usemap', 'IMG::vspace', 'IMG::width', 'INPUT::accept', 'INPUT::accesskey', 'INPUT::align', 'INPUT::alt', 'INPUT::autocomplete', 'INPUT::checked', 'INPUT::disabled', 'INPUT::inputmode', 'INPUT::ismap', 'INPUT::list', 'INPUT::max', 'INPUT::maxlength', 'INPUT::min', 'INPUT::multiple', 'INPUT::name', 'INPUT::placeholder', 'INPUT::readonly', 'INPUT::required', 'INPUT::size', 'INPUT::step', 'INPUT::tabindex', 'INPUT::type', 'INPUT::usemap', 'INPUT::value', 'INS::datetime', 'KEYGEN::disabled', 'KEYGEN::keytype', 'KEYGEN::name', 'LABEL::accesskey', 'LABEL::for', 'LEGEND::accesskey', 'LEGEND::align', 'LI::type', 'LI::value', 'LINK::sizes', 'MAP::name', 'MENU::compact', 'MENU::label', 'MENU::type', 'METER::high', 'METER::low', 'METER::max', 'METER::min', 'METER::value', 'OBJECT::typemustmatch', 'OL::compact', 'OL::reversed', 'OL::start', 'OL::type', 'OPTGROUP::disabled', 'OPTGROUP::label', 'OPTION::disabled', 'OPTION::label', 'OPTION::selected', 'OPTION::value', 'OUTPUT::for', 'OUTPUT::name', 'P::align', 'PRE::width', 'PROGRESS::max', 'PROGRESS::min', 'PROGRESS::value', 'SELECT::autocomplete', 'SELECT::disabled', 'SELECT::multiple', 'SELECT::name', 'SELECT::required', 'SELECT::size', 'SELECT::tabindex', 'SOURCE::type', 'TABLE::align', 'TABLE::bgcolor', 'TABLE::border', 'TABLE::cellpadding', 'TABLE::cellspacing', 'TABLE::frame', 'TABLE::rules', 'TABLE::summary', 'TABLE::width', 'TBODY::align', 'TBODY::char', 'TBODY::charoff', 'TBODY::valign', 'TD::abbr', 'TD::align', 'TD::axis', 'TD::bgcolor', 'TD::char', 'TD::charoff', 'TD::colspan', 'TD::headers', 'TD::height', 'TD::nowrap', 'TD::rowspan', 'TD::scope', 'TD::valign', 'TD::width', 'TEXTAREA::accesskey', 'TEXTAREA::autocomplete', 'TEXTAREA::cols', 'TEXTAREA::disabled', 'TEXTAREA::inputmode', 'TEXTAREA::name', 'TEXTAREA::placeholder', 'TEXTAREA::readonly', 'TEXTAREA::required', 'TEXTAREA::rows', 'TEXTAREA::tabindex', 'TEXTAREA::wrap', 'TFOOT::align', 'TFOOT::char', 'TFOOT::charoff', 'TFOOT::valign', 'TH::abbr', 'TH::align', 'TH::axis', 'TH::bgcolor', 'TH::char', 'TH::charoff', 'TH::colspan', 'TH::headers', 'TH::height', 'TH::nowrap', 'TH::rowspan', 'TH::scope', 'TH::valign', 'TH::width', 'THEAD::align', 'THEAD::char', 'THEAD::charoff', 'THEAD::valign', 'TR::align', 'TR::bgcolor', 'TR::char', 'TR::charoff', 'TR::valign', 'TRACK::default', 'TRACK::kind', 'TRACK::label', 'TRACK::srclang', 'UL::compact', 'UL::type', 'VIDEO::controls', 'VIDEO::height', 'VIDEO::loop', 'VIDEO::mediagroup', 'VIDEO::muted', 'VIDEO::preload', 'VIDEO::width'], core.String)); + _Html5NodeValidator._uriAttributes = dart.const(dart.list(['A::href', 'AREA::href', 'BLOCKQUOTE::cite', 'BODY::background', 'COMMAND::icon', 'DEL::cite', 'FORM::action', 'IMG::src', 'INPUT::src', 'INS::cite', 'Q::cite', 'VIDEO::poster'], core.String)); + dart.defineLazyProperties(_Html5NodeValidator, { + get _allowedElements() { + return core.Set$(core.String).from(['A', 'ABBR', 'ACRONYM', 'ADDRESS', 'AREA', 'ARTICLE', 'ASIDE', 'AUDIO', 'B', 'BDI', 'BDO', 'BIG', 'BLOCKQUOTE', 'BR', 'BUTTON', 'CANVAS', 'CAPTION', 'CENTER', 'CITE', 'CODE', 'COL', 'COLGROUP', 'COMMAND', 'DATA', 'DATALIST', 'DD', 'DEL', 'DETAILS', 'DFN', 'DIR', 'DIV', 'DL', 'DT', 'EM', 'FIELDSET', 'FIGCAPTION', 'FIGURE', 'FONT', 'FOOTER', 'FORM', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER', 'HGROUP', 'HR', 'I', 'IFRAME', 'IMG', 'INPUT', 'INS', 'KBD', 'LABEL', 'LEGEND', 'LI', 'MAP', 'MARK', 'MENU', 'METER', 'NAV', 'NOBR', 'OL', 'OPTGROUP', 'OPTION', 'OUTPUT', 'P', 'PRE', 'PROGRESS', 'Q', 'S', 'SAMP', 'SECTION', 'SELECT', 'SMALL', 'SOURCE', 'SPAN', 'STRIKE', 'STRONG', 'SUB', 'SUMMARY', 'SUP', 'TABLE', 'TBODY', 'TD', 'TEXTAREA', 'TFOOT', 'TH', 'THEAD', 'TIME', 'TR', 'TRACK', 'TT', 'U', 'UL', 'VAR', 'VIDEO', 'WBR']); + }, + get _attributeValidators() { + return dart.map(); + } + }); + class KeyCode extends core.Object { + static isCharacterKey(keyCode) { + if (dart.notNull(keyCode) >= dart.notNull(KeyCode.ZERO) && dart.notNull(keyCode) <= dart.notNull(KeyCode.NINE) || dart.notNull(keyCode) >= dart.notNull(KeyCode.NUM_ZERO) && dart.notNull(keyCode) <= dart.notNull(KeyCode.NUM_MULTIPLY) || dart.notNull(keyCode) >= dart.notNull(KeyCode.A) && dart.notNull(keyCode) <= dart.notNull(KeyCode.Z)) { + return true; + } + if (dart.notNull(html_common.Device.isWebKit) && keyCode == 0) { + return true; + } + return keyCode == KeyCode.SPACE || keyCode == KeyCode.QUESTION_MARK || keyCode == KeyCode.NUM_PLUS || keyCode == KeyCode.NUM_MINUS || keyCode == KeyCode.NUM_PERIOD || keyCode == KeyCode.NUM_DIVISION || keyCode == KeyCode.SEMICOLON || keyCode == KeyCode.FF_SEMICOLON || keyCode == KeyCode.DASH || keyCode == KeyCode.EQUALS || keyCode == KeyCode.FF_EQUALS || keyCode == KeyCode.COMMA || keyCode == KeyCode.PERIOD || keyCode == KeyCode.SLASH || keyCode == KeyCode.APOSTROPHE || keyCode == KeyCode.SINGLE_QUOTE || keyCode == KeyCode.OPEN_SQUARE_BRACKET || keyCode == KeyCode.BACKSLASH || keyCode == KeyCode.CLOSE_SQUARE_BRACKET; + } + static _convertKeyCodeToKeyName(keyCode) { + switch (keyCode) { + case KeyCode.ALT: + { + return _KeyName.ALT; + } + case KeyCode.BACKSPACE: + { + return _KeyName.BACKSPACE; + } + case KeyCode.CAPS_LOCK: + { + return _KeyName.CAPS_LOCK; + } + case KeyCode.CTRL: + { + return _KeyName.CONTROL; + } + case KeyCode.DELETE: + { + return _KeyName.DEL; + } + case KeyCode.DOWN: + { + return _KeyName.DOWN; + } + case KeyCode.END: + { + return _KeyName.END; + } + case KeyCode.ENTER: + { + return _KeyName.ENTER; + } + case KeyCode.ESC: + { + return _KeyName.ESC; + } + case KeyCode.F1: + { + return _KeyName.F1; + } + case KeyCode.F2: + { + return _KeyName.F2; + } + case KeyCode.F3: + { + return _KeyName.F3; + } + case KeyCode.F4: + { + return _KeyName.F4; + } + case KeyCode.F5: + { + return _KeyName.F5; + } + case KeyCode.F6: + { + return _KeyName.F6; + } + case KeyCode.F7: + { + return _KeyName.F7; + } + case KeyCode.F8: + { + return _KeyName.F8; + } + case KeyCode.F9: + { + return _KeyName.F9; + } + case KeyCode.F10: + { + return _KeyName.F10; + } + case KeyCode.F11: + { + return _KeyName.F11; + } + case KeyCode.F12: + { + return _KeyName.F12; + } + case KeyCode.HOME: + { + return _KeyName.HOME; + } + case KeyCode.INSERT: + { + return _KeyName.INSERT; + } + case KeyCode.LEFT: + { + return _KeyName.LEFT; + } + case KeyCode.META: + { + return _KeyName.META; + } + case KeyCode.NUMLOCK: + { + return _KeyName.NUM_LOCK; + } + case KeyCode.PAGE_DOWN: + { + return _KeyName.PAGE_DOWN; + } + case KeyCode.PAGE_UP: + { + return _KeyName.PAGE_UP; + } + case KeyCode.PAUSE: + { + return _KeyName.PAUSE; + } + case KeyCode.PRINT_SCREEN: + { + return _KeyName.PRINT_SCREEN; + } + case KeyCode.RIGHT: + { + return _KeyName.RIGHT; + } + case KeyCode.SCROLL_LOCK: + { + return _KeyName.SCROLL; + } + case KeyCode.SHIFT: + { + return _KeyName.SHIFT; + } + case KeyCode.SPACE: + { + return _KeyName.SPACEBAR; + } + case KeyCode.TAB: + { + return _KeyName.TAB; + } + case KeyCode.UP: + { + return _KeyName.UP; + } + case KeyCode.WIN_IME: + case KeyCode.WIN_KEY: + case KeyCode.WIN_KEY_LEFT: + case KeyCode.WIN_KEY_RIGHT: + { + return _KeyName.WIN; + } + default: + { + return _KeyName.UNIDENTIFIED; + } + } + return _KeyName.UNIDENTIFIED; + } + } + dart.setSignature(KeyCode, { + statics: () => ({ + isCharacterKey: [core.bool, [core.int]], + _convertKeyCodeToKeyName: [core.String, [core.int]] + }), + names: ['isCharacterKey', '_convertKeyCodeToKeyName'] + }); + KeyCode.WIN_KEY_FF_LINUX = 0; + KeyCode.MAC_ENTER = 3; + KeyCode.BACKSPACE = 8; + KeyCode.TAB = 9; + KeyCode.NUM_CENTER = 12; + KeyCode.ENTER = 13; + KeyCode.SHIFT = 16; + KeyCode.CTRL = 17; + KeyCode.ALT = 18; + KeyCode.PAUSE = 19; + KeyCode.CAPS_LOCK = 20; + KeyCode.ESC = 27; + KeyCode.SPACE = 32; + KeyCode.PAGE_UP = 33; + KeyCode.PAGE_DOWN = 34; + KeyCode.END = 35; + KeyCode.HOME = 36; + KeyCode.LEFT = 37; + KeyCode.UP = 38; + KeyCode.RIGHT = 39; + KeyCode.DOWN = 40; + KeyCode.NUM_NORTH_EAST = 33; + KeyCode.NUM_SOUTH_EAST = 34; + KeyCode.NUM_SOUTH_WEST = 35; + KeyCode.NUM_NORTH_WEST = 36; + KeyCode.NUM_WEST = 37; + KeyCode.NUM_NORTH = 38; + KeyCode.NUM_EAST = 39; + KeyCode.NUM_SOUTH = 40; + KeyCode.PRINT_SCREEN = 44; + KeyCode.INSERT = 45; + KeyCode.NUM_INSERT = 45; + KeyCode.DELETE = 46; + KeyCode.NUM_DELETE = 46; + KeyCode.ZERO = 48; + KeyCode.ONE = 49; + KeyCode.TWO = 50; + KeyCode.THREE = 51; + KeyCode.FOUR = 52; + KeyCode.FIVE = 53; + KeyCode.SIX = 54; + KeyCode.SEVEN = 55; + KeyCode.EIGHT = 56; + KeyCode.NINE = 57; + KeyCode.FF_SEMICOLON = 59; + KeyCode.FF_EQUALS = 61; + KeyCode.QUESTION_MARK = 63; + KeyCode.A = 65; + KeyCode.B = 66; + KeyCode.C = 67; + KeyCode.D = 68; + KeyCode.E = 69; + KeyCode.F = 70; + KeyCode.G = 71; + KeyCode.H = 72; + KeyCode.I = 73; + KeyCode.J = 74; + KeyCode.K = 75; + KeyCode.L = 76; + KeyCode.M = 77; + KeyCode.N = 78; + KeyCode.O = 79; + KeyCode.P = 80; + KeyCode.Q = 81; + KeyCode.R = 82; + KeyCode.S = 83; + KeyCode.T = 84; + KeyCode.U = 85; + KeyCode.V = 86; + KeyCode.W = 87; + KeyCode.X = 88; + KeyCode.Y = 89; + KeyCode.Z = 90; + KeyCode.META = 91; + KeyCode.WIN_KEY_LEFT = 91; + KeyCode.WIN_KEY_RIGHT = 92; + KeyCode.CONTEXT_MENU = 93; + KeyCode.NUM_ZERO = 96; + KeyCode.NUM_ONE = 97; + KeyCode.NUM_TWO = 98; + KeyCode.NUM_THREE = 99; + KeyCode.NUM_FOUR = 100; + KeyCode.NUM_FIVE = 101; + KeyCode.NUM_SIX = 102; + KeyCode.NUM_SEVEN = 103; + KeyCode.NUM_EIGHT = 104; + KeyCode.NUM_NINE = 105; + KeyCode.NUM_MULTIPLY = 106; + KeyCode.NUM_PLUS = 107; + KeyCode.NUM_MINUS = 109; + KeyCode.NUM_PERIOD = 110; + KeyCode.NUM_DIVISION = 111; + KeyCode.F1 = 112; + KeyCode.F2 = 113; + KeyCode.F3 = 114; + KeyCode.F4 = 115; + KeyCode.F5 = 116; + KeyCode.F6 = 117; + KeyCode.F7 = 118; + KeyCode.F8 = 119; + KeyCode.F9 = 120; + KeyCode.F10 = 121; + KeyCode.F11 = 122; + KeyCode.F12 = 123; + KeyCode.NUMLOCK = 144; + KeyCode.SCROLL_LOCK = 145; + KeyCode.FIRST_MEDIA_KEY = 166; + KeyCode.LAST_MEDIA_KEY = 183; + KeyCode.SEMICOLON = 186; + KeyCode.DASH = 189; + KeyCode.EQUALS = 187; + KeyCode.COMMA = 188; + KeyCode.PERIOD = 190; + KeyCode.SLASH = 191; + KeyCode.APOSTROPHE = 192; + KeyCode.TILDE = 192; + KeyCode.SINGLE_QUOTE = 222; + KeyCode.OPEN_SQUARE_BRACKET = 219; + KeyCode.BACKSLASH = 220; + KeyCode.CLOSE_SQUARE_BRACKET = 221; + KeyCode.WIN_KEY = 224; + KeyCode.MAC_FF_META = 224; + KeyCode.WIN_IME = 229; + KeyCode.UNKNOWN = -1; + class KeyLocation extends core.Object {} + KeyLocation.STANDARD = 0; + KeyLocation.LEFT = 1; + KeyLocation.RIGHT = 2; + KeyLocation.NUMPAD = 3; + KeyLocation.MOBILE = 4; + KeyLocation.JOYSTICK = 5; + class _KeyName extends core.Object {} + _KeyName.ACCEPT = "Accept"; + _KeyName.ADD = "Add"; + _KeyName.AGAIN = "Again"; + _KeyName.ALL_CANDIDATES = "AllCandidates"; + _KeyName.ALPHANUMERIC = "Alphanumeric"; + _KeyName.ALT = "Alt"; + _KeyName.ALT_GRAPH = "AltGraph"; + _KeyName.APPS = "Apps"; + _KeyName.ATTN = "Attn"; + _KeyName.BROWSER_BACK = "BrowserBack"; + _KeyName.BROWSER_FAVORTIES = "BrowserFavorites"; + _KeyName.BROWSER_FORWARD = "BrowserForward"; + _KeyName.BROWSER_NAME = "BrowserHome"; + _KeyName.BROWSER_REFRESH = "BrowserRefresh"; + _KeyName.BROWSER_SEARCH = "BrowserSearch"; + _KeyName.BROWSER_STOP = "BrowserStop"; + _KeyName.CAMERA = "Camera"; + _KeyName.CAPS_LOCK = "CapsLock"; + _KeyName.CLEAR = "Clear"; + _KeyName.CODE_INPUT = "CodeInput"; + _KeyName.COMPOSE = "Compose"; + _KeyName.CONTROL = "Control"; + _KeyName.CRSEL = "Crsel"; + _KeyName.CONVERT = "Convert"; + _KeyName.COPY = "Copy"; + _KeyName.CUT = "Cut"; + _KeyName.DECIMAL = "Decimal"; + _KeyName.DIVIDE = "Divide"; + _KeyName.DOWN = "Down"; + _KeyName.DOWN_LEFT = "DownLeft"; + _KeyName.DOWN_RIGHT = "DownRight"; + _KeyName.EJECT = "Eject"; + _KeyName.END = "End"; + _KeyName.ENTER = "Enter"; + _KeyName.ERASE_EOF = "EraseEof"; + _KeyName.EXECUTE = "Execute"; + _KeyName.EXSEL = "Exsel"; + _KeyName.FN = "Fn"; + _KeyName.F1 = "F1"; + _KeyName.F2 = "F2"; + _KeyName.F3 = "F3"; + _KeyName.F4 = "F4"; + _KeyName.F5 = "F5"; + _KeyName.F6 = "F6"; + _KeyName.F7 = "F7"; + _KeyName.F8 = "F8"; + _KeyName.F9 = "F9"; + _KeyName.F10 = "F10"; + _KeyName.F11 = "F11"; + _KeyName.F12 = "F12"; + _KeyName.F13 = "F13"; + _KeyName.F14 = "F14"; + _KeyName.F15 = "F15"; + _KeyName.F16 = "F16"; + _KeyName.F17 = "F17"; + _KeyName.F18 = "F18"; + _KeyName.F19 = "F19"; + _KeyName.F20 = "F20"; + _KeyName.F21 = "F21"; + _KeyName.F22 = "F22"; + _KeyName.F23 = "F23"; + _KeyName.F24 = "F24"; + _KeyName.FINAL_MODE = "FinalMode"; + _KeyName.FIND = "Find"; + _KeyName.FULL_WIDTH = "FullWidth"; + _KeyName.HALF_WIDTH = "HalfWidth"; + _KeyName.HANGUL_MODE = "HangulMode"; + _KeyName.HANJA_MODE = "HanjaMode"; + _KeyName.HELP = "Help"; + _KeyName.HIRAGANA = "Hiragana"; + _KeyName.HOME = "Home"; + _KeyName.INSERT = "Insert"; + _KeyName.JAPANESE_HIRAGANA = "JapaneseHiragana"; + _KeyName.JAPANESE_KATAKANA = "JapaneseKatakana"; + _KeyName.JAPANESE_ROMAJI = "JapaneseRomaji"; + _KeyName.JUNJA_MODE = "JunjaMode"; + _KeyName.KANA_MODE = "KanaMode"; + _KeyName.KANJI_MODE = "KanjiMode"; + _KeyName.KATAKANA = "Katakana"; + _KeyName.LAUNCH_APPLICATION_1 = "LaunchApplication1"; + _KeyName.LAUNCH_APPLICATION_2 = "LaunchApplication2"; + _KeyName.LAUNCH_MAIL = "LaunchMail"; + _KeyName.LEFT = "Left"; + _KeyName.MENU = "Menu"; + _KeyName.META = "Meta"; + _KeyName.MEDIA_NEXT_TRACK = "MediaNextTrack"; + _KeyName.MEDIA_PAUSE_PLAY = "MediaPlayPause"; + _KeyName.MEDIA_PREVIOUS_TRACK = "MediaPreviousTrack"; + _KeyName.MEDIA_STOP = "MediaStop"; + _KeyName.MODE_CHANGE = "ModeChange"; + _KeyName.NEXT_CANDIDATE = "NextCandidate"; + _KeyName.NON_CONVERT = "Nonconvert"; + _KeyName.NUM_LOCK = "NumLock"; + _KeyName.PAGE_DOWN = "PageDown"; + _KeyName.PAGE_UP = "PageUp"; + _KeyName.PASTE = "Paste"; + _KeyName.PAUSE = "Pause"; + _KeyName.PLAY = "Play"; + _KeyName.POWER = "Power"; + _KeyName.PREVIOUS_CANDIDATE = "PreviousCandidate"; + _KeyName.PRINT_SCREEN = "PrintScreen"; + _KeyName.PROCESS = "Process"; + _KeyName.PROPS = "Props"; + _KeyName.RIGHT = "Right"; + _KeyName.ROMAN_CHARACTERS = "RomanCharacters"; + _KeyName.SCROLL = "Scroll"; + _KeyName.SELECT = "Select"; + _KeyName.SELECT_MEDIA = "SelectMedia"; + _KeyName.SEPARATOR = "Separator"; + _KeyName.SHIFT = "Shift"; + _KeyName.SOFT_1 = "Soft1"; + _KeyName.SOFT_2 = "Soft2"; + _KeyName.SOFT_3 = "Soft3"; + _KeyName.SOFT_4 = "Soft4"; + _KeyName.STOP = "Stop"; + _KeyName.SUBTRACT = "Subtract"; + _KeyName.SYMBOL_LOCK = "SymbolLock"; + _KeyName.UP = "Up"; + _KeyName.UP_LEFT = "UpLeft"; + _KeyName.UP_RIGHT = "UpRight"; + _KeyName.UNDO = "Undo"; + _KeyName.VOLUME_DOWN = "VolumeDown"; + _KeyName.VOLUMN_MUTE = "VolumeMute"; + _KeyName.VOLUMN_UP = "VolumeUp"; + _KeyName.WIN = "Win"; + _KeyName.ZOOM = "Zoom"; + _KeyName.BACKSPACE = "Backspace"; + _KeyName.TAB = "Tab"; + _KeyName.CANCEL = "Cancel"; + _KeyName.ESC = "Esc"; + _KeyName.SPACEBAR = "Spacebar"; + _KeyName.DEL = "Del"; + _KeyName.DEAD_GRAVE = "DeadGrave"; + _KeyName.DEAD_EACUTE = "DeadEacute"; + _KeyName.DEAD_CIRCUMFLEX = "DeadCircumflex"; + _KeyName.DEAD_TILDE = "DeadTilde"; + _KeyName.DEAD_MACRON = "DeadMacron"; + _KeyName.DEAD_BREVE = "DeadBreve"; + _KeyName.DEAD_ABOVE_DOT = "DeadAboveDot"; + _KeyName.DEAD_UMLAUT = "DeadUmlaut"; + _KeyName.DEAD_ABOVE_RING = "DeadAboveRing"; + _KeyName.DEAD_DOUBLEACUTE = "DeadDoubleacute"; + _KeyName.DEAD_CARON = "DeadCaron"; + _KeyName.DEAD_CEDILLA = "DeadCedilla"; + _KeyName.DEAD_OGONEK = "DeadOgonek"; + _KeyName.DEAD_IOTA = "DeadIota"; + _KeyName.DEAD_VOICED_SOUND = "DeadVoicedSound"; + _KeyName.DEC_SEMIVOICED_SOUND = "DeadSemivoicedSound"; + _KeyName.UNIDENTIFIED = "Unidentified"; + const _stream = Symbol('_stream'); + const _keyDownList = Symbol('_keyDownList'); + const _capsLockOn = Symbol('_capsLockOn'); + const _determineKeyCodeForKeypress = Symbol('_determineKeyCodeForKeypress'); + const _findCharCodeKeyDown = Symbol('_findCharCodeKeyDown'); + const _firesKeyPressEvent = Symbol('_firesKeyPressEvent'); + const _normalizeKeyCodes = Symbol('_normalizeKeyCodes'); + class _KeyboardEventHandler extends EventStreamProvider$(KeyEvent) { + forTarget(e, opts) { + let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; + let handler = new _KeyboardEventHandler.initializeAllEventListeners(this[_type], e); + return handler[_stream]; + } + _KeyboardEventHandler(type) { + this[_keyDownList] = dart.list([], KeyEvent); + this[_type] = type; + this[_stream] = new _CustomKeyEventStreamImpl('event'); + this[_target] = null; + super.EventStreamProvider(_KeyboardEventHandler._EVENT_TYPE); + } + initializeAllEventListeners(type, target) { + this[_keyDownList] = dart.list([], KeyEvent); + this[_type] = type; + this[_target] = target; + this[_stream] = null; + super.EventStreamProvider(_KeyboardEventHandler._EVENT_TYPE); + dart.throw('Key event handling not supported in DDC'); + } + get [_capsLockOn]() { + return this[_keyDownList][dartx.any](dart.fn(element => dart.equals(dart.dload(element, 'keyCode'), KeyCode.CAPS_LOCK), core.bool, [dart.dynamic])); + } + [_determineKeyCodeForKeypress](event) { + for (let prevEvent of this[_keyDownList]) { + if (prevEvent[_shadowCharCode] == event.charCode) { + return prevEvent.keyCode; + } + if ((dart.notNull(event.shiftKey) || dart.notNull(this[_capsLockOn])) && dart.notNull(event.charCode) >= dart.notNull("A"[dartx.codeUnits][dartx.get](0)) && dart.notNull(event.charCode) <= dart.notNull("Z"[dartx.codeUnits][dartx.get](0)) && dart.notNull(event.charCode) + dart.notNull(_KeyboardEventHandler._ROMAN_ALPHABET_OFFSET) == prevEvent[_shadowCharCode]) { + return prevEvent.keyCode; + } + } + return KeyCode.UNKNOWN; + } + [_findCharCodeKeyDown](event) { + if (event.keyLocation == 3) { + switch (event.keyCode) { + case KeyCode.NUM_ZERO: + { + return KeyCode.ZERO; + } + case KeyCode.NUM_ONE: + { + return KeyCode.ONE; + } + case KeyCode.NUM_TWO: + { + return KeyCode.TWO; + } + case KeyCode.NUM_THREE: + { + return KeyCode.THREE; + } + case KeyCode.NUM_FOUR: + { + return KeyCode.FOUR; + } + case KeyCode.NUM_FIVE: + { + return KeyCode.FIVE; + } + case KeyCode.NUM_SIX: + { + return KeyCode.SIX; + } + case KeyCode.NUM_SEVEN: + { + return KeyCode.SEVEN; + } + case KeyCode.NUM_EIGHT: + { + return KeyCode.EIGHT; + } + case KeyCode.NUM_NINE: + { + return KeyCode.NINE; + } + case KeyCode.NUM_MULTIPLY: + { + return 42; + } + case KeyCode.NUM_PLUS: + { + return 43; + } + case KeyCode.NUM_MINUS: + { + return 45; + } + case KeyCode.NUM_PERIOD: + { + return 46; + } + case KeyCode.NUM_DIVISION: + { + return 47; + } + } + } else if (dart.notNull(event.keyCode) >= 65 && dart.notNull(event.keyCode) <= 90) { + return dart.notNull(event.keyCode) + dart.notNull(_KeyboardEventHandler._ROMAN_ALPHABET_OFFSET); + } + switch (event.keyCode) { + case KeyCode.SEMICOLON: + { + return KeyCode.FF_SEMICOLON; + } + case KeyCode.EQUALS: + { + return KeyCode.FF_EQUALS; + } + case KeyCode.COMMA: + { + return 44; + } + case KeyCode.DASH: + { + return 45; + } + case KeyCode.PERIOD: + { + return 46; + } + case KeyCode.SLASH: + { + return 47; + } + case KeyCode.APOSTROPHE: + { + return 96; + } + case KeyCode.OPEN_SQUARE_BRACKET: + { + return 91; + } + case KeyCode.BACKSLASH: + { + return 92; + } + case KeyCode.CLOSE_SQUARE_BRACKET: + { + return 93; + } + case KeyCode.SINGLE_QUOTE: + { + return 39; + } + } + return event.keyCode; + } + [_firesKeyPressEvent](event) { + if (!dart.notNull(html_common.Device.isIE) && !dart.notNull(html_common.Device.isWebKit)) { + return true; + } + if (dart.notNull(html_common.Device.userAgent[dartx.contains]('Mac')) && dart.notNull(event.altKey)) { + return KeyCode.isCharacterKey(event.keyCode); + } + if (dart.notNull(event.altKey) && !dart.notNull(event.ctrlKey)) { + return false; + } + if (!dart.notNull(event.shiftKey) && (this[_keyDownList][dartx.last].keyCode == KeyCode.CTRL || this[_keyDownList][dartx.last].keyCode == KeyCode.ALT || dart.notNull(html_common.Device.userAgent[dartx.contains]('Mac')) && this[_keyDownList][dartx.last].keyCode == KeyCode.META)) { + return false; + } + if (dart.notNull(html_common.Device.isWebKit) && dart.notNull(event.ctrlKey) && dart.notNull(event.shiftKey) && (event.keyCode == KeyCode.BACKSLASH || event.keyCode == KeyCode.OPEN_SQUARE_BRACKET || event.keyCode == KeyCode.CLOSE_SQUARE_BRACKET || event.keyCode == KeyCode.TILDE || event.keyCode == KeyCode.SEMICOLON || event.keyCode == KeyCode.DASH || event.keyCode == KeyCode.EQUALS || event.keyCode == KeyCode.COMMA || event.keyCode == KeyCode.PERIOD || event.keyCode == KeyCode.SLASH || event.keyCode == KeyCode.APOSTROPHE || event.keyCode == KeyCode.SINGLE_QUOTE)) { + return false; + } + switch (event.keyCode) { + case KeyCode.ENTER: + { + return !dart.notNull(html_common.Device.isIE); + } + case KeyCode.ESC: + { + return !dart.notNull(html_common.Device.isWebKit); + } + } + return KeyCode.isCharacterKey(event.keyCode); + } + [_normalizeKeyCodes](event) { + if (dart.notNull(html_common.Device.isFirefox)) { + switch (event.keyCode) { + case KeyCode.FF_EQUALS: + { + return KeyCode.EQUALS; + } + case KeyCode.FF_SEMICOLON: + { + return KeyCode.SEMICOLON; + } + case KeyCode.MAC_FF_META: + { + return KeyCode.META; + } + case KeyCode.WIN_KEY_FF_LINUX: + { + return KeyCode.WIN_KEY; + } + } + } + return event.keyCode; + } + processKeyDown(e) { + if (dart.notNull(this[_keyDownList][dartx.length]) > 0 && (this[_keyDownList][dartx.last].keyCode == KeyCode.CTRL && !dart.notNull(e.ctrlKey) || this[_keyDownList][dartx.last].keyCode == KeyCode.ALT && !dart.notNull(e.altKey) || dart.notNull(html_common.Device.userAgent[dartx.contains]('Mac')) && this[_keyDownList][dartx.last].keyCode == KeyCode.META && !dart.notNull(e.metaKey))) { + this[_keyDownList][dartx.clear](); + } + let event = new KeyEvent.wrap(e); + event[_shadowKeyCode] = this[_normalizeKeyCodes](event); + event[_shadowCharCode] = this[_findCharCodeKeyDown](event); + if (dart.notNull(this[_keyDownList][dartx.length]) > 0 && event.keyCode != this[_keyDownList][dartx.last].keyCode && !dart.notNull(this[_firesKeyPressEvent](event))) { + this.processKeyPress(e); + } + this[_keyDownList][dartx.add](event); + this[_stream].add(event); + } + processKeyPress(event) { + let e = new KeyEvent.wrap(event); + if (dart.notNull(html_common.Device.isIE)) { + if (e.keyCode == KeyCode.ENTER || e.keyCode == KeyCode.ESC) { + e[_shadowCharCode] = 0; + } else { + e[_shadowCharCode] = e.keyCode; + } + } else if (dart.notNull(html_common.Device.isOpera)) { + e[_shadowCharCode] = dart.notNull(KeyCode.isCharacterKey(e.keyCode)) ? e.keyCode : 0; + } + e[_shadowKeyCode] = this[_determineKeyCodeForKeypress](e); + if (e[_shadowKeyIdentifier] != null && dart.notNull(_KeyboardEventHandler._keyIdentifier.containsKey(e[_shadowKeyIdentifier]))) { + e[_shadowKeyCode] = _KeyboardEventHandler._keyIdentifier.get(e[_shadowKeyIdentifier]); + } + e[_shadowAltKey] = this[_keyDownList][dartx.any](dart.fn(element => dart.as(dart.dload(element, 'altKey'), core.bool), core.bool, [dart.dynamic])); + this[_stream].add(e); + } + processKeyUp(event) { + let e = new KeyEvent.wrap(event); + let toRemove = null; + for (let key of this[_keyDownList]) { + if (key.keyCode == e.keyCode) { + toRemove = key; + } + } + if (toRemove != null) { + this[_keyDownList][dartx.removeWhere](dart.fn(element => dart.equals(element, toRemove), core.bool, [dart.dynamic])); + } else if (dart.notNull(this[_keyDownList][dartx.length]) > 0) { + this[_keyDownList][dartx.removeLast](); + } + this[_stream].add(e); + } + } + dart.defineNamedConstructor(_KeyboardEventHandler, 'initializeAllEventListeners'); + dart.setSignature(_KeyboardEventHandler, { + constructors: () => ({ + _KeyboardEventHandler: [_KeyboardEventHandler, [core.String]], + initializeAllEventListeners: [_KeyboardEventHandler, [core.String, EventTarget]] + }), + methods: () => ({ + forTarget: [CustomStream$(KeyEvent), [EventTarget], {useCapture: core.bool}], + [_determineKeyCodeForKeypress]: [core.int, [KeyboardEvent]], + [_findCharCodeKeyDown]: [core.int, [KeyboardEvent]], + [_firesKeyPressEvent]: [core.bool, [KeyEvent]], + [_normalizeKeyCodes]: [core.int, [KeyboardEvent]], + processKeyDown: [dart.void, [KeyboardEvent]], + processKeyPress: [dart.void, [KeyboardEvent]], + processKeyUp: [dart.void, [KeyboardEvent]] + }) + }); + _KeyboardEventHandler._EVENT_TYPE = 'KeyEvent'; + _KeyboardEventHandler._keyIdentifier = dart.const(dart.map({Up: KeyCode.UP, Down: KeyCode.DOWN, Left: KeyCode.LEFT, Right: KeyCode.RIGHT, Enter: KeyCode.ENTER, F1: KeyCode.F1, F2: KeyCode.F2, F3: KeyCode.F3, F4: KeyCode.F4, F5: KeyCode.F5, F6: KeyCode.F6, F7: KeyCode.F7, F8: KeyCode.F8, F9: KeyCode.F9, F10: KeyCode.F10, F11: KeyCode.F11, F12: KeyCode.F12, 'U+007F': KeyCode.DELETE, Home: KeyCode.HOME, End: KeyCode.END, PageUp: KeyCode.PAGE_UP, PageDown: KeyCode.PAGE_DOWN, Insert: KeyCode.INSERT})); + dart.defineLazyProperties(_KeyboardEventHandler, { + get _ROMAN_ALPHABET_OFFSET() { + return dart.notNull("a"[dartx.codeUnits][dartx.get](0)) - dart.notNull("A"[dartx.codeUnits][dartx.get](0)); + } + }); + class KeyboardEventStream extends core.Object { + static onKeyPress(target) { + return new _KeyboardEventHandler('keypress').forTarget(target); + } + static onKeyUp(target) { + return new _KeyboardEventHandler('keyup').forTarget(target); + } + static onKeyDown(target) { + return new _KeyboardEventHandler('keydown').forTarget(target); + } + } + dart.setSignature(KeyboardEventStream, { + statics: () => ({ + onKeyPress: [CustomStream$(KeyEvent), [EventTarget]], + onKeyUp: [CustomStream$(KeyEvent), [EventTarget]], + onKeyDown: [CustomStream$(KeyEvent), [EventTarget]] + }), + names: ['onKeyPress', 'onKeyUp', 'onKeyDown'] + }); + const _validators = Symbol('_validators'); + class NodeValidatorBuilder extends core.Object { + NodeValidatorBuilder() { + this[_validators] = dart.list([], NodeValidator); + } + common() { + this[_validators] = dart.list([], NodeValidator); + this.allowHtml5(); + this.allowTemplating(); + } + allowNavigation(uriPolicy) { + if (uriPolicy === void 0) + uriPolicy = null; + if (uriPolicy == null) { + uriPolicy = UriPolicy.new(); + } + this.add(_SimpleNodeValidator.allowNavigation(uriPolicy)); + } + allowImages(uriPolicy) { + if (uriPolicy === void 0) + uriPolicy = null; + if (uriPolicy == null) { + uriPolicy = UriPolicy.new(); + } + this.add(_SimpleNodeValidator.allowImages(uriPolicy)); + } + allowTextElements() { + this.add(_SimpleNodeValidator.allowTextElements()); + } + allowInlineStyles(opts) { + let tagName = opts && 'tagName' in opts ? opts.tagName : null; + if (tagName == null) { + tagName = '*'; + } else { + tagName = tagName[dartx.toUpperCase](); + } + this.add(new _SimpleNodeValidator(null, {allowedAttributes: dart.list([`${tagName}::style`], core.String)})); + } + allowHtml5(opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + this.add(new _Html5NodeValidator({uriPolicy: uriPolicy})); + } + allowSvg() { + dart.throw('SVG not supported with DDC'); + } + allowCustomElement(tagName, opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + let attributes = opts && 'attributes' in opts ? opts.attributes : null; + let uriAttributes = opts && 'uriAttributes' in opts ? opts.uriAttributes : null; + let tagNameUpper = tagName[dartx.toUpperCase](); + let attrs = null; + if (attributes != null) { + attrs = attributes[dartx.map](dart.fn(name => `${tagNameUpper}::${dart.dsend(name, 'toLowerCase')}`, core.String, [dart.dynamic])); + } + let uriAttrs = null; + if (uriAttributes != null) { + uriAttrs = uriAttributes[dartx.map](dart.fn(name => `${tagNameUpper}::${dart.dsend(name, 'toLowerCase')}`, core.String, [dart.dynamic])); + } + if (uriPolicy == null) { + uriPolicy = UriPolicy.new(); + } + this.add(new _CustomElementNodeValidator(uriPolicy, dart.list([tagNameUpper], core.String), dart.as(attrs, core.Iterable$(core.String)), dart.as(uriAttrs, core.Iterable$(core.String)), false, true)); + } + allowTagExtension(tagName, baseName, opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + let attributes = opts && 'attributes' in opts ? opts.attributes : null; + let uriAttributes = opts && 'uriAttributes' in opts ? opts.uriAttributes : null; + let baseNameUpper = baseName[dartx.toUpperCase](); + let tagNameUpper = tagName[dartx.toUpperCase](); + let attrs = null; + if (attributes != null) { + attrs = attributes[dartx.map](dart.fn(name => `${baseNameUpper}::${dart.dsend(name, 'toLowerCase')}`, core.String, [dart.dynamic])); + } + let uriAttrs = null; + if (uriAttributes != null) { + uriAttrs = uriAttributes[dartx.map](dart.fn(name => `${baseNameUpper}::${dart.dsend(name, 'toLowerCase')}`, core.String, [dart.dynamic])); + } + if (uriPolicy == null) { + uriPolicy = UriPolicy.new(); + } + this.add(new _CustomElementNodeValidator(uriPolicy, dart.list([tagNameUpper, baseNameUpper], core.String), dart.as(attrs, core.Iterable$(core.String)), dart.as(uriAttrs, core.Iterable$(core.String)), true, false)); + } + allowElement(tagName, opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + let attributes = opts && 'attributes' in opts ? opts.attributes : null; + let uriAttributes = opts && 'uriAttributes' in opts ? opts.uriAttributes : null; + this.allowCustomElement(tagName, {uriPolicy: uriPolicy, attributes: attributes, uriAttributes: uriAttributes}); + } + allowTemplating() { + this.add(new _TemplatingNodeValidator()); + } + add(validator) { + this[_validators][dartx.add](validator); + } + allowsElement(element) { + return this[_validators][dartx.any](dart.fn(v => dart.as(dart.dsend(v, 'allowsElement', element), core.bool), core.bool, [dart.dynamic])); + } + allowsAttribute(element, attributeName, value) { + return this[_validators][dartx.any](dart.fn(v => dart.as(dart.dsend(v, 'allowsAttribute', element, attributeName, value), core.bool), core.bool, [dart.dynamic])); + } + } + NodeValidatorBuilder[dart.implements] = () => [NodeValidator]; + dart.defineNamedConstructor(NodeValidatorBuilder, 'common'); + dart.setSignature(NodeValidatorBuilder, { + constructors: () => ({ + NodeValidatorBuilder: [NodeValidatorBuilder, []], + common: [NodeValidatorBuilder, []] + }), + methods: () => ({ + allowNavigation: [dart.void, [], [UriPolicy]], + allowImages: [dart.void, [], [UriPolicy]], + allowTextElements: [dart.void, []], + allowInlineStyles: [dart.void, [], {tagName: core.String}], + allowHtml5: [dart.void, [], {uriPolicy: UriPolicy}], + allowSvg: [dart.void, []], + allowCustomElement: [dart.void, [core.String], {uriPolicy: UriPolicy, attributes: core.Iterable$(core.String), uriAttributes: core.Iterable$(core.String)}], + allowTagExtension: [dart.void, [core.String, core.String], {uriPolicy: UriPolicy, attributes: core.Iterable$(core.String), uriAttributes: core.Iterable$(core.String)}], + allowElement: [dart.void, [core.String], {uriPolicy: UriPolicy, attributes: core.Iterable$(core.String), uriAttributes: core.Iterable$(core.String)}], + allowTemplating: [dart.void, []], + add: [dart.void, [NodeValidator]], + allowsElement: [core.bool, [Element]], + allowsAttribute: [core.bool, [Element, core.String, core.String]] + }) + }); + class _SimpleNodeValidator extends core.Object { + static allowNavigation(uriPolicy) { + return new _SimpleNodeValidator(uriPolicy, {allowedElements: dart.const(dart.list(['A', 'FORM'], core.String)), allowedAttributes: dart.const(dart.list(['A::accesskey', 'A::coords', 'A::hreflang', 'A::name', 'A::shape', 'A::tabindex', 'A::target', 'A::type', 'FORM::accept', 'FORM::autocomplete', 'FORM::enctype', 'FORM::method', 'FORM::name', 'FORM::novalidate', 'FORM::target'], core.String)), allowedUriAttributes: dart.const(dart.list(['A::href', 'FORM::action'], core.String))}); + } + static allowImages(uriPolicy) { + return new _SimpleNodeValidator(uriPolicy, {allowedElements: dart.const(dart.list(['IMG'], core.String)), allowedAttributes: dart.const(dart.list(['IMG::align', 'IMG::alt', 'IMG::border', 'IMG::height', 'IMG::hspace', 'IMG::ismap', 'IMG::name', 'IMG::usemap', 'IMG::vspace', 'IMG::width'], core.String)), allowedUriAttributes: dart.const(dart.list(['IMG::src'], core.String))}); + } + static allowTextElements() { + return new _SimpleNodeValidator(null, {allowedElements: dart.const(dart.list(['B', 'BLOCKQUOTE', 'BR', 'EM', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HR', 'I', 'LI', 'OL', 'P', 'SPAN', 'UL'], core.String))}); + } + _SimpleNodeValidator(uriPolicy, opts) { + let allowedElements = opts && 'allowedElements' in opts ? opts.allowedElements : null; + let allowedAttributes = opts && 'allowedAttributes' in opts ? opts.allowedAttributes : null; + let allowedUriAttributes = opts && 'allowedUriAttributes' in opts ? opts.allowedUriAttributes : null; + this.allowedElements = core.Set$(core.String).new(); + this.allowedAttributes = core.Set$(core.String).new(); + this.allowedUriAttributes = core.Set$(core.String).new(); + this.uriPolicy = uriPolicy; + this.allowedElements.addAll(dart.as((allowedElements != null ? allowedElements : dart.const([])), core.Iterable$(core.String))); + allowedAttributes = dart.as((allowedAttributes != null ? allowedAttributes : dart.const([])), core.Iterable$(core.String)); + allowedUriAttributes = dart.as((allowedUriAttributes != null ? allowedUriAttributes : dart.const([])), core.Iterable$(core.String)); + let legalAttributes = allowedAttributes[dartx.where](dart.fn(x => !dart.notNull(_Html5NodeValidator._uriAttributes[dartx.contains](x)), core.bool, [dart.dynamic])); + let extraUriAttributes = allowedAttributes[dartx.where](dart.fn(x => _Html5NodeValidator._uriAttributes[dartx.contains](x), core.bool, [dart.dynamic])); + this.allowedAttributes.addAll(legalAttributes); + this.allowedUriAttributes.addAll(allowedUriAttributes); + this.allowedUriAttributes.addAll(extraUriAttributes); + } + allowsElement(element) { + return this.allowedElements.contains(Element._safeTagName(element)); + } + allowsAttribute(element, attributeName, value) { + let tagName = Element._safeTagName(element); + if (dart.notNull(this.allowedUriAttributes.contains(`${tagName}::${attributeName}`))) { + return this.uriPolicy.allowsUri(value); + } else if (dart.notNull(this.allowedUriAttributes.contains(`*::${attributeName}`))) { + return this.uriPolicy.allowsUri(value); + } else if (dart.notNull(this.allowedAttributes.contains(`${tagName}::${attributeName}`))) { + return true; + } else if (dart.notNull(this.allowedAttributes.contains(`*::${attributeName}`))) { + return true; + } else if (dart.notNull(this.allowedAttributes.contains(`${tagName}::*`))) { + return true; + } else if (dart.notNull(this.allowedAttributes.contains('*::*'))) { + return true; + } + return false; + } + } + _SimpleNodeValidator[dart.implements] = () => [NodeValidator]; + dart.setSignature(_SimpleNodeValidator, { + constructors: () => ({ + allowNavigation: [_SimpleNodeValidator, [UriPolicy]], + allowImages: [_SimpleNodeValidator, [UriPolicy]], + allowTextElements: [_SimpleNodeValidator, []], + _SimpleNodeValidator: [_SimpleNodeValidator, [UriPolicy], {allowedElements: core.Iterable$(core.String), allowedAttributes: core.Iterable$(core.String), allowedUriAttributes: core.Iterable$(core.String)}] + }), + methods: () => ({ + allowsElement: [core.bool, [Element]], + allowsAttribute: [core.bool, [Element, core.String, core.String]] + }) + }); + class _CustomElementNodeValidator extends _SimpleNodeValidator { + _CustomElementNodeValidator(uriPolicy, allowedElements, allowedAttributes, allowedUriAttributes, allowTypeExtension, allowCustomTag) { + this.allowTypeExtension = allowTypeExtension == true; + this.allowCustomTag = allowCustomTag == true; + super._SimpleNodeValidator(uriPolicy, {allowedElements: allowedElements, allowedAttributes: allowedAttributes, allowedUriAttributes: allowedUriAttributes}); + } + allowsElement(element) { + if (dart.notNull(this.allowTypeExtension)) { + let isAttr = element.attributes.get('is'); + if (isAttr != null) { + return dart.notNull(this.allowedElements.contains(isAttr[dartx.toUpperCase]())) && dart.notNull(this.allowedElements.contains(Element._safeTagName(element))); + } + } + return dart.notNull(this.allowCustomTag) && dart.notNull(this.allowedElements.contains(Element._safeTagName(element))); + } + allowsAttribute(element, attributeName, value) { + if (dart.notNull(this.allowsElement(element))) { + if (dart.notNull(this.allowTypeExtension) && attributeName == 'is' && dart.notNull(this.allowedElements.contains(value[dartx.toUpperCase]()))) { + return true; + } + return super.allowsAttribute(element, attributeName, value); + } + return false; + } + } + dart.setSignature(_CustomElementNodeValidator, { + constructors: () => ({_CustomElementNodeValidator: [_CustomElementNodeValidator, [UriPolicy, core.Iterable$(core.String), core.Iterable$(core.String), core.Iterable$(core.String), core.bool, core.bool]]}) + }); + const _templateAttrs = Symbol('_templateAttrs'); + class _TemplatingNodeValidator extends _SimpleNodeValidator { + _TemplatingNodeValidator() { + this[_templateAttrs] = core.Set$(core.String).from(_TemplatingNodeValidator._TEMPLATE_ATTRS); + super._SimpleNodeValidator(null, {allowedElements: dart.list(['TEMPLATE'], core.String), allowedAttributes: _TemplatingNodeValidator._TEMPLATE_ATTRS[dartx.map](dart.fn(attr => `TEMPLATE::${attr}`, core.String, [dart.dynamic]))}); + } + allowsAttribute(element, attributeName, value) { + if (dart.notNull(super.allowsAttribute(element, attributeName, value))) { + return true; + } + if (attributeName == 'template' && value == "") { + return true; + } + if (element.attributes.get('template') == "") { + return this[_templateAttrs].contains(attributeName); + } + return false; + } + } + dart.setSignature(_TemplatingNodeValidator, { + constructors: () => ({_TemplatingNodeValidator: [_TemplatingNodeValidator, []]}) + }); + _TemplatingNodeValidator._TEMPLATE_ATTRS = dart.const(dart.list(['bind', 'if', 'ref', 'repeat', 'syntax'], core.String)); + class ReadyState extends core.Object {} + ReadyState.LOADING = "loading"; + ReadyState.INTERACTIVE = "interactive"; + ReadyState.COMPLETE = "complete"; + const _list = Symbol('_list'); + const _WrappedList$ = dart.generic(function(E) { + class _WrappedList extends collection.ListBase$(E) { + _WrappedList(list) { + this[_list] = list; + } + get iterator() { + return new (_WrappedIterator$(E))(this[_list][dartx.iterator]); + } + get length() { + return this[_list][dartx.length]; + } + add(element) { + dart.as(element, E); + this[_list][dartx.add](element); + } + remove(element) { + return this[_list][dartx.remove](element); + } + clear() { + this[_list][dartx.clear](); + } + get(index) { + return dart.as(this[_list][dartx.get](index), E); + } + set(index, value) { + dart.as(value, E); + this[_list][dartx.set](index, value); + return value; + } + set length(newLength) { + this[_list][dartx.length] = newLength; + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.as(compare, dart.functionType(core.int, [E, E])); + this[_list][dartx.sort](compare); + } + indexOf(element, start) { + if (start === void 0) + start = 0; + return this[_list][dartx.indexOf](element, start); + } + lastIndexOf(element, start) { + if (start === void 0) + start = null; + return this[_list][dartx.lastIndexOf](element, start); + } + insert(index, element) { + dart.as(element, E); + return this[_list][dartx.insert](index, element); + } + removeAt(index) { + return dart.as(this[_list][dartx.removeAt](index), E); + } + setRange(start, end, iterable, skipCount) { + dart.as(iterable, core.Iterable$(E)); + if (skipCount === void 0) + skipCount = 0; + this[_list][dartx.setRange](start, end, iterable, skipCount); + } + removeRange(start, end) { + this[_list][dartx.removeRange](start, end); + } + replaceRange(start, end, iterable) { + dart.as(iterable, core.Iterable$(E)); + this[_list][dartx.replaceRange](start, end, iterable); + } + fillRange(start, end, fillValue) { + if (fillValue === void 0) + fillValue = null; + dart.as(fillValue, E); + this[_list][dartx.fillRange](start, end, fillValue); + } + get rawList() { + return dart.as(this[_list], core.List$(Node)); + } + } + _WrappedList[dart.implements] = () => [html_common.NodeListWrapper]; + dart.setSignature(_WrappedList, { + constructors: () => ({_WrappedList: [_WrappedList$(E), [core.List]]}), + methods: () => ({ + add: [dart.void, [E]], + get: [E, [core.int]], + set: [dart.void, [core.int, E]], + sort: [dart.void, [], [dart.functionType(core.int, [E, E])]], + insert: [dart.void, [core.int, E]], + removeAt: [E, [core.int]], + setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int]], + replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]], + fillRange: [dart.void, [core.int, core.int], [E]] + }) + }); + dart.defineExtensionMembers(_WrappedList, [ + 'add', + 'remove', + 'clear', + 'get', + 'set', + 'sort', + 'indexOf', + 'lastIndexOf', + 'insert', + 'removeAt', + 'setRange', + 'removeRange', + 'replaceRange', + 'fillRange', + 'iterator', + 'length', + 'length' + ]); + return _WrappedList; + }); + let _WrappedList = _WrappedList$(); + const _iterator = Symbol('_iterator'); + const _WrappedIterator$ = dart.generic(function(E) { + class _WrappedIterator extends core.Object { + _WrappedIterator(iterator) { + this[_iterator] = iterator; + } + moveNext() { + return this[_iterator].moveNext(); + } + get current() { + return dart.as(this[_iterator].current, E); + } + } + _WrappedIterator[dart.implements] = () => [core.Iterator$(E)]; + dart.setSignature(_WrappedIterator, { + constructors: () => ({_WrappedIterator: [_WrappedIterator$(E), [core.Iterator]]}), + methods: () => ({moveNext: [core.bool, []]}) + }); + return _WrappedIterator; + }); + let _WrappedIterator = _WrappedIterator$(); + class _HttpRequestUtils extends core.Object { + static get(url, onComplete, withCredentials) { + let request = HttpRequest.new(); + request.open('GET', url, {async: true}); + request.withCredentials = withCredentials; + request.onReadyStateChange.listen(dart.fn(e => { + if (request.readyState == HttpRequest.DONE) { + onComplete(request); + } + })); + request.send(); + return request; + } + } + dart.setSignature(_HttpRequestUtils, { + statics: () => ({get: [HttpRequest, [core.String, dart.functionType(dart.dynamic, [HttpRequest]), core.bool]]}), + names: ['get'] + }); + const _array = Symbol('_array'); + const _position = Symbol('_position'); + const _length = Symbol('_length'); + const _current = Symbol('_current'); + const FixedSizeListIterator$ = dart.generic(function(T) { + class FixedSizeListIterator extends core.Object { + FixedSizeListIterator(array) { + this[_array] = array; + this[_position] = -1; + this[_length] = array[dartx.length]; + this[_current] = null; + } + moveNext() { + let nextPosition = dart.notNull(this[_position]) + 1; + if (dart.notNull(nextPosition) < dart.notNull(this[_length])) { + this[_current] = this[_array][dartx.get](nextPosition); + this[_position] = nextPosition; + return true; + } + this[_current] = null; + this[_position] = this[_length]; + return false; + } + get current() { + return this[_current]; + } + } + FixedSizeListIterator[dart.implements] = () => [core.Iterator$(T)]; + dart.setSignature(FixedSizeListIterator, { + constructors: () => ({FixedSizeListIterator: [FixedSizeListIterator$(T), [core.List$(T)]]}), + methods: () => ({moveNext: [core.bool, []]}) + }); + return FixedSizeListIterator; + }); + let FixedSizeListIterator = FixedSizeListIterator$(); + const _VariableSizeListIterator$ = dart.generic(function(T) { + class _VariableSizeListIterator extends core.Object { + _VariableSizeListIterator(array) { + this[_array] = array; + this[_position] = -1; + this[_current] = null; + } + moveNext() { + let nextPosition = dart.notNull(this[_position]) + 1; + if (dart.notNull(nextPosition) < dart.notNull(this[_array][dartx.length])) { + this[_current] = this[_array][dartx.get](nextPosition); + this[_position] = nextPosition; + return true; + } + this[_current] = null; + this[_position] = this[_array][dartx.length]; + return false; + } + get current() { + return this[_current]; + } + } + _VariableSizeListIterator[dart.implements] = () => [core.Iterator$(T)]; + dart.setSignature(_VariableSizeListIterator, { + constructors: () => ({_VariableSizeListIterator: [_VariableSizeListIterator$(T), [core.List$(T)]]}), + methods: () => ({moveNext: [core.bool, []]}) + }); + return _VariableSizeListIterator; + }); + let _VariableSizeListIterator = _VariableSizeListIterator$(); + function _convertNativeToDart_Window(win) { + if (win == null) + return null; + return _DOMWindowCrossFrame._createSafe(win); + } + dart.fn(_convertNativeToDart_Window, WindowBase, [dart.dynamic]); + function _convertNativeToDart_EventTarget(e) { + if (e == null) { + return null; + } + if ("postMessage" in e) { + let window = _DOMWindowCrossFrame._createSafe(e); + if (dart.is(window, EventTarget)) { + return window; + } + return null; + } else + return dart.as(e, EventTarget); + } + dart.fn(_convertNativeToDart_EventTarget, EventTarget, [dart.dynamic]); + const _window = Symbol('_window'); + function _convertDartToNative_EventTarget(e) { + if (dart.is(e, _DOMWindowCrossFrame)) { + return dart.as(dart.dload(e, _window), EventTarget); + } else { + return dart.as(e, EventTarget); + } + } + dart.fn(_convertDartToNative_EventTarget, EventTarget, [dart.dynamic]); + function _convertNativeToDart_XHR_Response(o) { + if (dart.is(o, Document)) { + return o; + } + return html_common.convertNativeToDart_SerializedScriptValue(o); + } + dart.fn(_convertNativeToDart_XHR_Response); + class _DOMWindowCrossFrame extends core.Object { + get history() { + return _HistoryCrossFrame._createSafe(this[_window].history); + } + get location() { + return _LocationCrossFrame._createSafe(this[_window].location); + } + get closed() { + return this[_window].closed; + } + get opener() { + return _DOMWindowCrossFrame._createSafe(this[_window].opener); + } + get parent() { + return _DOMWindowCrossFrame._createSafe(this[_window].parent); + } + get top() { + return _DOMWindowCrossFrame._createSafe(this[_window].top); + } + close() { + return this[_window].close(); + } + postMessage(message, targetOrigin, messagePorts) { + if (messagePorts === void 0) + messagePorts = null; + if (messagePorts == null) { + this[_window].postMessage(html_common.convertDartToNative_SerializedScriptValue(message), targetOrigin); + } else { + this[_window].postMessage(html_common.convertDartToNative_SerializedScriptValue(message), targetOrigin, messagePorts); + } + } + _DOMWindowCrossFrame(window) { + this[_window] = window; + } + static _createSafe(w) { + if (dart.notNull(core.identical(w, exports.window))) { + return dart.as(w, WindowBase); + } else { + return new _DOMWindowCrossFrame(w); + } + } + get on() { + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + [_addEventListener](type, listener, useCapture) { + if (type === void 0) + type = null; + if (listener === void 0) + listener = null; + if (useCapture === void 0) + useCapture = null; + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + addEventListener(type, listener, useCapture) { + if (useCapture === void 0) + useCapture = null; + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + dispatchEvent(event) { + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + [_removeEventListener](type, listener, useCapture) { + if (type === void 0) + type = null; + if (listener === void 0) + listener = null; + if (useCapture === void 0) + useCapture = null; + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + removeEventListener(type, listener, useCapture) { + if (useCapture === void 0) + useCapture = null; + return dart.throw(new core.UnsupportedError('You can only attach EventListeners to your own window.')); + } + } + _DOMWindowCrossFrame[dart.implements] = () => [WindowBase]; + dart.setSignature(_DOMWindowCrossFrame, { + constructors: () => ({_DOMWindowCrossFrame: [_DOMWindowCrossFrame, [dart.dynamic]]}), + methods: () => ({ + close: [dart.void, []], + postMessage: [dart.void, [dart.dynamic, core.String], [core.List]], + [_addEventListener]: [dart.void, [], [core.String, EventListener, core.bool]], + addEventListener: [dart.void, [core.String, EventListener], [core.bool]], + dispatchEvent: [core.bool, [Event]], + [_removeEventListener]: [dart.void, [], [core.String, EventListener, core.bool]], + removeEventListener: [dart.void, [core.String, EventListener], [core.bool]] + }), + statics: () => ({_createSafe: [WindowBase, [dart.dynamic]]}), + names: ['_createSafe'] + }); + class _LocationCrossFrame extends core.Object { + set href(val) { + return _LocationCrossFrame._setHref(this[_location], val); + } + static _setHref(location, val) { + location.href = val; + } + _LocationCrossFrame(location) { + this[_location] = location; + } + static _createSafe(location) { + if (dart.notNull(core.identical(location, exports.window.location))) { + return dart.as(location, LocationBase); + } else { + return new _LocationCrossFrame(location); + } + } + } + _LocationCrossFrame[dart.implements] = () => [LocationBase]; + dart.setSignature(_LocationCrossFrame, { + constructors: () => ({_LocationCrossFrame: [_LocationCrossFrame, [dart.dynamic]]}), + statics: () => ({ + _setHref: [dart.void, [dart.dynamic, dart.dynamic]], + _createSafe: [LocationBase, [dart.dynamic]] + }), + names: ['_setHref', '_createSafe'] + }); + const _history = Symbol('_history'); + class _HistoryCrossFrame extends core.Object { + back() { + return this[_history].back(); + } + forward() { + return this[_history].forward(); + } + go(distance) { + return this[_history].go(distance); + } + _HistoryCrossFrame(history) { + this[_history] = history; + } + static _createSafe(h) { + if (dart.notNull(core.identical(h, exports.window.history))) { + return dart.as(h, HistoryBase); + } else { + return new _HistoryCrossFrame(h); + } + } + } + _HistoryCrossFrame[dart.implements] = () => [HistoryBase]; + dart.setSignature(_HistoryCrossFrame, { + constructors: () => ({_HistoryCrossFrame: [_HistoryCrossFrame, [dart.dynamic]]}), + methods: () => ({ + back: [dart.void, []], + forward: [dart.void, []], + go: [dart.void, [core.int]] + }), + statics: () => ({_createSafe: [HistoryBase, [dart.dynamic]]}), + names: ['_createSafe'] + }); + dart.defineLazyProperties(KeyEvent, { + get _keyboardEventDispatchRecord() { + return KeyEvent._makeRecord(); + }, + get keyDownEvent() { + return new _KeyboardEventHandler('keydown'); + }, + set keyDownEvent(_) {}, + get keyUpEvent() { + return new _KeyboardEventHandler('keyup'); + }, + set keyUpEvent(_) {}, + get keyPressEvent() { + return new _KeyboardEventHandler('keypress'); + }, + set keyPressEvent(_) {} + }); + class Platform extends core.Object {} + const supportsTypedData = !!window.ArrayBuffer; + Platform.supportsSimd = false; + function _wrapZone(callback) { + if (dart.equals(async.Zone.current, async.Zone.ROOT)) + return callback; + if (callback == null) + return null; + return async.Zone.current.bindUnaryCallback(callback, {runGuarded: true}); + } + dart.fn(_wrapZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart.dynamic])]); + function _wrapBinaryZone(callback) { + if (dart.equals(async.Zone.current, async.Zone.ROOT)) + return callback; + if (callback == null) + return null; + return async.Zone.current.bindBinaryCallback(callback, {runGuarded: true}); + } + dart.fn(_wrapBinaryZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])]); + function query(relativeSelectors) { + return exports.document.query(relativeSelectors); + } + dart.fn(query, Element, [core.String]); + function queryAll(relativeSelectors) { + return exports.document.queryAll(relativeSelectors); + } + dart.fn(queryAll, ElementList$(Element), [core.String]); + function querySelector(selectors) { + return exports.document.querySelector(selectors); + } + dart.fn(querySelector, Element, [core.String]); + function querySelectorAll(selectors) { + return exports.document.querySelectorAll(selectors); + } + dart.fn(querySelectorAll, ElementList$(Element), [core.String]); + class ElementUpgrader extends core.Object {} + class NodeValidator extends core.Object { + static new(opts) { + let uriPolicy = opts && 'uriPolicy' in opts ? opts.uriPolicy : null; + return new _Html5NodeValidator({uriPolicy: uriPolicy}); + } + static throws(base) { + return new _ThrowsNodeValidator(base); + } + } + dart.setSignature(NodeValidator, { + constructors: () => ({ + new: [NodeValidator, [], {uriPolicy: UriPolicy}], + throws: [NodeValidator, [NodeValidator]] + }) + }); + class NodeTreeSanitizer extends core.Object { + static new(validator) { + return new _ValidatingTreeSanitizer(validator); + } + } + dart.setSignature(NodeTreeSanitizer, { + constructors: () => ({new: [NodeTreeSanitizer, [NodeValidator]]}) + }); + class _TrustedHtmlTreeSanitizer extends core.Object { + _TrustedHtmlTreeSanitizer() { + } + sanitizeTree(node) {} + } + _TrustedHtmlTreeSanitizer[dart.implements] = () => [NodeTreeSanitizer]; + dart.setSignature(_TrustedHtmlTreeSanitizer, { + constructors: () => ({_TrustedHtmlTreeSanitizer: [_TrustedHtmlTreeSanitizer, []]}), + methods: () => ({sanitizeTree: [dart.void, [Node]]}) + }); + NodeTreeSanitizer.trusted = dart.const(new _TrustedHtmlTreeSanitizer()); + class UriPolicy extends core.Object { + static new() { + return new _SameOriginUriPolicy(); + } + } + dart.setSignature(UriPolicy, { + constructors: () => ({new: [UriPolicy, []]}) + }); + const _hiddenAnchor = Symbol('_hiddenAnchor'); + const _loc = Symbol('_loc'); + class _SameOriginUriPolicy extends core.Object { + _SameOriginUriPolicy() { + this[_hiddenAnchor] = AnchorElement.new(); + this[_loc] = exports.window.location; + } + allowsUri(uri) { + this[_hiddenAnchor].href = uri; + return this[_hiddenAnchor].hostname == this[_loc].hostname && this[_hiddenAnchor].port == this[_loc].port && this[_hiddenAnchor].protocol == this[_loc].protocol || this[_hiddenAnchor].hostname == '' && this[_hiddenAnchor].port == '' && (this[_hiddenAnchor].protocol == ':' || this[_hiddenAnchor].protocol == ''); + } + } + _SameOriginUriPolicy[dart.implements] = () => [UriPolicy]; + dart.setSignature(_SameOriginUriPolicy, { + methods: () => ({allowsUri: [core.bool, [core.String]]}) + }); + class _ThrowsNodeValidator extends core.Object { + _ThrowsNodeValidator(validator) { + this.validator = validator; + } + allowsElement(element) { + if (!dart.notNull(this.validator.allowsElement(element))) { + dart.throw(new core.ArgumentError(Element._safeTagName(element))); + } + return true; + } + allowsAttribute(element, attributeName, value) { + if (!dart.notNull(this.validator.allowsAttribute(element, attributeName, value))) { + dart.throw(new core.ArgumentError(`${Element._safeTagName(element)}[${attributeName}="${value}"]`)); + } + } + } + _ThrowsNodeValidator[dart.implements] = () => [NodeValidator]; + dart.setSignature(_ThrowsNodeValidator, { + constructors: () => ({_ThrowsNodeValidator: [_ThrowsNodeValidator, [NodeValidator]]}), + methods: () => ({ + allowsElement: [core.bool, [Element]], + allowsAttribute: [core.bool, [Element, core.String, core.String]] + }) + }); + const _removeNode = Symbol('_removeNode'); + const _sanitizeElement = Symbol('_sanitizeElement'); + const _sanitizeUntrustedElement = Symbol('_sanitizeUntrustedElement'); + class _ValidatingTreeSanitizer extends core.Object { + _ValidatingTreeSanitizer(validator) { + this.validator = validator; + } + sanitizeTree(node) { + const walk = (function(node, parent) { + this.sanitizeNode(node, parent); + let child = node.lastChild; + while (child != null) { + let nextChild = child.previousNode; + walk(child, node); + child = nextChild; + } + }).bind(this); + dart.fn(walk, dart.void, [Node, Node]); + walk(node, null); + } + [_removeNode](node, parent) { + if (parent == null) { + node.remove(); + } else { + parent[_removeChild](node); + } + } + [_sanitizeUntrustedElement](element, parent) { + let corrupted = true; + let attrs = null; + let isAttr = null; + try { + attrs = dart.dload(element, 'attributes'); + isAttr = dart.dindex(attrs, 'is'); + let corruptedTest1 = Element._hasCorruptedAttributes(dart.as(element, Element)); + corrupted = dart.notNull(corruptedTest1) ? true : Element._hasCorruptedAttributesAdditionalCheck(dart.as(element, Element)); + } catch (e) { + } + + let elementText = 'element unprintable'; + try { + elementText = dart.toString(element); + } catch (e) { + } + + try { + let elementTagName = Element._safeTagName(element); + this[_sanitizeElement](dart.as(element, Element), parent, corrupted, elementText, elementTagName, dart.as(attrs, core.Map), dart.as(isAttr, core.String)); + } catch (e$) { + if (dart.is(e$, core.ArgumentError)) { + throw e$; + } else { + let e = e$; + this[_removeNode](dart.as(element, Node), parent); + exports.window.console.warn(`Removing corrupted element ${elementText}`); + } + } + + } + [_sanitizeElement](element, parent, corrupted, text, tag, attrs, isAttr) { + if (false != corrupted) { + this[_removeNode](element, parent); + exports.window.console.warn(`Removing element due to corrupted attributes on <${text}>`); + return; + } + if (!dart.notNull(this.validator.allowsElement(element))) { + this[_removeNode](element, parent); + exports.window.console.warn(`Removing disallowed element <${tag}> from ${parent}`); + return; + } + if (isAttr != null) { + if (!dart.notNull(this.validator.allowsAttribute(element, 'is', isAttr))) { + this[_removeNode](element, parent); + exports.window.console.warn('Removing disallowed type extension ' + `<${tag} is="${isAttr}">`); + return; + } + } + let keys = attrs.keys[dartx.toList](); + for (let i = dart.notNull(attrs.length) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { + let name = keys[dartx.get](i); + if (!dart.notNull(this.validator.allowsAttribute(element, dart.as(dart.dsend(name, 'toLowerCase'), core.String), dart.as(attrs.get(name), core.String)))) { + exports.window.console.warn('Removing disallowed attribute ' + `<${tag} ${name}="${attrs.get(name)}">`); + attrs.remove(name); + } + } + if (dart.is(element, TemplateElement)) { + let template = element; + this.sanitizeTree(template.content); + } + } + sanitizeNode(node, parent) { + switch (node.nodeType) { + case Node.ELEMENT_NODE: + { + this[_sanitizeUntrustedElement](node, parent); + break; + } + case Node.COMMENT_NODE: + case Node.DOCUMENT_FRAGMENT_NODE: + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: + { + break; + } + default: + { + this[_removeNode](node, parent); + } + } + } + } + _ValidatingTreeSanitizer[dart.implements] = () => [NodeTreeSanitizer]; + dart.setSignature(_ValidatingTreeSanitizer, { + constructors: () => ({_ValidatingTreeSanitizer: [_ValidatingTreeSanitizer, [NodeValidator]]}), + methods: () => ({ + sanitizeTree: [dart.void, [Node]], + [_removeNode]: [dart.void, [Node, Node]], + [_sanitizeUntrustedElement]: [dart.void, [dart.dynamic, Node]], + [_sanitizeElement]: [dart.void, [Element, Node, core.bool, core.String, core.String, core.Map, core.String]], + sanitizeNode: [dart.void, [Node, Node]] + }) + }); + dart.copyProperties(exports, { + get window() { + return dart.as(wrap_jso(window), Window); + }, + get document() { + return dart.as(wrap_jso(document), HtmlDocument); + } + }); + class _EntryArray extends core.Object {} + _EntryArray[dart.implements] = () => [core.List$(dart.dynamic)]; + _EntryArray[dart.metadata] = () => [dart.const(new _js_helper.Native("EntryArray"))]; + function spawnDomUri(uri, args, message) { + dart.throw(new core.UnimplementedError()); + } + dart.fn(spawnDomUri, async.Future$(isolate.Isolate), [core.Uri, core.List$(core.String), dart.dynamic]); + const _F1 = dart.typedef('_F1', () => dart.functionType(dart.dynamic, [dart.dynamic])); + const _wrapper = Symbol("dart_wrapper"); + function unwrap_jso(wrapped) { + if (dart.is(wrapped, DartHtmlDomObject)) { + return dart.dload(wrapped, 'raw'); + } + if (dart.is(wrapped, _F1)) { + if (wrapped.hasOwnProperty(_wrapper)) { + return wrapped[_wrapper]; + } + let f = dart.fn(e => dart.dcall(wrapped, wrap_jso(e))); + wrapped[_wrapper] = f; + return f; + } + return wrapped; + } + dart.fn(unwrap_jso); + function wrap_jso(jso) { + if (jso == null || typeof jso == 'boolean' || typeof jso == 'number' || typeof jso == 'string') { + return jso; + } + if (jso.hasOwnProperty(_wrapper)) { + return jso[_wrapper]; + } + let constructor = jso.constructor; + let f = null; + let name = null; + let skip = false; + while (f == null) { + name = constructor.name; + f = getHtmlCreateFunction(name); + if (f == null) { + dart.dsend(/* Unimplemented unknown name */console, 'error', `Could not instantiate ${name}`); + skip = true; + constructor = constructor.__proto__; + } + } + if (dart.notNull(skip)) { + dart.dsend(/* Unimplemented unknown name */console, 'info', `Instantiated ${name} instead`); + } + let wrapped = dart.dcall(f); + dart.dput(wrapped, 'raw', jso); + jso[_wrapper] = wrapped; + return wrapped; + } + dart.fn(wrap_jso); + function createCustomUpgrader(customElementClass, $this) { + return $this; + } + dart.fn(createCustomUpgrader, dart.dynamic, [core.Type, dart.dynamic]); + dart.defineLazyProperties(exports, { + get htmlBlinkMap() { + return dart.map({_HistoryCrossFrame: dart.fn(() => _HistoryCrossFrame, core.Type, []), _LocationCrossFrame: dart.fn(() => _LocationCrossFrame, core.Type, []), _DOMWindowCrossFrame: dart.fn(() => _DOMWindowCrossFrame, core.Type, []), DateTime: dart.fn(() => core.DateTime, core.Type, []), JsObject: dart.fn(() => dart.dload(/* Unimplemented unknown name */js, 'JsObjectImpl')), JsFunction: dart.fn(() => dart.dload(/* Unimplemented unknown name */js, 'JsFunctionImpl')), JsArray: dart.fn(() => dart.dload(/* Unimplemented unknown name */js, 'JsArrayImpl')), Attr: dart.fn(() => _Attr, core.Type, []), CSSStyleDeclaration: dart.fn(() => CssStyleDeclaration, core.Type, []), CharacterData: dart.fn(() => CharacterData, core.Type, []), ChildNode: dart.fn(() => ChildNode, core.Type, []), ClientRect: dart.fn(() => _ClientRect, core.Type, []), Console: dart.fn(() => Console, core.Type, []), ConsoleBase: dart.fn(() => ConsoleBase, core.Type, []), DOMImplementation: dart.fn(() => DomImplementation, core.Type, []), DOMTokenList: dart.fn(() => DomTokenList, core.Type, []), Document: dart.fn(() => Document, core.Type, []), DocumentFragment: dart.fn(() => DocumentFragment, core.Type, []), Element: dart.fn(() => Element, core.Type, []), Event: dart.fn(() => Event, core.Type, []), EventTarget: dart.fn(() => EventTarget, core.Type, []), HTMLAnchorElement: dart.fn(() => AnchorElement, core.Type, []), HTMLBaseElement: dart.fn(() => BaseElement, core.Type, []), HTMLBodyElement: dart.fn(() => BodyElement, core.Type, []), HTMLCollection: dart.fn(() => HtmlCollection, core.Type, []), HTMLDivElement: dart.fn(() => DivElement, core.Type, []), HTMLDocument: dart.fn(() => HtmlDocument, core.Type, []), HTMLElement: dart.fn(() => HtmlElement, core.Type, []), HTMLHeadElement: dart.fn(() => HeadElement, core.Type, []), HTMLInputElement: dart.fn(() => InputElement, core.Type, []), HTMLStyleElement: dart.fn(() => StyleElement, core.Type, []), HTMLTemplateElement: dart.fn(() => TemplateElement, core.Type, []), History: dart.fn(() => History, core.Type, []), KeyboardEvent: dart.fn(() => KeyboardEvent, core.Type, []), Location: dart.fn(() => Location, core.Type, []), MouseEvent: dart.fn(() => MouseEvent, core.Type, []), NamedNodeMap: dart.fn(() => _NamedNodeMap, core.Type, []), Navigator: dart.fn(() => Navigator, core.Type, []), NavigatorCPU: dart.fn(() => NavigatorCpu, core.Type, []), Node: dart.fn(() => Node, core.Type, []), NodeList: dart.fn(() => NodeList, core.Type, []), ParentNode: dart.fn(() => ParentNode, core.Type, []), ProgressEvent: dart.fn(() => ProgressEvent, core.Type, []), Range: dart.fn(() => Range, core.Type, []), ShadowRoot: dart.fn(() => ShadowRoot, core.Type, []), Text: dart.fn(() => Text, core.Type, []), UIEvent: dart.fn(() => UIEvent, core.Type, []), URLUtils: dart.fn(() => UrlUtils, core.Type, []), Window: dart.fn(() => Window, core.Type, []), XMLHttpRequest: dart.fn(() => HttpRequest, core.Type, []), XMLHttpRequestEventTarget: dart.fn(() => HttpRequestEventTarget, core.Type, []), XMLHttpRequestProgressEvent: dart.fn(() => _XMLHttpRequestProgressEvent, core.Type, [])}); + }, + get htmlBlinkFunctionMap() { + return dart.map({Attr: dart.fn(() => _Attr.internalCreate_Attr, dart.functionType(_Attr, []), []), CSSStyleDeclaration: dart.fn(() => CssStyleDeclaration.internalCreateCssStyleDeclaration, dart.functionType(CssStyleDeclaration, []), []), CharacterData: dart.fn(() => CharacterData.internalCreateCharacterData, dart.functionType(CharacterData, []), []), ClientRect: dart.fn(() => _ClientRect.internalCreate_ClientRect, dart.functionType(_ClientRect, []), []), Console: dart.fn(() => Console.internalCreateConsole, dart.functionType(Console, []), []), ConsoleBase: dart.fn(() => ConsoleBase.internalCreateConsoleBase, dart.functionType(ConsoleBase, []), []), DOMImplementation: dart.fn(() => DomImplementation.internalCreateDomImplementation, dart.functionType(DomImplementation, []), []), DOMTokenList: dart.fn(() => DomTokenList.internalCreateDomTokenList, dart.functionType(DomTokenList, []), []), Document: dart.fn(() => Document.internalCreateDocument, dart.functionType(Document, []), []), DocumentFragment: dart.fn(() => DocumentFragment.internalCreateDocumentFragment, dart.functionType(DocumentFragment, []), []), Element: dart.fn(() => Element.internalCreateElement, dart.functionType(Element, []), []), Event: dart.fn(() => Event.internalCreateEvent, dart.functionType(Event, []), []), EventTarget: dart.fn(() => EventTarget.internalCreateEventTarget, dart.functionType(EventTarget, []), []), HTMLAnchorElement: dart.fn(() => AnchorElement.internalCreateAnchorElement, dart.functionType(AnchorElement, []), []), HTMLBaseElement: dart.fn(() => BaseElement.internalCreateBaseElement, dart.functionType(BaseElement, []), []), HTMLBodyElement: dart.fn(() => BodyElement.internalCreateBodyElement, dart.functionType(BodyElement, []), []), HTMLCollection: dart.fn(() => HtmlCollection.internalCreateHtmlCollection, dart.functionType(HtmlCollection, []), []), HTMLDivElement: dart.fn(() => DivElement.internalCreateDivElement, dart.functionType(DivElement, []), []), HTMLDocument: dart.fn(() => HtmlDocument.internalCreateHtmlDocument, dart.functionType(HtmlDocument, []), []), HTMLElement: dart.fn(() => HtmlElement.internalCreateHtmlElement, dart.functionType(HtmlElement, []), []), HTMLHeadElement: dart.fn(() => HeadElement.internalCreateHeadElement, dart.functionType(HeadElement, []), []), HTMLInputElement: dart.fn(() => InputElement.internalCreateInputElement, dart.functionType(InputElement, []), []), HTMLStyleElement: dart.fn(() => StyleElement.internalCreateStyleElement, dart.functionType(StyleElement, []), []), HTMLTemplateElement: dart.fn(() => TemplateElement.internalCreateTemplateElement, dart.functionType(TemplateElement, []), []), History: dart.fn(() => History.internalCreateHistory, dart.functionType(History, []), []), KeyboardEvent: dart.fn(() => KeyboardEvent.internalCreateKeyboardEvent, dart.functionType(KeyboardEvent, []), []), Location: dart.fn(() => Location.internalCreateLocation, dart.functionType(Location, []), []), MouseEvent: dart.fn(() => MouseEvent.internalCreateMouseEvent, dart.functionType(MouseEvent, []), []), NamedNodeMap: dart.fn(() => _NamedNodeMap.internalCreate_NamedNodeMap, dart.functionType(_NamedNodeMap, []), []), Navigator: dart.fn(() => Navigator.internalCreateNavigator, dart.functionType(Navigator, []), []), Node: dart.fn(() => Node.internalCreateNode, dart.functionType(Node, []), []), NodeList: dart.fn(() => NodeList.internalCreateNodeList, dart.functionType(NodeList, []), []), ProgressEvent: dart.fn(() => ProgressEvent.internalCreateProgressEvent, dart.functionType(ProgressEvent, []), []), Range: dart.fn(() => Range.internalCreateRange, dart.functionType(Range, []), []), ShadowRoot: dart.fn(() => ShadowRoot.internalCreateShadowRoot, dart.functionType(ShadowRoot, []), []), Text: dart.fn(() => Text.internalCreateText, dart.functionType(Text, []), []), UIEvent: dart.fn(() => UIEvent.internalCreateUIEvent, dart.functionType(UIEvent, []), []), Window: dart.fn(() => Window.internalCreateWindow, dart.functionType(Window, []), []), XMLHttpRequest: dart.fn(() => HttpRequest.internalCreateHttpRequest, dart.functionType(HttpRequest, []), []), XMLHttpRequestEventTarget: dart.fn(() => HttpRequestEventTarget.internalCreateHttpRequestEventTarget, dart.functionType(HttpRequestEventTarget, []), []), XMLHttpRequestProgressEvent: dart.fn(() => _XMLHttpRequestProgressEvent.internalCreate_XMLHttpRequestProgressEvent, dart.functionType(_XMLHttpRequestProgressEvent, []), [])}); + } + }); + function getHtmlCreateFunction(key) { + let result = null; + result = _getHtmlFunction(key); + if (result != null) { + return result; + } + return null; + } + dart.fn(getHtmlCreateFunction, dart.dynamic, [core.String]); + function _getHtmlFunction(key) { + if (dart.notNull(exports.htmlBlinkFunctionMap.containsKey(key))) { + return dart.as(dart.dcall(exports.htmlBlinkFunctionMap.get(key)), core.Function); + } + return null; + } + dart.fn(_getHtmlFunction, core.Function, [core.String]); + const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.bool, [Element])); + const __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.dynamic, [dart.dynamic])); + // Exports: + exports.DartHtmlDomObject = DartHtmlDomObject; + exports.EventTarget = EventTarget; + exports.Node = Node; + exports.Element = Element; + exports.HtmlElement = HtmlElement; + exports.AnchorElement = AnchorElement; + exports.BaseElement = BaseElement; + exports.BodyElement = BodyElement; + exports.EventStreamProvider$ = EventStreamProvider$; + exports.EventStreamProvider = EventStreamProvider; + exports.Event = Event; + exports.CharacterData = CharacterData; + exports.ChildNode = ChildNode; + exports.Console = Console; + exports.ConsoleBase = ConsoleBase; + exports.CssStyleDeclarationBase = CssStyleDeclarationBase; + exports.CssStyleDeclaration = CssStyleDeclaration; + exports.DivElement = DivElement; + exports.Document = Document; + exports.DocumentFragment = DocumentFragment; + exports.DomImplementation = DomImplementation; + exports.DomTokenList = DomTokenList; + exports.ElementList$ = ElementList$; + exports.ElementList = ElementList; + exports.ScrollAlignment = ScrollAlignment; + exports.Events = Events; + exports.ElementEvents = ElementEvents; + exports.HeadElement = HeadElement; + exports.History = History; + exports.ImmutableListMixin$ = ImmutableListMixin$; + exports.ImmutableListMixin = ImmutableListMixin; + exports.HtmlCollection = HtmlCollection; + exports.HtmlDocument = HtmlDocument; + exports.HttpRequestEventTarget = HttpRequestEventTarget; + exports.HttpRequest = HttpRequest; + exports.ProgressEvent = ProgressEvent; + exports.InputElement = InputElement; + exports.InputElementBase = InputElementBase; + exports.HiddenInputElement = HiddenInputElement; + exports.TextInputElementBase = TextInputElementBase; + exports.SearchInputElement = SearchInputElement; + exports.TextInputElement = TextInputElement; + exports.UrlInputElement = UrlInputElement; + exports.TelephoneInputElement = TelephoneInputElement; + exports.EmailInputElement = EmailInputElement; + exports.PasswordInputElement = PasswordInputElement; + exports.RangeInputElementBase = RangeInputElementBase; + exports.DateInputElement = DateInputElement; + exports.MonthInputElement = MonthInputElement; + exports.WeekInputElement = WeekInputElement; + exports.TimeInputElement = TimeInputElement; + exports.LocalDateTimeInputElement = LocalDateTimeInputElement; + exports.NumberInputElement = NumberInputElement; + exports.RangeInputElement = RangeInputElement; + exports.CheckboxInputElement = CheckboxInputElement; + exports.RadioButtonInputElement = RadioButtonInputElement; + exports.FileUploadInputElement = FileUploadInputElement; + exports.SubmitButtonInputElement = SubmitButtonInputElement; + exports.ImageButtonInputElement = ImageButtonInputElement; + exports.ResetButtonInputElement = ResetButtonInputElement; + exports.ButtonInputElement = ButtonInputElement; + exports.UIEvent = UIEvent; + exports.KeyboardEvent = KeyboardEvent; + exports.Location = Location; + exports.MouseEvent = MouseEvent; + exports.Navigator = Navigator; + exports.NavigatorCpu = NavigatorCpu; + exports.NodeList = NodeList; + exports.ParentNode = ParentNode; + exports.Range = Range; + exports.RequestAnimationFrameCallback = RequestAnimationFrameCallback; + exports.ShadowRoot = ShadowRoot; + exports.StyleElement = StyleElement; + exports.TemplateElement = TemplateElement; + exports.Text = Text; + exports.UrlUtils = UrlUtils; + exports.Window = Window; + exports.CanvasImageSource = CanvasImageSource; + exports.WindowBase = WindowBase; + exports.LocationBase = LocationBase; + exports.HistoryBase = HistoryBase; + exports.CssClassSet = CssClassSet; + exports.CssRect = CssRect; + exports.Dimension = Dimension; + exports.EventListener = EventListener; + exports.ElementStream$ = ElementStream$; + exports.ElementStream = ElementStream; + exports.CustomStream$ = CustomStream$; + exports.CustomStream = CustomStream; + exports.KeyEvent = KeyEvent; + exports.KeyCode = KeyCode; + exports.KeyLocation = KeyLocation; + exports.KeyboardEventStream = KeyboardEventStream; + exports.NodeValidatorBuilder = NodeValidatorBuilder; + exports.ReadyState = ReadyState; + exports.FixedSizeListIterator$ = FixedSizeListIterator$; + exports.FixedSizeListIterator = FixedSizeListIterator; + exports.Platform = Platform; + exports.supportsTypedData = supportsTypedData; + exports.query = query; + exports.queryAll = queryAll; + exports.querySelector = querySelector; + exports.querySelectorAll = querySelectorAll; + exports.ElementUpgrader = ElementUpgrader; + exports.NodeValidator = NodeValidator; + exports.NodeTreeSanitizer = NodeTreeSanitizer; + exports.UriPolicy = UriPolicy; + exports.spawnDomUri = spawnDomUri; + exports.unwrap_jso = unwrap_jso; + exports.wrap_jso = wrap_jso; + exports.createCustomUpgrader = createCustomUpgrader; + exports.getHtmlCreateFunction = getHtmlCreateFunction; +}); diff --git a/lib/runtime/dart/html_common.js b/lib/runtime/dart/html_common.js new file mode 100644 index 00000000..30ef8f11 --- /dev/null +++ b/lib/runtime/dart/html_common.js @@ -0,0 +1,969 @@ +dart_library.library('dart/html_common', null, /* Imports */[ + "dart/_runtime", + 'dart/_metadata', + 'dart/core', + 'dart/html', + 'dart/typed_data', + 'dart/_js_helper', + 'dart/_native_typed_data', + 'dart/async', + 'dart/collection', + 'dart/_internal' +], /* Lazy imports */[ +], function(exports, dart, _metadata, core, html, typed_data, _js_helper, _native_typed_data, async, collection, _internal) { + 'use strict'; + let dartx = dart.dartx; + dart.export_(exports, _metadata); + const _validateToken = Symbol('_validateToken'); + class CssClassSetImpl extends core.Object { + [_validateToken](value) { + if (dart.notNull(CssClassSetImpl._validTokenRE.hasMatch(value))) + return value; + dart.throw(new core.ArgumentError.value(value, 'value', 'Not a valid class token')); + } + toString() { + return this.readClasses().join(' '); + } + toggle(value, shouldAdd) { + if (shouldAdd === void 0) + shouldAdd = null; + this[_validateToken](value); + let s = this.readClasses(); + let result = false; + if (shouldAdd == null) + shouldAdd = !dart.notNull(s.contains(value)); + if (dart.notNull(shouldAdd)) { + s.add(value); + result = true; + } else { + s.remove(value); + } + this.writeClasses(s); + return result; + } + get frozen() { + return false; + } + get iterator() { + return this.readClasses().iterator; + } + [Symbol.iterator]() { + return new dart.JsIterator(this.iterator); + } + forEach(f) { + this.readClasses().forEach(f); + } + join(separator) { + if (separator === void 0) + separator = ""; + return this.readClasses().join(separator); + } + map(f) { + return this.readClasses().map(f); + } + where(f) { + return this.readClasses().where(f); + } + expand(f) { + return this.readClasses().expand(f); + } + every(f) { + return this.readClasses().every(f); + } + any(f) { + return this.readClasses().any(f); + } + get isEmpty() { + return this.readClasses().isEmpty; + } + get isNotEmpty() { + return this.readClasses().isNotEmpty; + } + get length() { + return this.readClasses().length; + } + reduce(combine) { + return this.readClasses().reduce(combine); + } + fold(initialValue, combine) { + return this.readClasses().fold(initialValue, combine); + } + contains(value) { + if (!(typeof value == 'string')) + return false; + this[_validateToken](dart.as(value, core.String)); + return this.readClasses().contains(value); + } + lookup(value) { + return dart.as(dart.notNull(this.contains(value)) ? value : null, core.String); + } + add(value) { + this[_validateToken](value); + return dart.as(this.modify(dart.fn(s => dart.dsend(s, 'add', value))), core.bool); + } + remove(value) { + this[_validateToken](dart.as(value, core.String)); + if (!(typeof value == 'string')) + return false; + let s = this.readClasses(); + let result = s.remove(value); + this.writeClasses(s); + return result; + } + addAll(iterable) { + this.modify(dart.fn((s => dart.dsend(s, 'addAll', iterable[dartx.map](dart.bind(this, _validateToken)))).bind(this))); + } + removeAll(iterable) { + this.modify(dart.fn((s => dart.dsend(s, 'removeAll', iterable[dartx.map](dart.as(dart.bind(this, _validateToken), __CastType0)))).bind(this))); + } + toggleAll(iterable, shouldAdd) { + if (shouldAdd === void 0) + shouldAdd = null; + iterable[dartx.forEach](dart.fn((e => this.toggle(dart.as(e, core.String), shouldAdd)).bind(this), core.bool, [dart.dynamic])); + } + retainAll(iterable) { + this.modify(dart.fn(s => dart.dsend(s, 'retainAll', iterable))); + } + removeWhere(test) { + this.modify(dart.fn(s => dart.dsend(s, 'removeWhere', test))); + } + retainWhere(test) { + this.modify(dart.fn(s => dart.dsend(s, 'retainWhere', test))); + } + containsAll(collection) { + return this.readClasses().containsAll(collection); + } + intersection(other) { + return this.readClasses().intersection(other); + } + union(other) { + return this.readClasses().union(other); + } + difference(other) { + return this.readClasses().difference(other); + } + get first() { + return this.readClasses().first; + } + get last() { + return this.readClasses().last; + } + get single() { + return this.readClasses().single; + } + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; + return this.readClasses().toList({growable: growable}); + } + toSet() { + return this.readClasses().toSet(); + } + take(n) { + return this.readClasses().take(n); + } + takeWhile(test) { + return this.readClasses().takeWhile(test); + } + skip(n) { + return this.readClasses().skip(n); + } + skipWhile(test) { + return this.readClasses().skipWhile(test); + } + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; + return this.readClasses().firstWhere(test, {orElse: orElse}); + } + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; + return this.readClasses().lastWhere(test, {orElse: orElse}); + } + singleWhere(test) { + return this.readClasses().singleWhere(test); + } + elementAt(index) { + return this.readClasses().elementAt(index); + } + clear() { + this.modify(dart.fn(s => dart.dsend(s, 'clear'))); + } + modify(f) { + let s = this.readClasses(); + let ret = f(s); + this.writeClasses(s); + return ret; + } + } + CssClassSetImpl[dart.implements] = () => [html.CssClassSet]; + dart.setSignature(CssClassSetImpl, { + methods: () => ({ + [_validateToken]: [core.String, [core.String]], + toggle: [core.bool, [core.String], [core.bool]], + forEach: [dart.void, [dart.functionType(dart.void, [core.String])]], + join: [core.String, [], [core.String]], + map: [core.Iterable, [dart.functionType(dart.dynamic, [core.String])]], + where: [core.Iterable$(core.String), [dart.functionType(core.bool, [core.String])]], + expand: [core.Iterable, [dart.functionType(core.Iterable, [core.String])]], + every: [core.bool, [dart.functionType(core.bool, [core.String])]], + any: [core.bool, [dart.functionType(core.bool, [core.String])]], + reduce: [core.String, [dart.functionType(core.String, [core.String, core.String])]], + fold: [dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dart.dynamic, core.String])]], + contains: [core.bool, [core.Object]], + lookup: [core.String, [core.Object]], + add: [core.bool, [core.String]], + remove: [core.bool, [core.Object]], + addAll: [dart.void, [core.Iterable$(core.String)]], + removeAll: [dart.void, [core.Iterable$(core.Object)]], + toggleAll: [dart.void, [core.Iterable$(core.String)], [core.bool]], + retainAll: [dart.void, [core.Iterable$(core.Object)]], + removeWhere: [dart.void, [dart.functionType(core.bool, [core.String])]], + retainWhere: [dart.void, [dart.functionType(core.bool, [core.String])]], + containsAll: [core.bool, [core.Iterable$(core.Object)]], + intersection: [core.Set$(core.String), [core.Set$(core.Object)]], + union: [core.Set$(core.String), [core.Set$(core.String)]], + difference: [core.Set$(core.String), [core.Set$(core.String)]], + toList: [core.List$(core.String), [], {growable: core.bool}], + toSet: [core.Set$(core.String), []], + take: [core.Iterable$(core.String), [core.int]], + takeWhile: [core.Iterable$(core.String), [dart.functionType(core.bool, [core.String])]], + skip: [core.Iterable$(core.String), [core.int]], + skipWhile: [core.Iterable$(core.String), [dart.functionType(core.bool, [core.String])]], + firstWhere: [core.String, [dart.functionType(core.bool, [core.String])], {orElse: dart.functionType(core.String, [])}], + lastWhere: [core.String, [dart.functionType(core.bool, [core.String])], {orElse: dart.functionType(core.String, [])}], + singleWhere: [core.String, [dart.functionType(core.bool, [core.String])]], + elementAt: [core.String, [core.int]], + clear: [dart.void, []], + modify: [dart.dynamic, [dart.functionType(dart.dynamic, [core.Set$(core.String)])]] + }) + }); + dart.defineExtensionMembers(CssClassSetImpl, [ + 'forEach', + 'join', + 'map', + 'where', + 'expand', + 'every', + 'any', + 'reduce', + 'fold', + 'contains', + 'toList', + 'toSet', + 'take', + 'takeWhile', + 'skip', + 'skipWhile', + 'firstWhere', + 'lastWhere', + 'singleWhere', + 'elementAt', + 'iterator', + 'isEmpty', + 'isNotEmpty', + 'length', + 'first', + 'last', + 'single' + ]); + dart.defineLazyProperties(CssClassSetImpl, { + get _validTokenRE() { + return core.RegExp.new('^\\S+$'); + } + }); + const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.dynamic, [core.Object])); + function convertDartToNative_SerializedScriptValue(value) { + return convertDartToNative_PrepareForStructuredClone(value); + } + dart.fn(convertDartToNative_SerializedScriptValue); + function convertNativeToDart_SerializedScriptValue(object) { + return convertNativeToDart_AcceptStructuredClone(object, {mustCopy: true}); + } + dart.fn(convertNativeToDart_SerializedScriptValue); + class _StructuredClone extends core.Object { + _StructuredClone() { + this.values = []; + this.copies = []; + } + findSlot(value) { + let length = this.values[dartx.length]; + for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { + if (dart.notNull(core.identical(this.values[dartx.get](i), value))) + return i; + } + this.values[dartx.add](value); + this.copies[dartx.add](null); + return length; + } + readSlot(i) { + return this.copies[dartx.get](i); + } + writeSlot(i, x) { + this.copies[dartx.set](i, x); + } + cleanupSlots() {} + walk(e) { + if (e == null) + return e; + if (typeof e == 'boolean') + return e; + if (typeof e == 'number') + return e; + if (typeof e == 'string') + return e; + if (dart.is(e, core.DateTime)) { + return convertDartToNative_DateTime(dart.as(e, core.DateTime)); + } + if (dart.is(e, core.RegExp)) { + dart.throw(new core.UnimplementedError('structured clone of RegExp')); + } + if (dart.is(e, dart.dynamic)) + return e; + if (dart.is(e, dart.dynamic)) + return e; + if (dart.is(e, dart.dynamic)) + return e; + if (dart.is(e, dart.dynamic)) + return e; + if (dart.notNull(this.cloneNotRequired(e))) + return e; + if (dart.is(e, core.Map)) { + let slot = this.findSlot(e); + let copy = this.readSlot(slot); + if (copy != null) + return copy; + copy = this.newJsMap(); + this.writeSlot(slot, copy); + dart.dsend(e, 'forEach', dart.fn(((key, value) => { + this.putIntoMap(copy, key, this.walk(value)); + }).bind(this))); + return copy; + } + if (dart.is(e, core.List)) { + let slot = this.findSlot(e); + let copy = this.readSlot(slot); + if (copy != null) + return copy; + copy = this.copyList(dart.as(e, core.List), slot); + return copy; + } + dart.throw(new core.UnimplementedError('structured clone of other type')); + } + copyList(e, slot) { + let i = 0; + let length = e[dartx.length]; + let copy = this.newJsList(length); + this.writeSlot(slot, copy); + for (; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { + dart.dsetindex(copy, i, this.walk(e[dartx.get](i))); + } + return copy; + } + convertDartToNative_PrepareForStructuredClone(value) { + let copy = this.walk(value); + this.cleanupSlots(); + return copy; + } + } + dart.setSignature(_StructuredClone, { + methods: () => ({ + findSlot: [core.int, [dart.dynamic]], + readSlot: [dart.dynamic, [core.int]], + writeSlot: [dart.dynamic, [core.int, dart.dynamic]], + cleanupSlots: [dart.dynamic, []], + walk: [dart.dynamic, [dart.dynamic]], + copyList: [dart.dynamic, [core.List, core.int]], + convertDartToNative_PrepareForStructuredClone: [dart.dynamic, [dart.dynamic]] + }) + }); + class _AcceptStructuredClone extends core.Object { + _AcceptStructuredClone() { + this.values = []; + this.copies = []; + this.mustCopy = false; + } + findSlot(value) { + let length = this.values[dartx.length]; + for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { + if (dart.notNull(this.identicalInJs(this.values[dartx.get](i), value))) + return i; + } + this.values[dartx.add](value); + this.copies[dartx.add](null); + return length; + } + readSlot(i) { + return this.copies[dartx.get](i); + } + writeSlot(i, x) { + this.copies[dartx.set](i, x); + } + walk(e) { + if (e == null) + return e; + if (typeof e == 'boolean') + return e; + if (typeof e == 'number') + return e; + if (typeof e == 'string') + return e; + if (dart.notNull(isJavaScriptDate(e))) { + return convertNativeToDart_DateTime(e); + } + if (dart.notNull(isJavaScriptRegExp(e))) { + dart.throw(new core.UnimplementedError('structured clone of RegExp')); + } + if (dart.notNull(isJavaScriptPromise(e))) { + return convertNativePromiseToDartFuture(e); + } + if (dart.notNull(isJavaScriptSimpleObject(e))) { + let slot = this.findSlot(e); + let copy = this.readSlot(slot); + if (copy != null) + return copy; + copy = dart.map(); + this.writeSlot(slot, copy); + this.forEachJsField(e, dart.fn(((key, value) => dart.dsetindex(copy, key, this.walk(value))).bind(this))); + return copy; + } + if (dart.notNull(isJavaScriptArray(e))) { + let slot = this.findSlot(e); + let copy = this.readSlot(slot); + if (copy != null) + return copy; + let length = dart.as(dart.dload(e, 'length'), core.int); + copy = dart.notNull(this.mustCopy) ? this.newDartList(length) : e; + this.writeSlot(slot, copy); + for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { + dart.dsetindex(copy, i, this.walk(dart.dindex(e, i))); + } + return copy; + } + return e; + } + convertNativeToDart_AcceptStructuredClone(object, opts) { + let mustCopy = opts && 'mustCopy' in opts ? opts.mustCopy : false; + this.mustCopy = dart.as(mustCopy, core.bool); + let copy = this.walk(object); + return copy; + } + } + dart.setSignature(_AcceptStructuredClone, { + methods: () => ({ + findSlot: [core.int, [dart.dynamic]], + readSlot: [dart.dynamic, [core.int]], + writeSlot: [dart.dynamic, [core.int, dart.dynamic]], + walk: [dart.dynamic, [dart.dynamic]], + convertNativeToDart_AcceptStructuredClone: [dart.dynamic, [dart.dynamic], {mustCopy: dart.dynamic}] + }) + }); + class _TypedContextAttributes extends core.Object { + _TypedContextAttributes(alpha, antialias, depth, failIfMajorPerformanceCaveat, premultipliedAlpha, preserveDrawingBuffer, stencil) { + this.alpha = alpha; + this.antialias = antialias; + this.depth = depth; + this.failIfMajorPerformanceCaveat = failIfMajorPerformanceCaveat; + this.premultipliedAlpha = premultipliedAlpha; + this.preserveDrawingBuffer = preserveDrawingBuffer; + this.stencil = stencil; + } + } + dart.setSignature(_TypedContextAttributes, { + constructors: () => ({_TypedContextAttributes: [_TypedContextAttributes, [core.bool, core.bool, core.bool, core.bool, core.bool, core.bool, core.bool]]}) + }); + function convertNativeToDart_ContextAttributes(nativeContextAttributes) { + if (dart.is(nativeContextAttributes, dart.dynamic)) { + return nativeContextAttributes; + } + return new _TypedContextAttributes(dart.as(nativeContextAttributes.alpha, core.bool), dart.as(nativeContextAttributes.antialias, core.bool), dart.as(nativeContextAttributes.depth, core.bool), dart.as(nativeContextAttributes.failIfMajorPerformanceCaveat, core.bool), dart.as(nativeContextAttributes.premultipliedAlpha, core.bool), dart.as(nativeContextAttributes.preserveDrawingBuffer, core.bool), dart.as(nativeContextAttributes.stencil, core.bool)); + } + dart.fn(convertNativeToDart_ContextAttributes); + class _TypedImageData extends core.Object { + _TypedImageData(data, height, width) { + this.data = data; + this.height = height; + this.width = width; + } + } + dart.setSignature(_TypedImageData, { + constructors: () => ({_TypedImageData: [_TypedImageData, [typed_data.Uint8ClampedList, core.int, core.int]]}) + }); + function convertNativeToDart_ImageData(nativeImageData) { + 0; + if (dart.is(nativeImageData, dart.dynamic)) { + let data = dart.dload(nativeImageData, 'data'); + if (data.constructor === Array) { + if (typeof CanvasPixelArray !== "undefined") { + data.constructor = CanvasPixelArray; + data.BYTES_PER_ELEMENT = 1; + } + } + return nativeImageData; + } + return new _TypedImageData(dart.as(nativeImageData.data, typed_data.Uint8ClampedList), dart.as(nativeImageData.height, core.int), dart.as(nativeImageData.width, core.int)); + } + dart.fn(convertNativeToDart_ImageData); + function convertDartToNative_ImageData(imageData) { + if (dart.is(imageData, _TypedImageData)) { + return {data: dart.dload(imageData, 'data'), height: dart.dload(imageData, 'height'), width: dart.dload(imageData, 'width')}; + } + return imageData; + } + dart.fn(convertDartToNative_ImageData); + const _serializedScriptValue = 'num|String|bool|' + 'JSExtendableArray|=Object|' + 'Blob|File|NativeByteBuffer|NativeTypedData'; + const annotation_Creates_SerializedScriptValue = dart.const(new _js_helper.Creates(_serializedScriptValue)); + const annotation_Returns_SerializedScriptValue = dart.const(new _js_helper.Returns(_serializedScriptValue)); + function convertNativeToDart_Dictionary(object) { + if (object == null) + return null; + let dict = dart.map(); + let keys = Object.getOwnPropertyNames(object); + for (let key of dart.as(keys, core.Iterable)) { + dict.set(key, object[key]); + } + return dict; + } + dart.fn(convertNativeToDart_Dictionary, core.Map, [dart.dynamic]); + function convertDartToNative_Dictionary(dict, postCreate) { + if (postCreate === void 0) + postCreate = null; + if (dict == null) + return null; + let object = {}; + if (postCreate != null) { + dart.dcall(postCreate, object); + } + dict.forEach(dart.fn((key, value) => { + object[key] = value; + }, dart.dynamic, [core.String, dart.dynamic])); + return object; + } + dart.fn(convertDartToNative_Dictionary, dart.dynamic, [core.Map], [dart.functionType(dart.void, [dart.dynamic])]); + function convertDartToNative_StringArray(input) { + return input; + } + dart.fn(convertDartToNative_StringArray, core.List, [core.List$(core.String)]); + function convertNativeToDart_DateTime(date) { + let millisSinceEpoch = date.getTime(); + return new core.DateTime.fromMillisecondsSinceEpoch(millisSinceEpoch, {isUtc: true}); + } + dart.fn(convertNativeToDart_DateTime, core.DateTime, [dart.dynamic]); + function convertDartToNative_DateTime(date) { + return new Date(date.millisecondsSinceEpoch); + } + dart.fn(convertDartToNative_DateTime, dart.dynamic, [core.DateTime]); + function convertDartToNative_PrepareForStructuredClone(value) { + return new _StructuredCloneDart2Js().convertDartToNative_PrepareForStructuredClone(value); + } + dart.fn(convertDartToNative_PrepareForStructuredClone); + function convertNativeToDart_AcceptStructuredClone(object, opts) { + let mustCopy = opts && 'mustCopy' in opts ? opts.mustCopy : false; + return new _AcceptStructuredCloneDart2Js().convertNativeToDart_AcceptStructuredClone(object, {mustCopy: mustCopy}); + } + dart.fn(convertNativeToDart_AcceptStructuredClone, dart.dynamic, [dart.dynamic], {mustCopy: dart.dynamic}); + class _StructuredCloneDart2Js extends _StructuredClone { + _StructuredCloneDart2Js() { + super._StructuredClone(); + } + newJsMap() { + return {}; + } + putIntoMap(map, key, value) { + return map[key] = value; + } + newJsList(length) { + return new Array(length); + } + cloneNotRequired(e) { + return dart.is(e, _native_typed_data.NativeByteBuffer) || dart.is(e, _native_typed_data.NativeTypedData); + } + } + dart.setSignature(_StructuredCloneDart2Js, { + methods: () => ({ + newJsMap: [dart.dynamic, []], + putIntoMap: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], + newJsList: [dart.dynamic, [dart.dynamic]], + cloneNotRequired: [core.bool, [dart.dynamic]] + }) + }); + class _AcceptStructuredCloneDart2Js extends _AcceptStructuredClone { + _AcceptStructuredCloneDart2Js() { + super._AcceptStructuredClone(); + } + newJsList(length) { + return new Array(length); + } + newDartList(length) { + return this.newJsList(length); + } + identicalInJs(a, b) { + return core.identical(a, b); + } + forEachJsField(object, action) { + for (let key of dart.as(Object.keys(object), core.Iterable)) { + dart.dcall(action, key, object[key]); + } + } + } + dart.setSignature(_AcceptStructuredCloneDart2Js, { + methods: () => ({ + newJsList: [dart.dynamic, [dart.dynamic]], + newDartList: [dart.dynamic, [dart.dynamic]], + identicalInJs: [core.bool, [dart.dynamic, dart.dynamic]], + forEachJsField: [dart.void, [dart.dynamic, dart.dynamic]] + }) + }); + function isJavaScriptDate(value) { + return value instanceof Date; + } + dart.fn(isJavaScriptDate, core.bool, [dart.dynamic]); + function isJavaScriptRegExp(value) { + return value instanceof RegExp; + } + dart.fn(isJavaScriptRegExp, core.bool, [dart.dynamic]); + function isJavaScriptArray(value) { + return value instanceof Array; + } + dart.fn(isJavaScriptArray, core.bool, [dart.dynamic]); + function isJavaScriptSimpleObject(value) { + let proto = Object.getPrototypeOf(value); + return proto === Object.prototype || proto === null; + } + dart.fn(isJavaScriptSimpleObject, core.bool, [dart.dynamic]); + function isImmutableJavaScriptArray(value) { + return !!value.immutable$list; + } + dart.fn(isImmutableJavaScriptArray, core.bool, [dart.dynamic]); + function isJavaScriptPromise(value) { + return typeof Promise != "undefined" && value instanceof Promise; + } + dart.fn(isJavaScriptPromise, core.bool, [dart.dynamic]); + function convertNativePromiseToDartFuture(promise) { + let completer = async.Completer.new(); + let then = dart.dcall(/* Unimplemented unknown name */convertDartClosureToJS, dart.fn(result => completer.complete(result), dart.void, [dart.dynamic]), 1); + let error = dart.dcall(/* Unimplemented unknown name */convertDartClosureToJS, dart.fn(result => completer.completeError(result), dart.void, [dart.dynamic]), 1); + let newPromise = promise.then(then).catch(error); + return completer.future; + } + dart.fn(convertNativePromiseToDartFuture, async.Future, [dart.dynamic]); + class Device extends core.Object { + static get userAgent() { + return dart.as(html.window.navigator.userAgent, core.String); + } + static get isOpera() { + if (Device._isOpera == null) { + Device._isOpera = Device.userAgent[dartx.contains]("Opera", 0); + } + return Device._isOpera; + } + static get isIE() { + if (Device._isIE == null) { + Device._isIE = !dart.notNull(Device.isOpera) && dart.notNull(Device.userAgent[dartx.contains]("Trident/", 0)); + } + return Device._isIE; + } + static get isFirefox() { + if (Device._isFirefox == null) { + Device._isFirefox = Device.userAgent[dartx.contains]("Firefox", 0); + } + return Device._isFirefox; + } + static get isWebKit() { + if (Device._isWebKit == null) { + Device._isWebKit = !dart.notNull(Device.isOpera) && dart.notNull(Device.userAgent[dartx.contains]("WebKit", 0)); + } + return Device._isWebKit; + } + static get cssPrefix() { + let prefix = Device._cachedCssPrefix; + if (prefix != null) + return prefix; + if (dart.notNull(Device.isFirefox)) { + prefix = '-moz-'; + } else if (dart.notNull(Device.isIE)) { + prefix = '-ms-'; + } else if (dart.notNull(Device.isOpera)) { + prefix = '-o-'; + } else { + prefix = '-webkit-'; + } + return Device._cachedCssPrefix = prefix; + } + static get propertyPrefix() { + let prefix = Device._cachedPropertyPrefix; + if (prefix != null) + return prefix; + if (dart.notNull(Device.isFirefox)) { + prefix = 'moz'; + } else if (dart.notNull(Device.isIE)) { + prefix = 'ms'; + } else if (dart.notNull(Device.isOpera)) { + prefix = 'o'; + } else { + prefix = 'webkit'; + } + return Device._cachedPropertyPrefix = prefix; + } + static isEventTypeSupported(eventType) { + try { + let e = html.Event.eventType(eventType, ''); + return dart.is(e, html.Event); + } catch (_) { + } + + return false; + } + } + dart.setSignature(Device, { + statics: () => ({isEventTypeSupported: [core.bool, [core.String]]}), + names: ['isEventTypeSupported'] + }); + Device._isOpera = null; + Device._isIE = null; + Device._isFirefox = null; + Device._isWebKit = null; + Device._cachedCssPrefix = null; + Device._cachedPropertyPrefix = null; + const _childNodes = Symbol('_childNodes'); + const _node = Symbol('_node'); + const _iterable = Symbol('_iterable'); + const _filtered = Symbol('_filtered'); + class FilteredElementList extends collection.ListBase$(html.Element) { + FilteredElementList(node) { + this[_childNodes] = node.nodes; + this[_node] = node; + } + get [_iterable]() { + return new _internal.WhereIterable(this[_childNodes], dart.fn(n => dart.is(n, html.Element), core.bool, [dart.dynamic])); + } + get [_filtered]() { + return core.List$(html.Element).from(this[_iterable], {growable: false}); + } + forEach(f) { + this[_filtered][dartx.forEach](f); + } + set(index, value) { + this.get(index).replaceWith(value); + return value; + } + set length(newLength) { + let len = this.length; + if (dart.notNull(newLength) >= dart.notNull(len)) { + return; + } else if (dart.notNull(newLength) < 0) { + dart.throw(new core.ArgumentError("Invalid list length")); + } + this.removeRange(newLength, len); + } + add(value) { + this[_childNodes][dartx.add](value); + } + addAll(iterable) { + for (let element of iterable) { + this.add(element); + } + } + contains(needle) { + if (!dart.is(needle, html.Element)) + return false; + let element = dart.as(needle, html.Element); + return dart.equals(element.parentNode, this[_node]); + } + get reversed() { + return this[_filtered][dartx.reversed]; + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.throw(new core.UnsupportedError('Cannot sort filtered list')); + } + setRange(start, end, iterable, skipCount) { + if (skipCount === void 0) + skipCount = 0; + dart.throw(new core.UnsupportedError('Cannot setRange on filtered list')); + } + fillRange(start, end, fillValue) { + if (fillValue === void 0) + fillValue = null; + dart.throw(new core.UnsupportedError('Cannot fillRange on filtered list')); + } + replaceRange(start, end, iterable) { + dart.throw(new core.UnsupportedError('Cannot replaceRange on filtered list')); + } + removeRange(start, end) { + core.List.from(this[_iterable][dartx.skip](start)[dartx.take](dart.notNull(end) - dart.notNull(start)))[dartx.forEach](dart.fn(el => dart.dsend(el, 'remove'))); + } + clear() { + this[_childNodes][dartx.clear](); + } + removeLast() { + let result = this[_iterable][dartx.last]; + if (result != null) { + result.remove(); + } + return result; + } + insert(index, value) { + if (index == this.length) { + this.add(value); + } else { + let element = this[_iterable][dartx.elementAt](index); + element.parentNode.insertBefore(value, element); + } + } + insertAll(index, iterable) { + if (index == this.length) { + this.addAll(iterable); + } else { + let element = this[_iterable][dartx.elementAt](index); + element.parentNode.insertAllBefore(iterable, element); + } + } + removeAt(index) { + let result = this.get(index); + result.remove(); + return result; + } + remove(element) { + if (!dart.is(element, html.Element)) + return false; + if (dart.notNull(this.contains(element))) { + dart.as(element, html.Element).remove(); + return true; + } else { + return false; + } + } + get length() { + return this[_iterable][dartx.length]; + } + get(index) { + return this[_iterable][dartx.elementAt](index); + } + get iterator() { + return this[_filtered][dartx.iterator]; + } + get rawList() { + return this[_node].childNodes; + } + } + FilteredElementList[dart.implements] = () => [NodeListWrapper]; + dart.setSignature(FilteredElementList, { + constructors: () => ({FilteredElementList: [FilteredElementList, [html.Node]]}), + methods: () => ({ + forEach: [dart.void, [dart.functionType(dart.void, [html.Element])]], + set: [dart.void, [core.int, html.Element]], + add: [dart.void, [html.Element]], + addAll: [dart.void, [core.Iterable$(html.Element)]], + sort: [dart.void, [], [dart.functionType(core.int, [html.Element, html.Element])]], + setRange: [dart.void, [core.int, core.int, core.Iterable$(html.Element)], [core.int]], + fillRange: [dart.void, [core.int, core.int], [html.Element]], + replaceRange: [dart.void, [core.int, core.int, core.Iterable$(html.Element)]], + removeLast: [html.Element, []], + insert: [dart.void, [core.int, html.Element]], + insertAll: [dart.void, [core.int, core.Iterable$(html.Element)]], + removeAt: [html.Element, [core.int]], + get: [html.Element, [core.int]] + }) + }); + dart.defineExtensionMembers(FilteredElementList, [ + 'forEach', + 'set', + 'add', + 'addAll', + 'contains', + 'sort', + 'setRange', + 'fillRange', + 'replaceRange', + 'removeRange', + 'clear', + 'removeLast', + 'insert', + 'insertAll', + 'removeAt', + 'remove', + 'get', + 'length', + 'reversed', + 'length', + 'iterator' + ]); + class Lists extends core.Object { + static indexOf(a, element, startIndex, endIndex) { + if (dart.notNull(startIndex) >= dart.notNull(a[dartx.length])) { + return -1; + } + if (dart.notNull(startIndex) < 0) { + startIndex = 0; + } + for (let i = startIndex; dart.notNull(i) < dart.notNull(endIndex); i = dart.notNull(i) + 1) { + if (dart.equals(a[dartx.get](i), element)) { + return i; + } + } + return -1; + } + static lastIndexOf(a, element, startIndex) { + if (dart.notNull(startIndex) < 0) { + return -1; + } + if (dart.notNull(startIndex) >= dart.notNull(a[dartx.length])) { + startIndex = dart.notNull(a[dartx.length]) - 1; + } + for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { + if (dart.equals(a[dartx.get](i), element)) { + return i; + } + } + return -1; + } + static getRange(a, start, end, accumulator) { + if (dart.notNull(start) < 0) + dart.throw(new core.RangeError.value(start)); + if (dart.notNull(end) < dart.notNull(start)) + dart.throw(new core.RangeError.value(end)); + if (dart.notNull(end) > dart.notNull(a[dartx.length])) + dart.throw(new core.RangeError.value(end)); + for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) { + accumulator[dartx.add](a[dartx.get](i)); + } + return accumulator; + } + } + dart.setSignature(Lists, { + statics: () => ({ + indexOf: [core.int, [core.List, core.Object, core.int, core.int]], + lastIndexOf: [core.int, [core.List, core.Object, core.int]], + getRange: [core.List, [core.List, core.int, core.int, core.List]] + }), + names: ['indexOf', 'lastIndexOf', 'getRange'] + }); + class NodeListWrapper extends core.Object {} + // Exports: + exports.CssClassSetImpl = CssClassSetImpl; + exports.convertDartToNative_SerializedScriptValue = convertDartToNative_SerializedScriptValue; + exports.convertNativeToDart_SerializedScriptValue = convertNativeToDart_SerializedScriptValue; + exports.convertNativeToDart_ContextAttributes = convertNativeToDart_ContextAttributes; + exports.convertNativeToDart_ImageData = convertNativeToDart_ImageData; + exports.convertDartToNative_ImageData = convertDartToNative_ImageData; + exports.annotation_Creates_SerializedScriptValue = annotation_Creates_SerializedScriptValue; + exports.annotation_Returns_SerializedScriptValue = annotation_Returns_SerializedScriptValue; + exports.convertNativeToDart_Dictionary = convertNativeToDart_Dictionary; + exports.convertDartToNative_Dictionary = convertDartToNative_Dictionary; + exports.convertDartToNative_StringArray = convertDartToNative_StringArray; + exports.convertNativeToDart_DateTime = convertNativeToDart_DateTime; + exports.convertDartToNative_DateTime = convertDartToNative_DateTime; + exports.convertDartToNative_PrepareForStructuredClone = convertDartToNative_PrepareForStructuredClone; + exports.convertNativeToDart_AcceptStructuredClone = convertNativeToDart_AcceptStructuredClone; + exports.isJavaScriptDate = isJavaScriptDate; + exports.isJavaScriptRegExp = isJavaScriptRegExp; + exports.isJavaScriptArray = isJavaScriptArray; + exports.isJavaScriptSimpleObject = isJavaScriptSimpleObject; + exports.isImmutableJavaScriptArray = isImmutableJavaScriptArray; + exports.isJavaScriptPromise = isJavaScriptPromise; + exports.convertNativePromiseToDartFuture = convertNativePromiseToDartFuture; + exports.Device = Device; + exports.FilteredElementList = FilteredElementList; + exports.Lists = Lists; + exports.NodeListWrapper = NodeListWrapper; +}); diff --git a/lib/runtime/dart/js.js b/lib/runtime/dart/js.js index db2f65eb..90208900 100644 --- a/lib/runtime/dart/js.js +++ b/lib/runtime/dart/js.js @@ -7,9 +7,10 @@ dart_library.library('dart/js', null, /* Imports */[ ], function(exports, dart, core, collection, _js_helper) { 'use strict'; let dartx = dart.dartx; + const _global = dart.global; dart.defineLazyProperties(exports, { get context() { - return _wrapToDart(dart.global); + return _wrapToDart(_global); } }); const _jsObject = Symbol('_jsObject'); @@ -350,8 +351,12 @@ dart_library.library('dart/js', null, /* Imports */[ return wrapper; } dart.fn(_wrapDartFunction); - function _convertToDart(o) { - if (o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean" || dart.notNull(_isBrowserType(o))) { + function _convertToDart(o, isBrowserType) { + if (isBrowserType === void 0) + isBrowserType = null; + if (isBrowserType == null) + isBrowserType = _isBrowserType; + if (o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean" || dart.notNull(dart.dcall(isBrowserType, o))) { return o; } else if (o instanceof Date) { let ms = o.getTime(); @@ -362,7 +367,7 @@ dart_library.library('dart/js', null, /* Imports */[ return _putIfAbsent(_dartProxies, o, _wrapToDart); } } - dart.fn(_convertToDart, core.Object, [dart.dynamic]); + dart.fn(_convertToDart, core.Object, [dart.dynamic], [dart.functionType(core.bool, [dart.dynamic])]); function _wrapToDart(o) { if (typeof o == "function") { return new JsFunction._fromJs(o); diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart index 0ff3baad..1ca3993e 100644 --- a/lib/src/codegen/js_codegen.dart +++ b/lib/src/codegen/js_codegen.dart @@ -1089,6 +1089,9 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureAnnotator { } } + if (superCtor == null) { + print('Error generating: ${element.displayName}'); + } if (superCtor.name == '' && !_shouldCallUnnamedSuperCtor(element)) { return null; } diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart index 1b764eeb..acf5494e 100644 --- a/lib/src/compiler.dart +++ b/lib/src/compiler.dart @@ -510,7 +510,10 @@ const corelibOrder = const [ // are actually used by the application. 'dart.mirrors', 'dart._js_mirrors', - 'dart.js' + 'dart.js', + 'dart._metadata', + 'dart.dom.html_common', + 'dart.dom.html' // _foreign_helper is not included, as it only defines the JS builtin that // the compiler handles at compile time. ]; @@ -518,6 +521,15 @@ const corelibOrder = const [ /// Runtime files added to all applications when running the compiler in the /// command line. final defaultRuntimeFiles = () { + String coreToFile(String name) { + var parts = name.split('.'); + var length = parts.length; + if (length > 1) { + name = parts[0] + '/' + parts[length - 1]; + } + return name + '.js'; + } + var files = [ 'harmony_feature_check.js', 'dart_library.js', @@ -530,7 +542,7 @@ final defaultRuntimeFiles = () { 'dart/_operations.js', 'dart/_runtime.js', ]; - files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); + files.addAll(corelibOrder.map(coreToFile)); return files; }(); diff --git a/test/codegen/expect/html_input.html b/test/codegen/expect/html_input.html index e661f011..1a79a69c 100644 --- a/test/codegen/expect/html_input.html +++ b/test/codegen/expect/html_input.html @@ -27,6 +27,9 @@ + + + diff --git a/test/codegen/expect/sunflower/sunflower.html b/test/codegen/expect/sunflower/sunflower.html index 9719fce5..c1c76977 100644 --- a/test/codegen/expect/sunflower/sunflower.html +++ b/test/codegen/expect/sunflower/sunflower.html @@ -51,6 +51,9 @@

drfibonacci's Sunflower Spectacular

+ + + diff --git a/tool/build_sdk.sh b/tool/build_sdk.sh index 3b58fa00..2d54627a 100755 --- a/tool/build_sdk.sh +++ b/tool/build_sdk.sh @@ -14,5 +14,5 @@ dart -c bin/dartdevc.dart --no-source-maps --arrow-fn-bind-this --sdk-check \ --force-compile -l warning --dart-sdk tool/generated_sdk -o lib/runtime/ \ --no-destructure-named-params \ "$@" \ - dart:js dart:mirrors \ + dart:js dart:mirrors dart:html \ > tool/sdk_expected_errors.txt || true diff --git a/tool/input_sdk/lib/_internal/libraries.dart b/tool/input_sdk/lib/_internal/libraries.dart index 3c3fd2f9..06e4479a 100644 --- a/tool/input_sdk/lib/_internal/libraries.dart +++ b/tool/input_sdk/lib/_internal/libraries.dart @@ -31,8 +31,7 @@ const Map LIBRARIES = const { "_blink/dartium/_blink_dartium.dart", category: "Client", implementation: true, - documented: false, - platforms: VM_PLATFORM), + documented: false), "_chrome": const LibraryInfo( "_chrome/dart2js/chrome_dart2js.dart", @@ -55,24 +54,21 @@ const Map LIBRARIES = const { dart2jsPatchPath: "_internal/compiler/js_lib/core_patch.dart"), "html": const LibraryInfo( - "html/dartium/html_dartium.dart", + "html/ddc/html_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "html/dart2js/html_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "html_common": const LibraryInfo( - "html/html_common/html_common.dart", + "html/html_common/html_common_ddc.dart", category: "Client", maturity: Maturity.WEB_STABLE, - dart2jsPath: "html/html_common/html_common_dart2js.dart", documented: false, implementation: true), "indexed_db": const LibraryInfo( - "indexed_db/dartium/indexed_db_dartium.dart", + "indexed_db/ddc/indexed_db_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "io": const LibraryInfo( "io/io.dart", @@ -125,28 +121,24 @@ const Map LIBRARIES = const { platforms: DART2JS_PLATFORM), "svg": const LibraryInfo( - "svg/dartium/svg_dartium.dart", + "svg/ddc/svg_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "svg/dart2js/svg_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "web_audio": const LibraryInfo( - "web_audio/dartium/web_audio_dartium.dart", + "web_audio/ddc/web_audio_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "web_audio/dart2js/web_audio_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "web_gl": const LibraryInfo( - "web_gl/dartium/web_gl_dartium.dart", + "web_gl/ddc/web_gl_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "web_gl/dart2js/web_gl_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "web_sql": const LibraryInfo( - "web_sql/dartium/web_sql_dartium.dart", + "web_sql/ddc/web_sql_ddc.dart", category: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"), + maturity: Maturity.WEB_STABLE), "_internal": const LibraryInfo( "internal/internal.dart", diff --git a/tool/input_sdk/lib/html/ddc/html_ddc.dart b/tool/input_sdk/lib/html/ddc/html_ddc.dart new file mode 100644 index 00000000..b8afc331 --- /dev/null +++ b/tool/input_sdk/lib/html/ddc/html_ddc.dart @@ -0,0 +1,19578 @@ +/** + * HTML elements and other resources for web-based applications that need to + * interact with the browser and the DOM (Document Object Model). + * + * This library includes DOM element types, CSS styling, local storage, + * media, speech, events, and more. + * To get started, + * check out the [Element] class, the base class for many of the HTML + * DOM types. + * + * ## Other resources + * + * * If you've never written a web app before, try our + * tutorials—[A Game of Darts](http://dartlang.org/docs/tutorials). + * + * * To see some web-based Dart apps in action and to play with the code, + * download + * [Dart Editor](http://www.dartlang.org/#get-started) + * and run its built-in examples. + * + * * For even more examples, see + * [Dart HTML5 Samples](https://github.com/dart-lang/dart-html5-samples) + * on Github. + */ +library dart.dom.html; + +import 'dart:async'; +import 'dart:collection'; +import 'dart:_internal' hide Symbol; +import 'dart:html_common'; +import 'dart:isolate'; +import "dart:convert"; +import 'dart:math'; +import 'dart:_native_typed_data'; +import 'dart:typed_data'; +import 'dart:_isolate_helper' show IsolateNatives; +import 'dart:_foreign_helper' show JS, JS_INTERCEPTOR_CONSTANT, JS_CONST; +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('HTMLAnchorElement') +@Native("HTMLAnchorElement") +class AnchorElement extends HtmlElement implements UrlUtils { + // To suppress missing implicit constructor warnings. + factory AnchorElement._() { throw new UnsupportedError("Not supported"); } + + @DomName('HTMLAnchorElement.HTMLAnchorElement') + @DocsEditable() + factory AnchorElement({String href}) { + AnchorElement e = document.createElement("a"); + if (href != null) e.href = href; + return e; + } + + + @Deprecated("Internal Use Only") + static AnchorElement internalCreateAnchorElement() { + return new AnchorElement.internal_(); + } + + @Deprecated("Internal Use Only") + AnchorElement.internal_() : super.internal_(); + + + @DomName('HTMLAnchorElement.download') + @DocsEditable() + String get download => wrap_jso(JS("String", "#.download", this.raw)); + @DomName('HTMLAnchorElement.download') + @DocsEditable() + void set download(String val) => JS("void", "#.download = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.hreflang') + @DocsEditable() + String get hreflang => wrap_jso(JS("String", "#.hreflang", this.raw)); + @DomName('HTMLAnchorElement.hreflang') + @DocsEditable() + void set hreflang(String val) => JS("void", "#.hreflang = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.integrity') + @DocsEditable() + @Experimental() // untriaged + String get integrity => wrap_jso(JS("String", "#.integrity", this.raw)); + @DomName('HTMLAnchorElement.integrity') + @DocsEditable() + @Experimental() // untriaged + void set integrity(String val) => JS("void", "#.integrity = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.rel') + @DocsEditable() + String get rel => wrap_jso(JS("String", "#.rel", this.raw)); + @DomName('HTMLAnchorElement.rel') + @DocsEditable() + void set rel(String val) => JS("void", "#.rel = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.target') + @DocsEditable() + String get target => wrap_jso(JS("String", "#.target", this.raw)); + @DomName('HTMLAnchorElement.target') + @DocsEditable() + void set target(String val) => JS("void", "#.target = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.type') + @DocsEditable() + String get type => wrap_jso(JS("String", "#.type", this.raw)); + @DomName('HTMLAnchorElement.type') + @DocsEditable() + void set type(String val) => JS("void", "#.type = #", this.raw, unwrap_jso(val)); + + // From URLUtils + + @DomName('HTMLAnchorElement.hash') + @DocsEditable() + String get hash => wrap_jso(JS("String", "#.hash", this.raw)); + @DomName('HTMLAnchorElement.hash') + @DocsEditable() + void set hash(String val) => JS("void", "#.hash = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.host') + @DocsEditable() + String get host => wrap_jso(JS("String", "#.host", this.raw)); + @DomName('HTMLAnchorElement.host') + @DocsEditable() + void set host(String val) => JS("void", "#.host = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.hostname') + @DocsEditable() + String get hostname => wrap_jso(JS("String", "#.hostname", this.raw)); + @DomName('HTMLAnchorElement.hostname') + @DocsEditable() + void set hostname(String val) => JS("void", "#.hostname = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.href') + @DocsEditable() + String get href => wrap_jso(JS("String", "#.href", this.raw)); + @DomName('HTMLAnchorElement.href') + @DocsEditable() + void set href(String val) => JS("void", "#.href = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.origin') + @DocsEditable() + // WebKit only + @Experimental() // non-standard + String get origin => wrap_jso(JS("String", "#.origin", this.raw)); + + @DomName('HTMLAnchorElement.password') + @DocsEditable() + @Experimental() // untriaged + String get password => wrap_jso(JS("String", "#.password", this.raw)); + @DomName('HTMLAnchorElement.password') + @DocsEditable() + @Experimental() // untriaged + void set password(String val) => JS("void", "#.password = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.pathname') + @DocsEditable() + String get pathname => wrap_jso(JS("String", "#.pathname", this.raw)); + @DomName('HTMLAnchorElement.pathname') + @DocsEditable() + void set pathname(String val) => JS("void", "#.pathname = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.port') + @DocsEditable() + String get port => wrap_jso(JS("String", "#.port", this.raw)); + @DomName('HTMLAnchorElement.port') + @DocsEditable() + void set port(String val) => JS("void", "#.port = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.protocol') + @DocsEditable() + String get protocol => wrap_jso(JS("String", "#.protocol", this.raw)); + @DomName('HTMLAnchorElement.protocol') + @DocsEditable() + void set protocol(String val) => JS("void", "#.protocol = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.search') + @DocsEditable() + String get search => wrap_jso(JS("String", "#.search", this.raw)); + @DomName('HTMLAnchorElement.search') + @DocsEditable() + void set search(String val) => JS("void", "#.search = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLAnchorElement.username') + @DocsEditable() + @Experimental() // untriaged + String get username => wrap_jso(JS("String", "#.username", this.raw)); + @DomName('HTMLAnchorElement.username') + @DocsEditable() + @Experimental() // untriaged + void set username(String val) => JS("void", "#.username = #", this.raw, unwrap_jso(val)); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('HTMLBaseElement') +@Native("HTMLBaseElement") +class BaseElement extends HtmlElement { + // To suppress missing implicit constructor warnings. + factory BaseElement._() { throw new UnsupportedError("Not supported"); } + + @DomName('HTMLBaseElement.HTMLBaseElement') + @DocsEditable() + factory BaseElement() => document.createElement("base"); + + + @Deprecated("Internal Use Only") + static BaseElement internalCreateBaseElement() { + return new BaseElement.internal_(); + } + + @Deprecated("Internal Use Only") + BaseElement.internal_() : super.internal_(); + + + @DomName('HTMLBaseElement.href') + @DocsEditable() + String get href => wrap_jso(JS("String", "#.href", this.raw)); + @DomName('HTMLBaseElement.href') + @DocsEditable() + void set href(String val) => JS("void", "#.href = #", this.raw, unwrap_jso(val)); + + @DomName('HTMLBaseElement.target') + @DocsEditable() + String get target => wrap_jso(JS("String", "#.target", this.raw)); + @DomName('HTMLBaseElement.target') + @DocsEditable() + void set target(String val) => JS("void", "#.target = #", this.raw, unwrap_jso(val)); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('HTMLBodyElement') +@Native("HTMLBodyElement") +class BodyElement extends HtmlElement { + // To suppress missing implicit constructor warnings. + factory BodyElement._() { throw new UnsupportedError("Not supported"); } + + /** + * Static factory designed to expose `blur` events to event + * handlers that are not necessarily instances of [BodyElement]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('HTMLBodyElement.blurEvent') + @DocsEditable() + static const EventStreamProvider blurEvent = const EventStreamProvider('blur'); + + /** + * Static factory designed to expose `error` events to event + * handlers that are not necessarily instances of [BodyElement]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('HTMLBodyElement.errorEvent') + @DocsEditable() + static const EventStreamProvider errorEvent = const EventStreamProvider('error'); + + /** + * Static factory designed to expose `focus` events to event + * handlers that are not necessarily instances of [BodyElement]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('HTMLBodyElement.focusEvent') + @DocsEditable() + static const EventStreamProvider focusEvent = const EventStreamProvider('focus'); + + /** + * Static factory designed to expose `load` events to event + * handlers that are not necessarily instances of [BodyElement]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('HTMLBodyElement.loadEvent') + @DocsEditable() + static const EventStreamProvider loadEvent = const EventStreamProvider('load'); + + /** + * Static factory designed to expose `resize` events to event + * handlers that are not necessarily instances of [BodyElement]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('HTMLBodyElement.resizeEvent') + @DocsEditable() + static const EventStreamProvider resizeEvent = const EventStreamProvider('resize'); + + @DomName('HTMLBodyElement.scrollEvent') + @DocsEditable() + @Experimental() // untriaged + static const EventStreamProvider scrollEvent = const EventStreamProvider('scroll'); + + @DomName('HTMLBodyElement.HTMLBodyElement') + @DocsEditable() + factory BodyElement() => document.createElement("body"); + + + @Deprecated("Internal Use Only") + static BodyElement internalCreateBodyElement() { + return new BodyElement.internal_(); + } + + @Deprecated("Internal Use Only") + BodyElement.internal_() : super.internal_(); + + + /// Stream of `blur` events handled by this [BodyElement]. + @DomName('HTMLBodyElement.onblur') + @DocsEditable() + ElementStream get onBlur => blurEvent.forElement(this); + + /// Stream of `error` events handled by this [BodyElement]. + @DomName('HTMLBodyElement.onerror') + @DocsEditable() + ElementStream get onError => errorEvent.forElement(this); + + /// Stream of `focus` events handled by this [BodyElement]. + @DomName('HTMLBodyElement.onfocus') + @DocsEditable() + ElementStream get onFocus => focusEvent.forElement(this); + + /// Stream of `load` events handled by this [BodyElement]. + @DomName('HTMLBodyElement.onload') + @DocsEditable() + ElementStream get onLoad => loadEvent.forElement(this); + + /// Stream of `resize` events handled by this [BodyElement]. + @DomName('HTMLBodyElement.onresize') + @DocsEditable() + ElementStream get onResize => resizeEvent.forElement(this); + + @DomName('HTMLBodyElement.onscroll') + @DocsEditable() + @Experimental() // untriaged + ElementStream get onScroll => scrollEvent.forElement(this); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('CharacterData') +@Native("CharacterData") +class CharacterData extends Node implements ChildNode { + // To suppress missing implicit constructor warnings. + factory CharacterData._() { throw new UnsupportedError("Not supported"); } + + + @Deprecated("Internal Use Only") + static CharacterData internalCreateCharacterData() { + return new CharacterData.internal_(); + } + + @Deprecated("Internal Use Only") + CharacterData.internal_() : super.internal_(); + + + @DomName('CharacterData.data') + @DocsEditable() + String get data => wrap_jso(JS("String", "#.data", this.raw)); + @DomName('CharacterData.data') + @DocsEditable() + void set data(String val) => JS("void", "#.data = #", this.raw, unwrap_jso(val)); + + @DomName('CharacterData.length') + @DocsEditable() + int get length => wrap_jso(JS("int", "#.length", this.raw)); + + @DomName('CharacterData.appendData') + @DocsEditable() + void appendData(String data) { + _appendData_1(data); + return; + } + @JSName('appendData') + @DomName('CharacterData.appendData') + @DocsEditable() + void _appendData_1(data) => wrap_jso(JS("void ", "#.raw.appendData(#)", this, unwrap_jso(data))); + + @DomName('CharacterData.deleteData') + @DocsEditable() + void deleteData(int offset, int length) { + _deleteData_1(offset, length); + return; + } + @JSName('deleteData') + @DomName('CharacterData.deleteData') + @DocsEditable() + void _deleteData_1(offset, length) => wrap_jso(JS("void ", "#.raw.deleteData(#, #)", this, unwrap_jso(offset), unwrap_jso(length))); + + @DomName('CharacterData.insertData') + @DocsEditable() + void insertData(int offset, String data) { + _insertData_1(offset, data); + return; + } + @JSName('insertData') + @DomName('CharacterData.insertData') + @DocsEditable() + void _insertData_1(offset, data) => wrap_jso(JS("void ", "#.raw.insertData(#, #)", this, unwrap_jso(offset), unwrap_jso(data))); + + @DomName('CharacterData.replaceData') + @DocsEditable() + void replaceData(int offset, int length, String data) { + _replaceData_1(offset, length, data); + return; + } + @JSName('replaceData') + @DomName('CharacterData.replaceData') + @DocsEditable() + void _replaceData_1(offset, length, data) => wrap_jso(JS("void ", "#.raw.replaceData(#, #, #)", this, unwrap_jso(offset), unwrap_jso(length), unwrap_jso(data))); + + @DomName('CharacterData.substringData') + @DocsEditable() + String substringData(int offset, int length) { + return _substringData_1(offset, length); + } + @JSName('substringData') + @DomName('CharacterData.substringData') + @DocsEditable() + String _substringData_1(offset, length) => wrap_jso(JS("String ", "#.raw.substringData(#, #)", this, unwrap_jso(offset), unwrap_jso(length))); + + // From ChildNode + + @DomName('CharacterData.nextElementSibling') + @DocsEditable() + Element get nextElementSibling => wrap_jso(JS("Element", "#.nextElementSibling", this.raw)); + + @DomName('CharacterData.previousElementSibling') + @DocsEditable() + Element get previousElementSibling => wrap_jso(JS("Element", "#.previousElementSibling", this.raw)); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('ChildNode') +@Experimental() // untriaged +abstract class ChildNode extends DartHtmlDomObject { + // To suppress missing implicit constructor warnings. + factory ChildNode._() { throw new UnsupportedError("Not supported"); } + + Element get nextElementSibling => wrap_jso(JS("Element", "#.nextElementSibling", this.raw)); + + Element get previousElementSibling => wrap_jso(JS("Element", "#.previousElementSibling", this.raw)); + + void remove() => wrap_jso(JS("void", "#.raw.remove()", this)); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DomName('Console') +class Console extends DartHtmlDomObject { + + Console._safe(); + + static final Console _safeConsole = new Console._safe(); + + bool get _isConsoleDefined => JS('bool', 'typeof console != "undefined"'); + + @DomName('Console.assertCondition') + void assertCondition(bool condition, Object arg) => _isConsoleDefined ? + JS('void', 'console.assertCondition(#, #)', condition, arg) : null; + + @DomName('Console.clear') + void clear(Object arg) => _isConsoleDefined ? + JS('void', 'console.clear(#)', arg) : null; + + @DomName('Console.count') + void count(Object arg) => _isConsoleDefined ? + JS('void', 'console.count(#)', arg) : null; + + @DomName('Console.debug') + void debug(Object arg) => _isConsoleDefined ? + JS('void', 'console.debug(#)', arg) : null; + + @DomName('Console.dir') + void dir(Object arg) => _isConsoleDefined ? + JS('void', 'console.dir(#)', arg) : null; + + @DomName('Console.dirxml') + void dirxml(Object arg) => _isConsoleDefined ? + JS('void', 'console.dirxml(#)', arg) : null; + + @DomName('Console.error') + void error(Object arg) => _isConsoleDefined ? + JS('void', 'console.error(#)', arg) : null; + + @DomName('Console.group') + void group(Object arg) => _isConsoleDefined ? + JS('void', 'console.group(#)', arg) : null; + + @DomName('Console.groupCollapsed') + void groupCollapsed(Object arg) => _isConsoleDefined ? + JS('void', 'console.groupCollapsed(#)', arg) : null; + + @DomName('Console.groupEnd') + void groupEnd() => _isConsoleDefined ? + JS('void', 'console.groupEnd()') : null; + + @DomName('Console.info') + void info(Object arg) => _isConsoleDefined ? + JS('void', 'console.info(#)', arg) : null; + + @DomName('Console.log') + void log(Object arg) => _isConsoleDefined ? + JS('void', 'console.log(#)', arg) : null; + + @DomName('Console.markTimeline') + void markTimeline(Object arg) => _isConsoleDefined ? + JS('void', 'console.markTimeline(#)', arg) : null; + + @DomName('Console.profile') + void profile(String title) => _isConsoleDefined ? + JS('void', 'console.profile(#)', title) : null; + + @DomName('Console.profileEnd') + void profileEnd(String title) => _isConsoleDefined ? + JS('void', 'console.profileEnd(#)', title) : null; + + @DomName('Console.table') + void table(Object arg) => _isConsoleDefined ? + JS('void', 'console.table(#)', arg) : null; + + @DomName('Console.time') + void time(String title) => _isConsoleDefined ? + JS('void', 'console.time(#)', title) : null; + + @DomName('Console.timeEnd') + void timeEnd(String title) => _isConsoleDefined ? + JS('void', 'console.timeEnd(#)', title) : null; + + @DomName('Console.timeStamp') + void timeStamp(Object arg) => _isConsoleDefined ? + JS('void', 'console.timeStamp(#)', arg) : null; + + @DomName('Console.trace') + void trace(Object arg) => _isConsoleDefined ? + JS('void', 'console.trace(#)', arg) : null; + + @DomName('Console.warn') + void warn(Object arg) => _isConsoleDefined ? + JS('void', 'console.warn(#)', arg) : null; + // To suppress missing implicit constructor warnings. + factory Console._() { throw new UnsupportedError("Not supported"); } + + + @Deprecated("Internal Use Only") + static Console internalCreateConsole() { + return new Console.internal_(); + } + + @Deprecated("Internal Use Only") + Console.internal_() : super.internal_(); + + +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('ConsoleBase') +@Experimental() // untriaged +@Native("ConsoleBase") +class ConsoleBase extends DartHtmlDomObject { + // To suppress missing implicit constructor warnings. + factory ConsoleBase._() { throw new UnsupportedError("Not supported"); } + + @Deprecated("Internal Use Only") + static ConsoleBase internalCreateConsoleBase() { + return new ConsoleBase.internal_(); + } + + @Deprecated("Internal Use Only") + ConsoleBase.internal_() { } + + bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); + int get hashCode => unwrap_jso(this).hashCode; + + @DomName('ConsoleBase.timeline') + @DocsEditable() + @Experimental() // untriaged + void timeline(String title) { + _timeline_1(title); + return; + } + @JSName('timeline') + @DomName('ConsoleBase.timeline') + @DocsEditable() + @Experimental() // untriaged + void _timeline_1(title) => wrap_jso(JS("void ", "#.raw.timeline(#)", this, unwrap_jso(title))); + + @DomName('ConsoleBase.timelineEnd') + @DocsEditable() + @Experimental() // untriaged + void timelineEnd(String title) { + _timelineEnd_1(title); + return; + } + @JSName('timelineEnd') + @DomName('ConsoleBase.timelineEnd') + @DocsEditable() + @Experimental() // untriaged + void _timelineEnd_1(title) => wrap_jso(JS("void ", "#.raw.timelineEnd(#)", this, unwrap_jso(title))); +} + +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// WARNING: DO NOT EDIT THIS TEMPLATE FILE. +// The template file was generated by scripts/css_code_generator.py + +// Source of CSS properties: +// CSSPropertyNames.in + + +@DomName('CSSStyleDeclaration') +@Native("CSSStyleDeclaration,MSStyleCSSProperties,CSS2Properties") +class CssStyleDeclaration extends DartHtmlDomObject with + CssStyleDeclarationBase { + factory CssStyleDeclaration() => new CssStyleDeclaration.css(''); + + factory CssStyleDeclaration.css(String css) { + final style = new Element.tag('div').style; + style.cssText = css; + return style; + } + + String getPropertyValue(String propertyName) { + var propValue = _getPropertyValueHelper(propertyName); + return propValue != null ? propValue : ''; + } + + String _getPropertyValueHelper(String propertyName) { + if (_supportsProperty(_camelCase(propertyName))) { + return _getPropertyValue(propertyName); + } else { + return _getPropertyValue(Device.cssPrefix + propertyName); + } + } + + /** + * Returns true if the provided *CSS* property name is supported on this + * element. + * + * Please note the property name camelCase, not-hyphens. This + * method returns true if the property is accessible via an unprefixed _or_ + * prefixed property. + */ + bool supportsProperty(String propertyName) { + return _supportsProperty(propertyName) || + _supportsProperty(_camelCase(Device.cssPrefix + propertyName)); + } + + bool _supportsProperty(String propertyName) { + return JS('bool', '# in #', propertyName, this.raw); + } + + + @DomName('CSSStyleDeclaration.setProperty') + void setProperty(String propertyName, String value, [String priority]) { + return _setPropertyHelper(_browserPropertyName(propertyName), + value, priority); + } + + String _browserPropertyName(String propertyName) { + String name = _readCache(propertyName); + if (name is String) return name; + if (_supportsProperty(_camelCase(propertyName))) { + name = propertyName; + } else { + name = Device.cssPrefix + propertyName; + } + _writeCache(propertyName, name); + return name; + } + + static String _readCache(String key) => null; + static void _writeCache(String key, value) {} + + static String _camelCase(String hyphenated) { + // The "ms" prefix is always lowercased. + return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped( + new RegExp('-([a-z]+)', caseSensitive: false), + (match) => match[0][1].toUpperCase() + match[0].substring(2)); + } + + void _setPropertyHelper(String propertyName, String value, [String priority]) { + if (value == null) value = ''; + if (priority == null) priority = ''; + JS('void', '#.setProperty(#, #, #)', this.raw, propertyName, value, priority); + } + + /** + * Checks to see if CSS Transitions are supported. + */ + static bool get supportsTransitions { + return document.body.style.supportsProperty('transition'); + } + // To suppress missing implicit constructor warnings. + factory CssStyleDeclaration._() { throw new UnsupportedError("Not supported"); } + + @Deprecated("Internal Use Only") + static CssStyleDeclaration internalCreateCssStyleDeclaration() { + return new CssStyleDeclaration.internal_(); + } + + @Deprecated("Internal Use Only") + CssStyleDeclaration.internal_() { } + + bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); + int get hashCode => unwrap_jso(this).hashCode; + + @DomName('CSSStyleDeclaration.cssText') + @DocsEditable() + String get cssText => wrap_jso(JS("String", "#.cssText", this.raw)); + @DomName('CSSStyleDeclaration.cssText') + @DocsEditable() + void set cssText(String val) => JS("void", "#.cssText = #", this.raw, unwrap_jso(val)); + + @DomName('CSSStyleDeclaration.length') + @DocsEditable() + int get length => wrap_jso(JS("int", "#.length", this.raw)); + + @DomName('CSSStyleDeclaration.__getter__') + @DocsEditable() + @Experimental() // untriaged + Object __getter__(String name) { + return __getter___1(name); + } + @JSName('__getter__') + @DomName('CSSStyleDeclaration.__getter__') + @DocsEditable() + @Experimental() // untriaged + Object __getter___1(name) => wrap_jso(JS("Object ", "#.raw.__getter__(#)", this, unwrap_jso(name))); + + @DomName('CSSStyleDeclaration.__setter__') + @DocsEditable() + void __setter__(String propertyName, String propertyValue) { + __setter___1(propertyName, propertyValue); + return; + } + @JSName('__setter__') + @DomName('CSSStyleDeclaration.__setter__') + @DocsEditable() + void __setter___1(propertyName, propertyValue) => wrap_jso(JS("void ", "#.raw.__setter__(#, #)", this, unwrap_jso(propertyName), unwrap_jso(propertyValue))); + + @DomName('CSSStyleDeclaration.getPropertyPriority') + @DocsEditable() + String getPropertyPriority(String propertyName) { + return _getPropertyPriority_1(propertyName); + } + @JSName('getPropertyPriority') + @DomName('CSSStyleDeclaration.getPropertyPriority') + @DocsEditable() + String _getPropertyPriority_1(propertyName) => wrap_jso(JS("String ", "#.raw.getPropertyPriority(#)", this, unwrap_jso(propertyName))); + + @DomName('CSSStyleDeclaration.getPropertyValue') + @DocsEditable() + String _getPropertyValue(String propertyName) { + return _getPropertyValue_1(propertyName); + } + @JSName('getPropertyValue') + @DomName('CSSStyleDeclaration.getPropertyValue') + @DocsEditable() + String _getPropertyValue_1(propertyName) => wrap_jso(JS("String ", "#.raw.getPropertyValue(#)", this, unwrap_jso(propertyName))); + + @DomName('CSSStyleDeclaration.item') + @DocsEditable() + String item(int index) { + return _item_1(index); + } + @JSName('item') + @DomName('CSSStyleDeclaration.item') + @DocsEditable() + String _item_1(index) => wrap_jso(JS("String ", "#.raw.item(#)", this, unwrap_jso(index))); + + @DomName('CSSStyleDeclaration.removeProperty') + @DocsEditable() + String removeProperty(String propertyName) { + return _removeProperty_1(propertyName); + } + @JSName('removeProperty') + @DomName('CSSStyleDeclaration.removeProperty') + @DocsEditable() + String _removeProperty_1(propertyName) => wrap_jso(JS("String ", "#.raw.removeProperty(#)", this, unwrap_jso(propertyName))); + +} + +class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase { + final Iterable _elementIterable; + Iterable _elementCssStyleDeclarationSetIterable; + + _CssStyleDeclarationSet(this._elementIterable) { + _elementCssStyleDeclarationSetIterable = new List.from( + _elementIterable).map((e) => e.style); + } + + String getPropertyValue(String propertyName) => + _elementCssStyleDeclarationSetIterable.first.getPropertyValue( + propertyName); + + void setProperty(String propertyName, String value, [String priority]) { + _elementCssStyleDeclarationSetIterable.forEach((e) => + e.setProperty(propertyName, value, priority)); + } + + + + // Important note: CssStyleDeclarationSet does NOT implement every method + // available in CssStyleDeclaration. Some of the methods don't make so much + // sense in terms of having a resonable value to return when you're + // considering a list of Elements. You will need to manually add any of the + // items in the MEMBERS set if you want that functionality. +} + +class CssStyleDeclarationBase { + String getPropertyValue(String propertyName) => + throw new StateError('getProperty not overridden in dart:html'); + void setProperty(String propertyName, String value, [String priority]) => + throw new StateError('setProperty not overridden in dart:html'); + + /** Gets the value of "align-content" */ + String get alignContent => + getPropertyValue('align-content'); + + /** Sets the value of "align-content" */ + set alignContent(String value) { + setProperty('align-content', value, ''); + } + + /** Gets the value of "align-items" */ + String get alignItems => + getPropertyValue('align-items'); + + /** Sets the value of "align-items" */ + set alignItems(String value) { + setProperty('align-items', value, ''); + } + + /** Gets the value of "align-self" */ + String get alignSelf => + getPropertyValue('align-self'); + + /** Sets the value of "align-self" */ + set alignSelf(String value) { + setProperty('align-self', value, ''); + } + + /** Gets the value of "animation" */ + String get animation => + getPropertyValue('animation'); + + /** Sets the value of "animation" */ + set animation(String value) { + setProperty('animation', value, ''); + } + + /** Gets the value of "animation-delay" */ + String get animationDelay => + getPropertyValue('animation-delay'); + + /** Sets the value of "animation-delay" */ + set animationDelay(String value) { + setProperty('animation-delay', value, ''); + } + + /** Gets the value of "animation-direction" */ + String get animationDirection => + getPropertyValue('animation-direction'); + + /** Sets the value of "animation-direction" */ + set animationDirection(String value) { + setProperty('animation-direction', value, ''); + } + + /** Gets the value of "animation-duration" */ + String get animationDuration => + getPropertyValue('animation-duration'); + + /** Sets the value of "animation-duration" */ + set animationDuration(String value) { + setProperty('animation-duration', value, ''); + } + + /** Gets the value of "animation-fill-mode" */ + String get animationFillMode => + getPropertyValue('animation-fill-mode'); + + /** Sets the value of "animation-fill-mode" */ + set animationFillMode(String value) { + setProperty('animation-fill-mode', value, ''); + } + + /** Gets the value of "animation-iteration-count" */ + String get animationIterationCount => + getPropertyValue('animation-iteration-count'); + + /** Sets the value of "animation-iteration-count" */ + set animationIterationCount(String value) { + setProperty('animation-iteration-count', value, ''); + } + + /** Gets the value of "animation-name" */ + String get animationName => + getPropertyValue('animation-name'); + + /** Sets the value of "animation-name" */ + set animationName(String value) { + setProperty('animation-name', value, ''); + } + + /** Gets the value of "animation-play-state" */ + String get animationPlayState => + getPropertyValue('animation-play-state'); + + /** Sets the value of "animation-play-state" */ + set animationPlayState(String value) { + setProperty('animation-play-state', value, ''); + } + + /** Gets the value of "animation-timing-function" */ + String get animationTimingFunction => + getPropertyValue('animation-timing-function'); + + /** Sets the value of "animation-timing-function" */ + set animationTimingFunction(String value) { + setProperty('animation-timing-function', value, ''); + } + + /** Gets the value of "app-region" */ + String get appRegion => + getPropertyValue('app-region'); + + /** Sets the value of "app-region" */ + set appRegion(String value) { + setProperty('app-region', value, ''); + } + + /** Gets the value of "appearance" */ + String get appearance => + getPropertyValue('appearance'); + + /** Sets the value of "appearance" */ + set appearance(String value) { + setProperty('appearance', value, ''); + } + + /** Gets the value of "aspect-ratio" */ + String get aspectRatio => + getPropertyValue('aspect-ratio'); + + /** Sets the value of "aspect-ratio" */ + set aspectRatio(String value) { + setProperty('aspect-ratio', value, ''); + } + + /** Gets the value of "backface-visibility" */ + String get backfaceVisibility => + getPropertyValue('backface-visibility'); + + /** Sets the value of "backface-visibility" */ + set backfaceVisibility(String value) { + setProperty('backface-visibility', value, ''); + } + + /** Gets the value of "background" */ + String get background => + getPropertyValue('background'); + + /** Sets the value of "background" */ + set background(String value) { + setProperty('background', value, ''); + } + + /** Gets the value of "background-attachment" */ + String get backgroundAttachment => + getPropertyValue('background-attachment'); + + /** Sets the value of "background-attachment" */ + set backgroundAttachment(String value) { + setProperty('background-attachment', value, ''); + } + + /** Gets the value of "background-blend-mode" */ + String get backgroundBlendMode => + getPropertyValue('background-blend-mode'); + + /** Sets the value of "background-blend-mode" */ + set backgroundBlendMode(String value) { + setProperty('background-blend-mode', value, ''); + } + + /** Gets the value of "background-clip" */ + String get backgroundClip => + getPropertyValue('background-clip'); + + /** Sets the value of "background-clip" */ + set backgroundClip(String value) { + setProperty('background-clip', value, ''); + } + + /** Gets the value of "background-color" */ + String get backgroundColor => + getPropertyValue('background-color'); + + /** Sets the value of "background-color" */ + set backgroundColor(String value) { + setProperty('background-color', value, ''); + } + + /** Gets the value of "background-composite" */ + String get backgroundComposite => + getPropertyValue('background-composite'); + + /** Sets the value of "background-composite" */ + set backgroundComposite(String value) { + setProperty('background-composite', value, ''); + } + + /** Gets the value of "background-image" */ + String get backgroundImage => + getPropertyValue('background-image'); + + /** Sets the value of "background-image" */ + set backgroundImage(String value) { + setProperty('background-image', value, ''); + } + + /** Gets the value of "background-origin" */ + String get backgroundOrigin => + getPropertyValue('background-origin'); + + /** Sets the value of "background-origin" */ + set backgroundOrigin(String value) { + setProperty('background-origin', value, ''); + } + + /** Gets the value of "background-position" */ + String get backgroundPosition => + getPropertyValue('background-position'); + + /** Sets the value of "background-position" */ + set backgroundPosition(String value) { + setProperty('background-position', value, ''); + } + + /** Gets the value of "background-position-x" */ + String get backgroundPositionX => + getPropertyValue('background-position-x'); + + /** Sets the value of "background-position-x" */ + set backgroundPositionX(String value) { + setProperty('background-position-x', value, ''); + } + + /** Gets the value of "background-position-y" */ + String get backgroundPositionY => + getPropertyValue('background-position-y'); + + /** Sets the value of "background-position-y" */ + set backgroundPositionY(String value) { + setProperty('background-position-y', value, ''); + } + + /** Gets the value of "background-repeat" */ + String get backgroundRepeat => + getPropertyValue('background-repeat'); + + /** Sets the value of "background-repeat" */ + set backgroundRepeat(String value) { + setProperty('background-repeat', value, ''); + } + + /** Gets the value of "background-repeat-x" */ + String get backgroundRepeatX => + getPropertyValue('background-repeat-x'); + + /** Sets the value of "background-repeat-x" */ + set backgroundRepeatX(String value) { + setProperty('background-repeat-x', value, ''); + } + + /** Gets the value of "background-repeat-y" */ + String get backgroundRepeatY => + getPropertyValue('background-repeat-y'); + + /** Sets the value of "background-repeat-y" */ + set backgroundRepeatY(String value) { + setProperty('background-repeat-y', value, ''); + } + + /** Gets the value of "background-size" */ + String get backgroundSize => + getPropertyValue('background-size'); + + /** Sets the value of "background-size" */ + set backgroundSize(String value) { + setProperty('background-size', value, ''); + } + + /** Gets the value of "border" */ + String get border => + getPropertyValue('border'); + + /** Sets the value of "border" */ + set border(String value) { + setProperty('border', value, ''); + } + + /** Gets the value of "border-after" */ + String get borderAfter => + getPropertyValue('border-after'); + + /** Sets the value of "border-after" */ + set borderAfter(String value) { + setProperty('border-after', value, ''); + } + + /** Gets the value of "border-after-color" */ + String get borderAfterColor => + getPropertyValue('border-after-color'); + + /** Sets the value of "border-after-color" */ + set borderAfterColor(String value) { + setProperty('border-after-color', value, ''); + } + + /** Gets the value of "border-after-style" */ + String get borderAfterStyle => + getPropertyValue('border-after-style'); + + /** Sets the value of "border-after-style" */ + set borderAfterStyle(String value) { + setProperty('border-after-style', value, ''); + } + + /** Gets the value of "border-after-width" */ + String get borderAfterWidth => + getPropertyValue('border-after-width'); + + /** Sets the value of "border-after-width" */ + set borderAfterWidth(String value) { + setProperty('border-after-width', value, ''); + } + + /** Gets the value of "border-before" */ + String get borderBefore => + getPropertyValue('border-before'); + + /** Sets the value of "border-before" */ + set borderBefore(String value) { + setProperty('border-before', value, ''); + } + + /** Gets the value of "border-before-color" */ + String get borderBeforeColor => + getPropertyValue('border-before-color'); + + /** Sets the value of "border-before-color" */ + set borderBeforeColor(String value) { + setProperty('border-before-color', value, ''); + } + + /** Gets the value of "border-before-style" */ + String get borderBeforeStyle => + getPropertyValue('border-before-style'); + + /** Sets the value of "border-before-style" */ + set borderBeforeStyle(String value) { + setProperty('border-before-style', value, ''); + } + + /** Gets the value of "border-before-width" */ + String get borderBeforeWidth => + getPropertyValue('border-before-width'); + + /** Sets the value of "border-before-width" */ + set borderBeforeWidth(String value) { + setProperty('border-before-width', value, ''); + } + + /** Gets the value of "border-bottom" */ + String get borderBottom => + getPropertyValue('border-bottom'); + + /** Sets the value of "border-bottom" */ + set borderBottom(String value) { + setProperty('border-bottom', value, ''); + } + + /** Gets the value of "border-bottom-color" */ + String get borderBottomColor => + getPropertyValue('border-bottom-color'); + + /** Sets the value of "border-bottom-color" */ + set borderBottomColor(String value) { + setProperty('border-bottom-color', value, ''); + } + + /** Gets the value of "border-bottom-left-radius" */ + String get borderBottomLeftRadius => + getPropertyValue('border-bottom-left-radius'); + + /** Sets the value of "border-bottom-left-radius" */ + set borderBottomLeftRadius(String value) { + setProperty('border-bottom-left-radius', value, ''); + } + + /** Gets the value of "border-bottom-right-radius" */ + String get borderBottomRightRadius => + getPropertyValue('border-bottom-right-radius'); + + /** Sets the value of "border-bottom-right-radius" */ + set borderBottomRightRadius(String value) { + setProperty('border-bottom-right-radius', value, ''); + } + + /** Gets the value of "border-bottom-style" */ + String get borderBottomStyle => + getPropertyValue('border-bottom-style'); + + /** Sets the value of "border-bottom-style" */ + set borderBottomStyle(String value) { + setProperty('border-bottom-style', value, ''); + } + + /** Gets the value of "border-bottom-width" */ + String get borderBottomWidth => + getPropertyValue('border-bottom-width'); + + /** Sets the value of "border-bottom-width" */ + set borderBottomWidth(String value) { + setProperty('border-bottom-width', value, ''); + } + + /** Gets the value of "border-collapse" */ + String get borderCollapse => + getPropertyValue('border-collapse'); + + /** Sets the value of "border-collapse" */ + set borderCollapse(String value) { + setProperty('border-collapse', value, ''); + } + + /** Gets the value of "border-color" */ + String get borderColor => + getPropertyValue('border-color'); + + /** Sets the value of "border-color" */ + set borderColor(String value) { + setProperty('border-color', value, ''); + } + + /** Gets the value of "border-end" */ + String get borderEnd => + getPropertyValue('border-end'); + + /** Sets the value of "border-end" */ + set borderEnd(String value) { + setProperty('border-end', value, ''); + } + + /** Gets the value of "border-end-color" */ + String get borderEndColor => + getPropertyValue('border-end-color'); + + /** Sets the value of "border-end-color" */ + set borderEndColor(String value) { + setProperty('border-end-color', value, ''); + } + + /** Gets the value of "border-end-style" */ + String get borderEndStyle => + getPropertyValue('border-end-style'); + + /** Sets the value of "border-end-style" */ + set borderEndStyle(String value) { + setProperty('border-end-style', value, ''); + } + + /** Gets the value of "border-end-width" */ + String get borderEndWidth => + getPropertyValue('border-end-width'); + + /** Sets the value of "border-end-width" */ + set borderEndWidth(String value) { + setProperty('border-end-width', value, ''); + } + + /** Gets the value of "border-fit" */ + String get borderFit => + getPropertyValue('border-fit'); + + /** Sets the value of "border-fit" */ + set borderFit(String value) { + setProperty('border-fit', value, ''); + } + + /** Gets the value of "border-horizontal-spacing" */ + String get borderHorizontalSpacing => + getPropertyValue('border-horizontal-spacing'); + + /** Sets the value of "border-horizontal-spacing" */ + set borderHorizontalSpacing(String value) { + setProperty('border-horizontal-spacing', value, ''); + } + + /** Gets the value of "border-image" */ + String get borderImage => + getPropertyValue('border-image'); + + /** Sets the value of "border-image" */ + set borderImage(String value) { + setProperty('border-image', value, ''); + } + + /** Gets the value of "border-image-outset" */ + String get borderImageOutset => + getPropertyValue('border-image-outset'); + + /** Sets the value of "border-image-outset" */ + set borderImageOutset(String value) { + setProperty('border-image-outset', value, ''); + } + + /** Gets the value of "border-image-repeat" */ + String get borderImageRepeat => + getPropertyValue('border-image-repeat'); + + /** Sets the value of "border-image-repeat" */ + set borderImageRepeat(String value) { + setProperty('border-image-repeat', value, ''); + } + + /** Gets the value of "border-image-slice" */ + String get borderImageSlice => + getPropertyValue('border-image-slice'); + + /** Sets the value of "border-image-slice" */ + set borderImageSlice(String value) { + setProperty('border-image-slice', value, ''); + } + + /** Gets the value of "border-image-source" */ + String get borderImageSource => + getPropertyValue('border-image-source'); + + /** Sets the value of "border-image-source" */ + set borderImageSource(String value) { + setProperty('border-image-source', value, ''); + } + + /** Gets the value of "border-image-width" */ + String get borderImageWidth => + getPropertyValue('border-image-width'); + + /** Sets the value of "border-image-width" */ + set borderImageWidth(String value) { + setProperty('border-image-width', value, ''); + } + + /** Gets the value of "border-left" */ + String get borderLeft => + getPropertyValue('border-left'); + + /** Sets the value of "border-left" */ + set borderLeft(String value) { + setProperty('border-left', value, ''); + } + + /** Gets the value of "border-left-color" */ + String get borderLeftColor => + getPropertyValue('border-left-color'); + + /** Sets the value of "border-left-color" */ + set borderLeftColor(String value) { + setProperty('border-left-color', value, ''); + } + + /** Gets the value of "border-left-style" */ + String get borderLeftStyle => + getPropertyValue('border-left-style'); + + /** Sets the value of "border-left-style" */ + set borderLeftStyle(String value) { + setProperty('border-left-style', value, ''); + } + + /** Gets the value of "border-left-width" */ + String get borderLeftWidth => + getPropertyValue('border-left-width'); + + /** Sets the value of "border-left-width" */ + set borderLeftWidth(String value) { + setProperty('border-left-width', value, ''); + } + + /** Gets the value of "border-radius" */ + String get borderRadius => + getPropertyValue('border-radius'); + + /** Sets the value of "border-radius" */ + set borderRadius(String value) { + setProperty('border-radius', value, ''); + } + + /** Gets the value of "border-right" */ + String get borderRight => + getPropertyValue('border-right'); + + /** Sets the value of "border-right" */ + set borderRight(String value) { + setProperty('border-right', value, ''); + } + + /** Gets the value of "border-right-color" */ + String get borderRightColor => + getPropertyValue('border-right-color'); + + /** Sets the value of "border-right-color" */ + set borderRightColor(String value) { + setProperty('border-right-color', value, ''); + } + + /** Gets the value of "border-right-style" */ + String get borderRightStyle => + getPropertyValue('border-right-style'); + + /** Sets the value of "border-right-style" */ + set borderRightStyle(String value) { + setProperty('border-right-style', value, ''); + } + + /** Gets the value of "border-right-width" */ + String get borderRightWidth => + getPropertyValue('border-right-width'); + + /** Sets the value of "border-right-width" */ + set borderRightWidth(String value) { + setProperty('border-right-width', value, ''); + } + + /** Gets the value of "border-spacing" */ + String get borderSpacing => + getPropertyValue('border-spacing'); + + /** Sets the value of "border-spacing" */ + set borderSpacing(String value) { + setProperty('border-spacing', value, ''); + } + + /** Gets the value of "border-start" */ + String get borderStart => + getPropertyValue('border-start'); + + /** Sets the value of "border-start" */ + set borderStart(String value) { + setProperty('border-start', value, ''); + } + + /** Gets the value of "border-start-color" */ + String get borderStartColor => + getPropertyValue('border-start-color'); + + /** Sets the value of "border-start-color" */ + set borderStartColor(String value) { + setProperty('border-start-color', value, ''); + } + + /** Gets the value of "border-start-style" */ + String get borderStartStyle => + getPropertyValue('border-start-style'); + + /** Sets the value of "border-start-style" */ + set borderStartStyle(String value) { + setProperty('border-start-style', value, ''); + } + + /** Gets the value of "border-start-width" */ + String get borderStartWidth => + getPropertyValue('border-start-width'); + + /** Sets the value of "border-start-width" */ + set borderStartWidth(String value) { + setProperty('border-start-width', value, ''); + } + + /** Gets the value of "border-style" */ + String get borderStyle => + getPropertyValue('border-style'); + + /** Sets the value of "border-style" */ + set borderStyle(String value) { + setProperty('border-style', value, ''); + } + + /** Gets the value of "border-top" */ + String get borderTop => + getPropertyValue('border-top'); + + /** Sets the value of "border-top" */ + set borderTop(String value) { + setProperty('border-top', value, ''); + } + + /** Gets the value of "border-top-color" */ + String get borderTopColor => + getPropertyValue('border-top-color'); + + /** Sets the value of "border-top-color" */ + set borderTopColor(String value) { + setProperty('border-top-color', value, ''); + } + + /** Gets the value of "border-top-left-radius" */ + String get borderTopLeftRadius => + getPropertyValue('border-top-left-radius'); + + /** Sets the value of "border-top-left-radius" */ + set borderTopLeftRadius(String value) { + setProperty('border-top-left-radius', value, ''); + } + + /** Gets the value of "border-top-right-radius" */ + String get borderTopRightRadius => + getPropertyValue('border-top-right-radius'); + + /** Sets the value of "border-top-right-radius" */ + set borderTopRightRadius(String value) { + setProperty('border-top-right-radius', value, ''); + } + + /** Gets the value of "border-top-style" */ + String get borderTopStyle => + getPropertyValue('border-top-style'); + + /** Sets the value of "border-top-style" */ + set borderTopStyle(String value) { + setProperty('border-top-style', value, ''); + } + + /** Gets the value of "border-top-width" */ + String get borderTopWidth => + getPropertyValue('border-top-width'); + + /** Sets the value of "border-top-width" */ + set borderTopWidth(String value) { + setProperty('border-top-width', value, ''); + } + + /** Gets the value of "border-vertical-spacing" */ + String get borderVerticalSpacing => + getPropertyValue('border-vertical-spacing'); + + /** Sets the value of "border-vertical-spacing" */ + set borderVerticalSpacing(String value) { + setProperty('border-vertical-spacing', value, ''); + } + + /** Gets the value of "border-width" */ + String get borderWidth => + getPropertyValue('border-width'); + + /** Sets the value of "border-width" */ + set borderWidth(String value) { + setProperty('border-width', value, ''); + } + + /** Gets the value of "bottom" */ + String get bottom => + getPropertyValue('bottom'); + + /** Sets the value of "bottom" */ + set bottom(String value) { + setProperty('bottom', value, ''); + } + + /** Gets the value of "box-align" */ + String get boxAlign => + getPropertyValue('box-align'); + + /** Sets the value of "box-align" */ + set boxAlign(String value) { + setProperty('box-align', value, ''); + } + + /** Gets the value of "box-decoration-break" */ + String get boxDecorationBreak => + getPropertyValue('box-decoration-break'); + + /** Sets the value of "box-decoration-break" */ + set boxDecorationBreak(String value) { + setProperty('box-decoration-break', value, ''); + } + + /** Gets the value of "box-direction" */ + String get boxDirection => + getPropertyValue('box-direction'); + + /** Sets the value of "box-direction" */ + set boxDirection(String value) { + setProperty('box-direction', value, ''); + } + + /** Gets the value of "box-flex" */ + String get boxFlex => + getPropertyValue('box-flex'); + + /** Sets the value of "box-flex" */ + set boxFlex(String value) { + setProperty('box-flex', value, ''); + } + + /** Gets the value of "box-flex-group" */ + String get boxFlexGroup => + getPropertyValue('box-flex-group'); + + /** Sets the value of "box-flex-group" */ + set boxFlexGroup(String value) { + setProperty('box-flex-group', value, ''); + } + + /** Gets the value of "box-lines" */ + String get boxLines => + getPropertyValue('box-lines'); + + /** Sets the value of "box-lines" */ + set boxLines(String value) { + setProperty('box-lines', value, ''); + } + + /** Gets the value of "box-ordinal-group" */ + String get boxOrdinalGroup => + getPropertyValue('box-ordinal-group'); + + /** Sets the value of "box-ordinal-group" */ + set boxOrdinalGroup(String value) { + setProperty('box-ordinal-group', value, ''); + } + + /** Gets the value of "box-orient" */ + String get boxOrient => + getPropertyValue('box-orient'); + + /** Sets the value of "box-orient" */ + set boxOrient(String value) { + setProperty('box-orient', value, ''); + } + + /** Gets the value of "box-pack" */ + String get boxPack => + getPropertyValue('box-pack'); + + /** Sets the value of "box-pack" */ + set boxPack(String value) { + setProperty('box-pack', value, ''); + } + + /** Gets the value of "box-reflect" */ + String get boxReflect => + getPropertyValue('box-reflect'); + + /** Sets the value of "box-reflect" */ + set boxReflect(String value) { + setProperty('box-reflect', value, ''); + } + + /** Gets the value of "box-shadow" */ + String get boxShadow => + getPropertyValue('box-shadow'); + + /** Sets the value of "box-shadow" */ + set boxShadow(String value) { + setProperty('box-shadow', value, ''); + } + + /** Gets the value of "box-sizing" */ + String get boxSizing => + getPropertyValue('box-sizing'); + + /** Sets the value of "box-sizing" */ + set boxSizing(String value) { + setProperty('box-sizing', value, ''); + } + + /** Gets the value of "caption-side" */ + String get captionSide => + getPropertyValue('caption-side'); + + /** Sets the value of "caption-side" */ + set captionSide(String value) { + setProperty('caption-side', value, ''); + } + + /** Gets the value of "clear" */ + String get clear => + getPropertyValue('clear'); + + /** Sets the value of "clear" */ + set clear(String value) { + setProperty('clear', value, ''); + } + + /** Gets the value of "clip" */ + String get clip => + getPropertyValue('clip'); + + /** Sets the value of "clip" */ + set clip(String value) { + setProperty('clip', value, ''); + } + + /** Gets the value of "clip-path" */ + String get clipPath => + getPropertyValue('clip-path'); + + /** Sets the value of "clip-path" */ + set clipPath(String value) { + setProperty('clip-path', value, ''); + } + + /** Gets the value of "color" */ + String get color => + getPropertyValue('color'); + + /** Sets the value of "color" */ + set color(String value) { + setProperty('color', value, ''); + } + + /** Gets the value of "column-break-after" */ + String get columnBreakAfter => + getPropertyValue('column-break-after'); + + /** Sets the value of "column-break-after" */ + set columnBreakAfter(String value) { + setProperty('column-break-after', value, ''); + } + + /** Gets the value of "column-break-before" */ + String get columnBreakBefore => + getPropertyValue('column-break-before'); + + /** Sets the value of "column-break-before" */ + set columnBreakBefore(String value) { + setProperty('column-break-before', value, ''); + } + + /** Gets the value of "column-break-inside" */ + String get columnBreakInside => + getPropertyValue('column-break-inside'); + + /** Sets the value of "column-break-inside" */ + set columnBreakInside(String value) { + setProperty('column-break-inside', value, ''); + } + + /** Gets the value of "column-count" */ + String get columnCount => + getPropertyValue('column-count'); + + /** Sets the value of "column-count" */ + set columnCount(String value) { + setProperty('column-count', value, ''); + } + + /** Gets the value of "column-fill" */ + String get columnFill => + getPropertyValue('column-fill'); + + /** Sets the value of "column-fill" */ + set columnFill(String value) { + setProperty('column-fill', value, ''); + } + + /** Gets the value of "column-gap" */ + String get columnGap => + getPropertyValue('column-gap'); + + /** Sets the value of "column-gap" */ + set columnGap(String value) { + setProperty('column-gap', value, ''); + } + + /** Gets the value of "column-rule" */ + String get columnRule => + getPropertyValue('column-rule'); + + /** Sets the value of "column-rule" */ + set columnRule(String value) { + setProperty('column-rule', value, ''); + } + + /** Gets the value of "column-rule-color" */ + String get columnRuleColor => + getPropertyValue('column-rule-color'); + + /** Sets the value of "column-rule-color" */ + set columnRuleColor(String value) { + setProperty('column-rule-color', value, ''); + } + + /** Gets the value of "column-rule-style" */ + String get columnRuleStyle => + getPropertyValue('column-rule-style'); + + /** Sets the value of "column-rule-style" */ + set columnRuleStyle(String value) { + setProperty('column-rule-style', value, ''); + } + + /** Gets the value of "column-rule-width" */ + String get columnRuleWidth => + getPropertyValue('column-rule-width'); + + /** Sets the value of "column-rule-width" */ + set columnRuleWidth(String value) { + setProperty('column-rule-width', value, ''); + } + + /** Gets the value of "column-span" */ + String get columnSpan => + getPropertyValue('column-span'); + + /** Sets the value of "column-span" */ + set columnSpan(String value) { + setProperty('column-span', value, ''); + } + + /** Gets the value of "column-width" */ + String get columnWidth => + getPropertyValue('column-width'); + + /** Sets the value of "column-width" */ + set columnWidth(String value) { + setProperty('column-width', value, ''); + } + + /** Gets the value of "columns" */ + String get columns => + getPropertyValue('columns'); + + /** Sets the value of "columns" */ + set columns(String value) { + setProperty('columns', value, ''); + } + + /** Gets the value of "content" */ + String get content => + getPropertyValue('content'); + + /** Sets the value of "content" */ + set content(String value) { + setProperty('content', value, ''); + } + + /** Gets the value of "counter-increment" */ + String get counterIncrement => + getPropertyValue('counter-increment'); + + /** Sets the value of "counter-increment" */ + set counterIncrement(String value) { + setProperty('counter-increment', value, ''); + } + + /** Gets the value of "counter-reset" */ + String get counterReset => + getPropertyValue('counter-reset'); + + /** Sets the value of "counter-reset" */ + set counterReset(String value) { + setProperty('counter-reset', value, ''); + } + + /** Gets the value of "cursor" */ + String get cursor => + getPropertyValue('cursor'); + + /** Sets the value of "cursor" */ + set cursor(String value) { + setProperty('cursor', value, ''); + } + + /** Gets the value of "direction" */ + String get direction => + getPropertyValue('direction'); + + /** Sets the value of "direction" */ + set direction(String value) { + setProperty('direction', value, ''); + } + + /** Gets the value of "display" */ + String get display => + getPropertyValue('display'); + + /** Sets the value of "display" */ + set display(String value) { + setProperty('display', value, ''); + } + + /** Gets the value of "empty-cells" */ + String get emptyCells => + getPropertyValue('empty-cells'); + + /** Sets the value of "empty-cells" */ + set emptyCells(String value) { + setProperty('empty-cells', value, ''); + } + + /** Gets the value of "filter" */ + String get filter => + getPropertyValue('filter'); + + /** Sets the value of "filter" */ + set filter(String value) { + setProperty('filter', value, ''); + } + + /** Gets the value of "flex" */ + String get flex => + getPropertyValue('flex'); + + /** Sets the value of "flex" */ + set flex(String value) { + setProperty('flex', value, ''); + } + + /** Gets the value of "flex-basis" */ + String get flexBasis => + getPropertyValue('flex-basis'); + + /** Sets the value of "flex-basis" */ + set flexBasis(String value) { + setProperty('flex-basis', value, ''); + } + + /** Gets the value of "flex-direction" */ + String get flexDirection => + getPropertyValue('flex-direction'); + + /** Sets the value of "flex-direction" */ + set flexDirection(String value) { + setProperty('flex-direction', value, ''); + } + + /** Gets the value of "flex-flow" */ + String get flexFlow => + getPropertyValue('flex-flow'); + + /** Sets the value of "flex-flow" */ + set flexFlow(String value) { + setProperty('flex-flow', value, ''); + } + + /** Gets the value of "flex-grow" */ + String get flexGrow => + getPropertyValue('flex-grow'); + + /** Sets the value of "flex-grow" */ + set flexGrow(String value) { + setProperty('flex-grow', value, ''); + } + + /** Gets the value of "flex-shrink" */ + String get flexShrink => + getPropertyValue('flex-shrink'); + + /** Sets the value of "flex-shrink" */ + set flexShrink(String value) { + setProperty('flex-shrink', value, ''); + } + + /** Gets the value of "flex-wrap" */ + String get flexWrap => + getPropertyValue('flex-wrap'); + + /** Sets the value of "flex-wrap" */ + set flexWrap(String value) { + setProperty('flex-wrap', value, ''); + } + + /** Gets the value of "float" */ + String get float => + getPropertyValue('float'); + + /** Sets the value of "float" */ + set float(String value) { + setProperty('float', value, ''); + } + + /** Gets the value of "font" */ + String get font => + getPropertyValue('font'); + + /** Sets the value of "font" */ + set font(String value) { + setProperty('font', value, ''); + } + + /** Gets the value of "font-family" */ + String get fontFamily => + getPropertyValue('font-family'); + + /** Sets the value of "font-family" */ + set fontFamily(String value) { + setProperty('font-family', value, ''); + } + + /** Gets the value of "font-feature-settings" */ + String get fontFeatureSettings => + getPropertyValue('font-feature-settings'); + + /** Sets the value of "font-feature-settings" */ + set fontFeatureSettings(String value) { + setProperty('font-feature-settings', value, ''); + } + + /** Gets the value of "font-kerning" */ + String get fontKerning => + getPropertyValue('font-kerning'); + + /** Sets the value of "font-kerning" */ + set fontKerning(String value) { + setProperty('font-kerning', value, ''); + } + + /** Gets the value of "font-size" */ + String get fontSize => + getPropertyValue('font-size'); + + /** Sets the value of "font-size" */ + set fontSize(String value) { + setProperty('font-size', value, ''); + } + + /** Gets the value of "font-size-delta" */ + String get fontSizeDelta => + getPropertyValue('font-size-delta'); + + /** Sets the value of "font-size-delta" */ + set fontSizeDelta(String value) { + setProperty('font-size-delta', value, ''); + } + + /** Gets the value of "font-smoothing" */ + String get fontSmoothing => + getPropertyValue('font-smoothing'); + + /** Sets the value of "font-smoothing" */ + set fontSmoothing(String value) { + setProperty('font-smoothing', value, ''); + } + + /** Gets the value of "font-stretch" */ + String get fontStretch => + getPropertyValue('font-stretch'); + + /** Sets the value of "font-stretch" */ + set fontStretch(String value) { + setProperty('font-stretch', value, ''); + } + + /** Gets the value of "font-style" */ + String get fontStyle => + getPropertyValue('font-style'); + + /** Sets the value of "font-style" */ + set fontStyle(String value) { + setProperty('font-style', value, ''); + } + + /** Gets the value of "font-variant" */ + String get fontVariant => + getPropertyValue('font-variant'); + + /** Sets the value of "font-variant" */ + set fontVariant(String value) { + setProperty('font-variant', value, ''); + } + + /** Gets the value of "font-variant-ligatures" */ + String get fontVariantLigatures => + getPropertyValue('font-variant-ligatures'); + + /** Sets the value of "font-variant-ligatures" */ + set fontVariantLigatures(String value) { + setProperty('font-variant-ligatures', value, ''); + } + + /** Gets the value of "font-weight" */ + String get fontWeight => + getPropertyValue('font-weight'); + + /** Sets the value of "font-weight" */ + set fontWeight(String value) { + setProperty('font-weight', value, ''); + } + + /** Gets the value of "grid" */ + String get grid => + getPropertyValue('grid'); + + /** Sets the value of "grid" */ + set grid(String value) { + setProperty('grid', value, ''); + } + + /** Gets the value of "grid-area" */ + String get gridArea => + getPropertyValue('grid-area'); + + /** Sets the value of "grid-area" */ + set gridArea(String value) { + setProperty('grid-area', value, ''); + } + + /** Gets the value of "grid-auto-columns" */ + String get gridAutoColumns => + getPropertyValue('grid-auto-columns'); + + /** Sets the value of "grid-auto-columns" */ + set gridAutoColumns(String value) { + setProperty('grid-auto-columns', value, ''); + } + + /** Gets the value of "grid-auto-flow" */ + String get gridAutoFlow => + getPropertyValue('grid-auto-flow'); + + /** Sets the value of "grid-auto-flow" */ + set gridAutoFlow(String value) { + setProperty('grid-auto-flow', value, ''); + } + + /** Gets the value of "grid-auto-rows" */ + String get gridAutoRows => + getPropertyValue('grid-auto-rows'); + + /** Sets the value of "grid-auto-rows" */ + set gridAutoRows(String value) { + setProperty('grid-auto-rows', value, ''); + } + + /** Gets the value of "grid-column" */ + String get gridColumn => + getPropertyValue('grid-column'); + + /** Sets the value of "grid-column" */ + set gridColumn(String value) { + setProperty('grid-column', value, ''); + } + + /** Gets the value of "grid-column-end" */ + String get gridColumnEnd => + getPropertyValue('grid-column-end'); + + /** Sets the value of "grid-column-end" */ + set gridColumnEnd(String value) { + setProperty('grid-column-end', value, ''); + } + + /** Gets the value of "grid-column-start" */ + String get gridColumnStart => + getPropertyValue('grid-column-start'); + + /** Sets the value of "grid-column-start" */ + set gridColumnStart(String value) { + setProperty('grid-column-start', value, ''); + } + + /** Gets the value of "grid-row" */ + String get gridRow => + getPropertyValue('grid-row'); + + /** Sets the value of "grid-row" */ + set gridRow(String value) { + setProperty('grid-row', value, ''); + } + + /** Gets the value of "grid-row-end" */ + String get gridRowEnd => + getPropertyValue('grid-row-end'); + + /** Sets the value of "grid-row-end" */ + set gridRowEnd(String value) { + setProperty('grid-row-end', value, ''); + } + + /** Gets the value of "grid-row-start" */ + String get gridRowStart => + getPropertyValue('grid-row-start'); + + /** Sets the value of "grid-row-start" */ + set gridRowStart(String value) { + setProperty('grid-row-start', value, ''); + } + + /** Gets the value of "grid-template" */ + String get gridTemplate => + getPropertyValue('grid-template'); + + /** Sets the value of "grid-template" */ + set gridTemplate(String value) { + setProperty('grid-template', value, ''); + } + + /** Gets the value of "grid-template-areas" */ + String get gridTemplateAreas => + getPropertyValue('grid-template-areas'); + + /** Sets the value of "grid-template-areas" */ + set gridTemplateAreas(String value) { + setProperty('grid-template-areas', value, ''); + } + + /** Gets the value of "grid-template-columns" */ + String get gridTemplateColumns => + getPropertyValue('grid-template-columns'); + + /** Sets the value of "grid-template-columns" */ + set gridTemplateColumns(String value) { + setProperty('grid-template-columns', value, ''); + } + + /** Gets the value of "grid-template-rows" */ + String get gridTemplateRows => + getPropertyValue('grid-template-rows'); + + /** Sets the value of "grid-template-rows" */ + set gridTemplateRows(String value) { + setProperty('grid-template-rows', value, ''); + } + + /** Gets the value of "height" */ + String get height => + getPropertyValue('height'); + + /** Sets the value of "height" */ + set height(String value) { + setProperty('height', value, ''); + } + + /** Gets the value of "highlight" */ + String get highlight => + getPropertyValue('highlight'); + + /** Sets the value of "highlight" */ + set highlight(String value) { + setProperty('highlight', value, ''); + } + + /** Gets the value of "hyphenate-character" */ + String get hyphenateCharacter => + getPropertyValue('hyphenate-character'); + + /** Sets the value of "hyphenate-character" */ + set hyphenateCharacter(String value) { + setProperty('hyphenate-character', value, ''); + } + + /** Gets the value of "image-rendering" */ + String get imageRendering => + getPropertyValue('image-rendering'); + + /** Sets the value of "image-rendering" */ + set imageRendering(String value) { + setProperty('image-rendering', value, ''); + } + + /** Gets the value of "isolation" */ + String get isolation => + getPropertyValue('isolation'); + + /** Sets the value of "isolation" */ + set isolation(String value) { + setProperty('isolation', value, ''); + } + + /** Gets the value of "justify-content" */ + String get justifyContent => + getPropertyValue('justify-content'); + + /** Sets the value of "justify-content" */ + set justifyContent(String value) { + setProperty('justify-content', value, ''); + } + + /** Gets the value of "justify-self" */ + String get justifySelf => + getPropertyValue('justify-self'); + + /** Sets the value of "justify-self" */ + set justifySelf(String value) { + setProperty('justify-self', value, ''); + } + + /** Gets the value of "left" */ + String get left => + getPropertyValue('left'); + + /** Sets the value of "left" */ + set left(String value) { + setProperty('left', value, ''); + } + + /** Gets the value of "letter-spacing" */ + String get letterSpacing => + getPropertyValue('letter-spacing'); + + /** Sets the value of "letter-spacing" */ + set letterSpacing(String value) { + setProperty('letter-spacing', value, ''); + } + + /** Gets the value of "line-box-contain" */ + String get lineBoxContain => + getPropertyValue('line-box-contain'); + + /** Sets the value of "line-box-contain" */ + set lineBoxContain(String value) { + setProperty('line-box-contain', value, ''); + } + + /** Gets the value of "line-break" */ + String get lineBreak => + getPropertyValue('line-break'); + + /** Sets the value of "line-break" */ + set lineBreak(String value) { + setProperty('line-break', value, ''); + } + + /** Gets the value of "line-clamp" */ + String get lineClamp => + getPropertyValue('line-clamp'); + + /** Sets the value of "line-clamp" */ + set lineClamp(String value) { + setProperty('line-clamp', value, ''); + } + + /** Gets the value of "line-height" */ + String get lineHeight => + getPropertyValue('line-height'); + + /** Sets the value of "line-height" */ + set lineHeight(String value) { + setProperty('line-height', value, ''); + } + + /** Gets the value of "list-style" */ + String get listStyle => + getPropertyValue('list-style'); + + /** Sets the value of "list-style" */ + set listStyle(String value) { + setProperty('list-style', value, ''); + } + + /** Gets the value of "list-style-image" */ + String get listStyleImage => + getPropertyValue('list-style-image'); + + /** Sets the value of "list-style-image" */ + set listStyleImage(String value) { + setProperty('list-style-image', value, ''); + } + + /** Gets the value of "list-style-position" */ + String get listStylePosition => + getPropertyValue('list-style-position'); + + /** Sets the value of "list-style-position" */ + set listStylePosition(String value) { + setProperty('list-style-position', value, ''); + } + + /** Gets the value of "list-style-type" */ + String get listStyleType => + getPropertyValue('list-style-type'); + + /** Sets the value of "list-style-type" */ + set listStyleType(String value) { + setProperty('list-style-type', value, ''); + } + + /** Gets the value of "locale" */ + String get locale => + getPropertyValue('locale'); + + /** Sets the value of "locale" */ + set locale(String value) { + setProperty('locale', value, ''); + } + + /** Gets the value of "logical-height" */ + String get logicalHeight => + getPropertyValue('logical-height'); + + /** Sets the value of "logical-height" */ + set logicalHeight(String value) { + setProperty('logical-height', value, ''); + } + + /** Gets the value of "logical-width" */ + String get logicalWidth => + getPropertyValue('logical-width'); + + /** Sets the value of "logical-width" */ + set logicalWidth(String value) { + setProperty('logical-width', value, ''); + } + + /** Gets the value of "margin" */ + String get margin => + getPropertyValue('margin'); + + /** Sets the value of "margin" */ + set margin(String value) { + setProperty('margin', value, ''); + } + + /** Gets the value of "margin-after" */ + String get marginAfter => + getPropertyValue('margin-after'); + + /** Sets the value of "margin-after" */ + set marginAfter(String value) { + setProperty('margin-after', value, ''); + } + + /** Gets the value of "margin-after-collapse" */ + String get marginAfterCollapse => + getPropertyValue('margin-after-collapse'); + + /** Sets the value of "margin-after-collapse" */ + set marginAfterCollapse(String value) { + setProperty('margin-after-collapse', value, ''); + } + + /** Gets the value of "margin-before" */ + String get marginBefore => + getPropertyValue('margin-before'); + + /** Sets the value of "margin-before" */ + set marginBefore(String value) { + setProperty('margin-before', value, ''); + } + + /** Gets the value of "margin-before-collapse" */ + String get marginBeforeCollapse => + getPropertyValue('margin-before-collapse'); + + /** Sets the value of "margin-before-collapse" */ + set marginBeforeCollapse(String value) { + setProperty('margin-before-collapse', value, ''); + } + + /** Gets the value of "margin-bottom" */ + String get marginBottom => + getPropertyValue('margin-bottom'); + + /** Sets the value of "margin-bottom" */ + set marginBottom(String value) { + setProperty('margin-bottom', value, ''); + } + + /** Gets the value of "margin-bottom-collapse" */ + String get marginBottomCollapse => + getPropertyValue('margin-bottom-collapse'); + + /** Sets the value of "margin-bottom-collapse" */ + set marginBottomCollapse(String value) { + setProperty('margin-bottom-collapse', value, ''); + } + + /** Gets the value of "margin-collapse" */ + String get marginCollapse => + getPropertyValue('margin-collapse'); + + /** Sets the value of "margin-collapse" */ + set marginCollapse(String value) { + setProperty('margin-collapse', value, ''); + } + + /** Gets the value of "margin-end" */ + String get marginEnd => + getPropertyValue('margin-end'); + + /** Sets the value of "margin-end" */ + set marginEnd(String value) { + setProperty('margin-end', value, ''); + } + + /** Gets the value of "margin-left" */ + String get marginLeft => + getPropertyValue('margin-left'); + + /** Sets the value of "margin-left" */ + set marginLeft(String value) { + setProperty('margin-left', value, ''); + } + + /** Gets the value of "margin-right" */ + String get marginRight => + getPropertyValue('margin-right'); + + /** Sets the value of "margin-right" */ + set marginRight(String value) { + setProperty('margin-right', value, ''); + } + + /** Gets the value of "margin-start" */ + String get marginStart => + getPropertyValue('margin-start'); + + /** Sets the value of "margin-start" */ + set marginStart(String value) { + setProperty('margin-start', value, ''); + } + + /** Gets the value of "margin-top" */ + String get marginTop => + getPropertyValue('margin-top'); + + /** Sets the value of "margin-top" */ + set marginTop(String value) { + setProperty('margin-top', value, ''); + } + + /** Gets the value of "margin-top-collapse" */ + String get marginTopCollapse => + getPropertyValue('margin-top-collapse'); + + /** Sets the value of "margin-top-collapse" */ + set marginTopCollapse(String value) { + setProperty('margin-top-collapse', value, ''); + } + + /** Gets the value of "mask" */ + String get mask => + getPropertyValue('mask'); + + /** Sets the value of "mask" */ + set mask(String value) { + setProperty('mask', value, ''); + } + + /** Gets the value of "mask-box-image" */ + String get maskBoxImage => + getPropertyValue('mask-box-image'); + + /** Sets the value of "mask-box-image" */ + set maskBoxImage(String value) { + setProperty('mask-box-image', value, ''); + } + + /** Gets the value of "mask-box-image-outset" */ + String get maskBoxImageOutset => + getPropertyValue('mask-box-image-outset'); + + /** Sets the value of "mask-box-image-outset" */ + set maskBoxImageOutset(String value) { + setProperty('mask-box-image-outset', value, ''); + } + + /** Gets the value of "mask-box-image-repeat" */ + String get maskBoxImageRepeat => + getPropertyValue('mask-box-image-repeat'); + + /** Sets the value of "mask-box-image-repeat" */ + set maskBoxImageRepeat(String value) { + setProperty('mask-box-image-repeat', value, ''); + } + + /** Gets the value of "mask-box-image-slice" */ + String get maskBoxImageSlice => + getPropertyValue('mask-box-image-slice'); + + /** Sets the value of "mask-box-image-slice" */ + set maskBoxImageSlice(String value) { + setProperty('mask-box-image-slice', value, ''); + } + + /** Gets the value of "mask-box-image-source" */ + String get maskBoxImageSource => + getPropertyValue('mask-box-image-source'); + + /** Sets the value of "mask-box-image-source" */ + set maskBoxImageSource(String value) { + setProperty('mask-box-image-source', value, ''); + } + + /** Gets the value of "mask-box-image-width" */ + String get maskBoxImageWidth => + getPropertyValue('mask-box-image-width'); + + /** Sets the value of "mask-box-image-width" */ + set maskBoxImageWidth(String value) { + setProperty('mask-box-image-width', value, ''); + } + + /** Gets the value of "mask-clip" */ + String get maskClip => + getPropertyValue('mask-clip'); + + /** Sets the value of "mask-clip" */ + set maskClip(String value) { + setProperty('mask-clip', value, ''); + } + + /** Gets the value of "mask-composite" */ + String get maskComposite => + getPropertyValue('mask-composite'); + + /** Sets the value of "mask-composite" */ + set maskComposite(String value) { + setProperty('mask-composite', value, ''); + } + + /** Gets the value of "mask-image" */ + String get maskImage => + getPropertyValue('mask-image'); + + /** Sets the value of "mask-image" */ + set maskImage(String value) { + setProperty('mask-image', value, ''); + } + + /** Gets the value of "mask-origin" */ + String get maskOrigin => + getPropertyValue('mask-origin'); + + /** Sets the value of "mask-origin" */ + set maskOrigin(String value) { + setProperty('mask-origin', value, ''); + } + + /** Gets the value of "mask-position" */ + String get maskPosition => + getPropertyValue('mask-position'); + + /** Sets the value of "mask-position" */ + set maskPosition(String value) { + setProperty('mask-position', value, ''); + } + + /** Gets the value of "mask-position-x" */ + String get maskPositionX => + getPropertyValue('mask-position-x'); + + /** Sets the value of "mask-position-x" */ + set maskPositionX(String value) { + setProperty('mask-position-x', value, ''); + } + + /** Gets the value of "mask-position-y" */ + String get maskPositionY => + getPropertyValue('mask-position-y'); + + /** Sets the value of "mask-position-y" */ + set maskPositionY(String value) { + setProperty('mask-position-y', value, ''); + } + + /** Gets the value of "mask-repeat" */ + String get maskRepeat => + getPropertyValue('mask-repeat'); + + /** Sets the value of "mask-repeat" */ + set maskRepeat(String value) { + setProperty('mask-repeat', value, ''); + } + + /** Gets the value of "mask-repeat-x" */ + String get maskRepeatX => + getPropertyValue('mask-repeat-x'); + + /** Sets the value of "mask-repeat-x" */ + set maskRepeatX(String value) { + setProperty('mask-repeat-x', value, ''); + } + + /** Gets the value of "mask-repeat-y" */ + String get maskRepeatY => + getPropertyValue('mask-repeat-y'); + + /** Sets the value of "mask-repeat-y" */ + set maskRepeatY(String value) { + setProperty('mask-repeat-y', value, ''); + } + + /** Gets the value of "mask-size" */ + String get maskSize => + getPropertyValue('mask-size'); + + /** Sets the value of "mask-size" */ + set maskSize(String value) { + setProperty('mask-size', value, ''); + } + + /** Gets the value of "mask-source-type" */ + String get maskSourceType => + getPropertyValue('mask-source-type'); + + /** Sets the value of "mask-source-type" */ + set maskSourceType(String value) { + setProperty('mask-source-type', value, ''); + } + + /** Gets the value of "max-height" */ + String get maxHeight => + getPropertyValue('max-height'); + + /** Sets the value of "max-height" */ + set maxHeight(String value) { + setProperty('max-height', value, ''); + } + + /** Gets the value of "max-logical-height" */ + String get maxLogicalHeight => + getPropertyValue('max-logical-height'); + + /** Sets the value of "max-logical-height" */ + set maxLogicalHeight(String value) { + setProperty('max-logical-height', value, ''); + } + + /** Gets the value of "max-logical-width" */ + String get maxLogicalWidth => + getPropertyValue('max-logical-width'); + + /** Sets the value of "max-logical-width" */ + set maxLogicalWidth(String value) { + setProperty('max-logical-width', value, ''); + } + + /** Gets the value of "max-width" */ + String get maxWidth => + getPropertyValue('max-width'); + + /** Sets the value of "max-width" */ + set maxWidth(String value) { + setProperty('max-width', value, ''); + } + + /** Gets the value of "max-zoom" */ + String get maxZoom => + getPropertyValue('max-zoom'); + + /** Sets the value of "max-zoom" */ + set maxZoom(String value) { + setProperty('max-zoom', value, ''); + } + + /** Gets the value of "min-height" */ + String get minHeight => + getPropertyValue('min-height'); + + /** Sets the value of "min-height" */ + set minHeight(String value) { + setProperty('min-height', value, ''); + } + + /** Gets the value of "min-logical-height" */ + String get minLogicalHeight => + getPropertyValue('min-logical-height'); + + /** Sets the value of "min-logical-height" */ + set minLogicalHeight(String value) { + setProperty('min-logical-height', value, ''); + } + + /** Gets the value of "min-logical-width" */ + String get minLogicalWidth => + getPropertyValue('min-logical-width'); + + /** Sets the value of "min-logical-width" */ + set minLogicalWidth(String value) { + setProperty('min-logical-width', value, ''); + } + + /** Gets the value of "min-width" */ + String get minWidth => + getPropertyValue('min-width'); + + /** Sets the value of "min-width" */ + set minWidth(String value) { + setProperty('min-width', value, ''); + } + + /** Gets the value of "min-zoom" */ + String get minZoom => + getPropertyValue('min-zoom'); + + /** Sets the value of "min-zoom" */ + set minZoom(String value) { + setProperty('min-zoom', value, ''); + } + + /** Gets the value of "mix-blend-mode" */ + String get mixBlendMode => + getPropertyValue('mix-blend-mode'); + + /** Sets the value of "mix-blend-mode" */ + set mixBlendMode(String value) { + setProperty('mix-blend-mode', value, ''); + } + + /** Gets the value of "object-fit" */ + String get objectFit => + getPropertyValue('object-fit'); + + /** Sets the value of "object-fit" */ + set objectFit(String value) { + setProperty('object-fit', value, ''); + } + + /** Gets the value of "object-position" */ + String get objectPosition => + getPropertyValue('object-position'); + + /** Sets the value of "object-position" */ + set objectPosition(String value) { + setProperty('object-position', value, ''); + } + + /** Gets the value of "opacity" */ + String get opacity => + getPropertyValue('opacity'); + + /** Sets the value of "opacity" */ + set opacity(String value) { + setProperty('opacity', value, ''); + } + + /** Gets the value of "order" */ + String get order => + getPropertyValue('order'); + + /** Sets the value of "order" */ + set order(String value) { + setProperty('order', value, ''); + } + + /** Gets the value of "orientation" */ + String get orientation => + getPropertyValue('orientation'); + + /** Sets the value of "orientation" */ + set orientation(String value) { + setProperty('orientation', value, ''); + } + + /** Gets the value of "orphans" */ + String get orphans => + getPropertyValue('orphans'); + + /** Sets the value of "orphans" */ + set orphans(String value) { + setProperty('orphans', value, ''); + } + + /** Gets the value of "outline" */ + String get outline => + getPropertyValue('outline'); + + /** Sets the value of "outline" */ + set outline(String value) { + setProperty('outline', value, ''); + } + + /** Gets the value of "outline-color" */ + String get outlineColor => + getPropertyValue('outline-color'); + + /** Sets the value of "outline-color" */ + set outlineColor(String value) { + setProperty('outline-color', value, ''); + } + + /** Gets the value of "outline-offset" */ + String get outlineOffset => + getPropertyValue('outline-offset'); + + /** Sets the value of "outline-offset" */ + set outlineOffset(String value) { + setProperty('outline-offset', value, ''); + } + + /** Gets the value of "outline-style" */ + String get outlineStyle => + getPropertyValue('outline-style'); + + /** Sets the value of "outline-style" */ + set outlineStyle(String value) { + setProperty('outline-style', value, ''); + } + + /** Gets the value of "outline-width" */ + String get outlineWidth => + getPropertyValue('outline-width'); + + /** Sets the value of "outline-width" */ + set outlineWidth(String value) { + setProperty('outline-width', value, ''); + } + + /** Gets the value of "overflow" */ + String get overflow => + getPropertyValue('overflow'); + + /** Sets the value of "overflow" */ + set overflow(String value) { + setProperty('overflow', value, ''); + } + + /** Gets the value of "overflow-wrap" */ + String get overflowWrap => + getPropertyValue('overflow-wrap'); + + /** Sets the value of "overflow-wrap" */ + set overflowWrap(String value) { + setProperty('overflow-wrap', value, ''); + } + + /** Gets the value of "overflow-x" */ + String get overflowX => + getPropertyValue('overflow-x'); + + /** Sets the value of "overflow-x" */ + set overflowX(String value) { + setProperty('overflow-x', value, ''); + } + + /** Gets the value of "overflow-y" */ + String get overflowY => + getPropertyValue('overflow-y'); + + /** Sets the value of "overflow-y" */ + set overflowY(String value) { + setProperty('overflow-y', value, ''); + } + + /** Gets the value of "padding" */ + String get padding => + getPropertyValue('padding'); + + /** Sets the value of "padding" */ + set padding(String value) { + setProperty('padding', value, ''); + } + + /** Gets the value of "padding-after" */ + String get paddingAfter => + getPropertyValue('padding-after'); + + /** Sets the value of "padding-after" */ + set paddingAfter(String value) { + setProperty('padding-after', value, ''); + } + + /** Gets the value of "padding-before" */ + String get paddingBefore => + getPropertyValue('padding-before'); + + /** Sets the value of "padding-before" */ + set paddingBefore(String value) { + setProperty('padding-before', value, ''); + } + + /** Gets the value of "padding-bottom" */ + String get paddingBottom => + getPropertyValue('padding-bottom'); + + /** Sets the value of "padding-bottom" */ + set paddingBottom(String value) { + setProperty('padding-bottom', value, ''); + } + + /** Gets the value of "padding-end" */ + String get paddingEnd => + getPropertyValue('padding-end'); + + /** Sets the value of "padding-end" */ + set paddingEnd(String value) { + setProperty('padding-end', value, ''); + } + + /** Gets the value of "padding-left" */ + String get paddingLeft => + getPropertyValue('padding-left'); + + /** Sets the value of "padding-left" */ + set paddingLeft(String value) { + setProperty('padding-left', value, ''); + } + + /** Gets the value of "padding-right" */ + String get paddingRight => + getPropertyValue('padding-right'); + + /** Sets the value of "padding-right" */ + set paddingRight(String value) { + setProperty('padding-right', value, ''); + } + + /** Gets the value of "padding-start" */ + String get paddingStart => + getPropertyValue('padding-start'); + + /** Sets the value of "padding-start" */ + set paddingStart(String value) { + setProperty('padding-start', value, ''); + } + + /** Gets the value of "padding-top" */ + String get paddingTop => + getPropertyValue('padding-top'); + + /** Sets the value of "padding-top" */ + set paddingTop(String value) { + setProperty('padding-top', value, ''); + } + + /** Gets the value of "page" */ + String get page => + getPropertyValue('page'); + + /** Sets the value of "page" */ + set page(String value) { + setProperty('page', value, ''); + } + + /** Gets the value of "page-break-after" */ + String get pageBreakAfter => + getPropertyValue('page-break-after'); + + /** Sets the value of "page-break-after" */ + set pageBreakAfter(String value) { + setProperty('page-break-after', value, ''); + } + + /** Gets the value of "page-break-before" */ + String get pageBreakBefore => + getPropertyValue('page-break-before'); + + /** Sets the value of "page-break-before" */ + set pageBreakBefore(String value) { + setProperty('page-break-before', value, ''); + } + + /** Gets the value of "page-break-inside" */ + String get pageBreakInside => + getPropertyValue('page-break-inside'); + + /** Sets the value of "page-break-inside" */ + set pageBreakInside(String value) { + setProperty('page-break-inside', value, ''); + } + + /** Gets the value of "perspective" */ + String get perspective => + getPropertyValue('perspective'); + + /** Sets the value of "perspective" */ + set perspective(String value) { + setProperty('perspective', value, ''); + } + + /** Gets the value of "perspective-origin" */ + String get perspectiveOrigin => + getPropertyValue('perspective-origin'); + + /** Sets the value of "perspective-origin" */ + set perspectiveOrigin(String value) { + setProperty('perspective-origin', value, ''); + } + + /** Gets the value of "perspective-origin-x" */ + String get perspectiveOriginX => + getPropertyValue('perspective-origin-x'); + + /** Sets the value of "perspective-origin-x" */ + set perspectiveOriginX(String value) { + setProperty('perspective-origin-x', value, ''); + } + + /** Gets the value of "perspective-origin-y" */ + String get perspectiveOriginY => + getPropertyValue('perspective-origin-y'); + + /** Sets the value of "perspective-origin-y" */ + set perspectiveOriginY(String value) { + setProperty('perspective-origin-y', value, ''); + } + + /** Gets the value of "pointer-events" */ + String get pointerEvents => + getPropertyValue('pointer-events'); + + /** Sets the value of "pointer-events" */ + set pointerEvents(String value) { + setProperty('pointer-events', value, ''); + } + + /** Gets the value of "position" */ + String get position => + getPropertyValue('position'); + + /** Sets the value of "position" */ + set position(String value) { + setProperty('position', value, ''); + } + + /** Gets the value of "print-color-adjust" */ + String get printColorAdjust => + getPropertyValue('print-color-adjust'); + + /** Sets the value of "print-color-adjust" */ + set printColorAdjust(String value) { + setProperty('print-color-adjust', value, ''); + } + + /** Gets the value of "quotes" */ + String get quotes => + getPropertyValue('quotes'); + + /** Sets the value of "quotes" */ + set quotes(String value) { + setProperty('quotes', value, ''); + } + + /** Gets the value of "resize" */ + String get resize => + getPropertyValue('resize'); + + /** Sets the value of "resize" */ + set resize(String value) { + setProperty('resize', value, ''); + } + + /** Gets the value of "right" */ + String get right => + getPropertyValue('right'); + + /** Sets the value of "right" */ + set right(String value) { + setProperty('right', value, ''); + } + + /** Gets the value of "rtl-ordering" */ + String get rtlOrdering => + getPropertyValue('rtl-ordering'); + + /** Sets the value of "rtl-ordering" */ + set rtlOrdering(String value) { + setProperty('rtl-ordering', value, ''); + } + + /** Gets the value of "ruby-position" */ + String get rubyPosition => + getPropertyValue('ruby-position'); + + /** Sets the value of "ruby-position" */ + set rubyPosition(String value) { + setProperty('ruby-position', value, ''); + } + + /** Gets the value of "scroll-behavior" */ + String get scrollBehavior => + getPropertyValue('scroll-behavior'); + + /** Sets the value of "scroll-behavior" */ + set scrollBehavior(String value) { + setProperty('scroll-behavior', value, ''); + } + + /** Gets the value of "shape-image-threshold" */ + String get shapeImageThreshold => + getPropertyValue('shape-image-threshold'); + + /** Sets the value of "shape-image-threshold" */ + set shapeImageThreshold(String value) { + setProperty('shape-image-threshold', value, ''); + } + + /** Gets the value of "shape-margin" */ + String get shapeMargin => + getPropertyValue('shape-margin'); + + /** Sets the value of "shape-margin" */ + set shapeMargin(String value) { + setProperty('shape-margin', value, ''); + } + + /** Gets the value of "shape-outside" */ + String get shapeOutside => + getPropertyValue('shape-outside'); + + /** Sets the value of "shape-outside" */ + set shapeOutside(String value) { + setProperty('shape-outside', value, ''); + } + + /** Gets the value of "size" */ + String get size => + getPropertyValue('size'); + + /** Sets the value of "size" */ + set size(String value) { + setProperty('size', value, ''); + } + + /** Gets the value of "speak" */ + String get speak => + getPropertyValue('speak'); + + /** Sets the value of "speak" */ + set speak(String value) { + setProperty('speak', value, ''); + } + + /** Gets the value of "src" */ + String get src => + getPropertyValue('src'); + + /** Sets the value of "src" */ + set src(String value) { + setProperty('src', value, ''); + } + + /** Gets the value of "tab-size" */ + String get tabSize => + getPropertyValue('tab-size'); + + /** Sets the value of "tab-size" */ + set tabSize(String value) { + setProperty('tab-size', value, ''); + } + + /** Gets the value of "table-layout" */ + String get tableLayout => + getPropertyValue('table-layout'); + + /** Sets the value of "table-layout" */ + set tableLayout(String value) { + setProperty('table-layout', value, ''); + } + + /** Gets the value of "tap-highlight-color" */ + String get tapHighlightColor => + getPropertyValue('tap-highlight-color'); + + /** Sets the value of "tap-highlight-color" */ + set tapHighlightColor(String value) { + setProperty('tap-highlight-color', value, ''); + } + + /** Gets the value of "text-align" */ + String get textAlign => + getPropertyValue('text-align'); + + /** Sets the value of "text-align" */ + set textAlign(String value) { + setProperty('text-align', value, ''); + } + + /** Gets the value of "text-align-last" */ + String get textAlignLast => + getPropertyValue('text-align-last'); + + /** Sets the value of "text-align-last" */ + set textAlignLast(String value) { + setProperty('text-align-last', value, ''); + } + + /** Gets the value of "text-combine" */ + String get textCombine => + getPropertyValue('text-combine'); + + /** Sets the value of "text-combine" */ + set textCombine(String value) { + setProperty('text-combine', value, ''); + } + + /** Gets the value of "text-decoration" */ + String get textDecoration => + getPropertyValue('text-decoration'); + + /** Sets the value of "text-decoration" */ + set textDecoration(String value) { + setProperty('text-decoration', value, ''); + } + + /** Gets the value of "text-decoration-color" */ + String get textDecorationColor => + getPropertyValue('text-decoration-color'); + + /** Sets the value of "text-decoration-color" */ + set textDecorationColor(String value) { + setProperty('text-decoration-color', value, ''); + } + + /** Gets the value of "text-decoration-line" */ + String get textDecorationLine => + getPropertyValue('text-decoration-line'); + + /** Sets the value of "text-decoration-line" */ + set textDecorationLine(String value) { + setProperty('text-decoration-line', value, ''); + } + + /** Gets the value of "text-decoration-style" */ + String get textDecorationStyle => + getPropertyValue('text-decoration-style'); + + /** Sets the value of "text-decoration-style" */ + set textDecorationStyle(String value) { + setProperty('text-decoration-style', value, ''); + } + + /** Gets the value of "text-decorations-in-effect" */ + String get textDecorationsInEffect => + getPropertyValue('text-decorations-in-effect'); + + /** Sets the value of "text-decorations-in-effect" */ + set textDecorationsInEffect(String value) { + setProperty('text-decorations-in-effect', value, ''); + } + + /** Gets the value of "text-emphasis" */ + String get textEmphasis => + getPropertyValue('text-emphasis'); + + /** Sets the value of "text-emphasis" */ + set textEmphasis(String value) { + setProperty('text-emphasis', value, ''); + } + + /** Gets the value of "text-emphasis-color" */ + String get textEmphasisColor => + getPropertyValue('text-emphasis-color'); + + /** Sets the value of "text-emphasis-color" */ + set textEmphasisColor(String value) { + setProperty('text-emphasis-color', value, ''); + } + + /** Gets the value of "text-emphasis-position" */ + String get textEmphasisPosition => + getPropertyValue('text-emphasis-position'); + + /** Sets the value of "text-emphasis-position" */ + set textEmphasisPosition(String value) { + setProperty('text-emphasis-position', value, ''); + } + + /** Gets the value of "text-emphasis-style" */ + String get textEmphasisStyle => + getPropertyValue('text-emphasis-style'); + + /** Sets the value of "text-emphasis-style" */ + set textEmphasisStyle(String value) { + setProperty('text-emphasis-style', value, ''); + } + + /** Gets the value of "text-fill-color" */ + String get textFillColor => + getPropertyValue('text-fill-color'); + + /** Sets the value of "text-fill-color" */ + set textFillColor(String value) { + setProperty('text-fill-color', value, ''); + } + + /** Gets the value of "text-indent" */ + String get textIndent => + getPropertyValue('text-indent'); + + /** Sets the value of "text-indent" */ + set textIndent(String value) { + setProperty('text-indent', value, ''); + } + + /** Gets the value of "text-justify" */ + String get textJustify => + getPropertyValue('text-justify'); + + /** Sets the value of "text-justify" */ + set textJustify(String value) { + setProperty('text-justify', value, ''); + } + + /** Gets the value of "text-line-through-color" */ + String get textLineThroughColor => + getPropertyValue('text-line-through-color'); + + /** Sets the value of "text-line-through-color" */ + set textLineThroughColor(String value) { + setProperty('text-line-through-color', value, ''); + } + + /** Gets the value of "text-line-through-mode" */ + String get textLineThroughMode => + getPropertyValue('text-line-through-mode'); + + /** Sets the value of "text-line-through-mode" */ + set textLineThroughMode(String value) { + setProperty('text-line-through-mode', value, ''); + } + + /** Gets the value of "text-line-through-style" */ + String get textLineThroughStyle => + getPropertyValue('text-line-through-style'); + + /** Sets the value of "text-line-through-style" */ + set textLineThroughStyle(String value) { + setProperty('text-line-through-style', value, ''); + } + + /** Gets the value of "text-line-through-width" */ + String get textLineThroughWidth => + getPropertyValue('text-line-through-width'); + + /** Sets the value of "text-line-through-width" */ + set textLineThroughWidth(String value) { + setProperty('text-line-through-width', value, ''); + } + + /** Gets the value of "text-orientation" */ + String get textOrientation => + getPropertyValue('text-orientation'); + + /** Sets the value of "text-orientation" */ + set textOrientation(String value) { + setProperty('text-orientation', value, ''); + } + + /** Gets the value of "text-overflow" */ + String get textOverflow => + getPropertyValue('text-overflow'); + + /** Sets the value of "text-overflow" */ + set textOverflow(String value) { + setProperty('text-overflow', value, ''); + } + + /** Gets the value of "text-overline-color" */ + String get textOverlineColor => + getPropertyValue('text-overline-color'); + + /** Sets the value of "text-overline-color" */ + set textOverlineColor(String value) { + setProperty('text-overline-color', value, ''); + } + + /** Gets the value of "text-overline-mode" */ + String get textOverlineMode => + getPropertyValue('text-overline-mode'); + + /** Sets the value of "text-overline-mode" */ + set textOverlineMode(String value) { + setProperty('text-overline-mode', value, ''); + } + + /** Gets the value of "text-overline-style" */ + String get textOverlineStyle => + getPropertyValue('text-overline-style'); + + /** Sets the value of "text-overline-style" */ + set textOverlineStyle(String value) { + setProperty('text-overline-style', value, ''); + } + + /** Gets the value of "text-overline-width" */ + String get textOverlineWidth => + getPropertyValue('text-overline-width'); + + /** Sets the value of "text-overline-width" */ + set textOverlineWidth(String value) { + setProperty('text-overline-width', value, ''); + } + + /** Gets the value of "text-rendering" */ + String get textRendering => + getPropertyValue('text-rendering'); + + /** Sets the value of "text-rendering" */ + set textRendering(String value) { + setProperty('text-rendering', value, ''); + } + + /** Gets the value of "text-security" */ + String get textSecurity => + getPropertyValue('text-security'); + + /** Sets the value of "text-security" */ + set textSecurity(String value) { + setProperty('text-security', value, ''); + } + + /** Gets the value of "text-shadow" */ + String get textShadow => + getPropertyValue('text-shadow'); + + /** Sets the value of "text-shadow" */ + set textShadow(String value) { + setProperty('text-shadow', value, ''); + } + + /** Gets the value of "text-stroke" */ + String get textStroke => + getPropertyValue('text-stroke'); + + /** Sets the value of "text-stroke" */ + set textStroke(String value) { + setProperty('text-stroke', value, ''); + } + + /** Gets the value of "text-stroke-color" */ + String get textStrokeColor => + getPropertyValue('text-stroke-color'); + + /** Sets the value of "text-stroke-color" */ + set textStrokeColor(String value) { + setProperty('text-stroke-color', value, ''); + } + + /** Gets the value of "text-stroke-width" */ + String get textStrokeWidth => + getPropertyValue('text-stroke-width'); + + /** Sets the value of "text-stroke-width" */ + set textStrokeWidth(String value) { + setProperty('text-stroke-width', value, ''); + } + + /** Gets the value of "text-transform" */ + String get textTransform => + getPropertyValue('text-transform'); + + /** Sets the value of "text-transform" */ + set textTransform(String value) { + setProperty('text-transform', value, ''); + } + + /** Gets the value of "text-underline-color" */ + String get textUnderlineColor => + getPropertyValue('text-underline-color'); + + /** Sets the value of "text-underline-color" */ + set textUnderlineColor(String value) { + setProperty('text-underline-color', value, ''); + } + + /** Gets the value of "text-underline-mode" */ + String get textUnderlineMode => + getPropertyValue('text-underline-mode'); + + /** Sets the value of "text-underline-mode" */ + set textUnderlineMode(String value) { + setProperty('text-underline-mode', value, ''); + } + + /** Gets the value of "text-underline-position" */ + String get textUnderlinePosition => + getPropertyValue('text-underline-position'); + + /** Sets the value of "text-underline-position" */ + set textUnderlinePosition(String value) { + setProperty('text-underline-position', value, ''); + } + + /** Gets the value of "text-underline-style" */ + String get textUnderlineStyle => + getPropertyValue('text-underline-style'); + + /** Sets the value of "text-underline-style" */ + set textUnderlineStyle(String value) { + setProperty('text-underline-style', value, ''); + } + + /** Gets the value of "text-underline-width" */ + String get textUnderlineWidth => + getPropertyValue('text-underline-width'); + + /** Sets the value of "text-underline-width" */ + set textUnderlineWidth(String value) { + setProperty('text-underline-width', value, ''); + } + + /** Gets the value of "top" */ + String get top => + getPropertyValue('top'); + + /** Sets the value of "top" */ + set top(String value) { + setProperty('top', value, ''); + } + + /** Gets the value of "touch-action" */ + String get touchAction => + getPropertyValue('touch-action'); + + /** Sets the value of "touch-action" */ + set touchAction(String value) { + setProperty('touch-action', value, ''); + } + + /** Gets the value of "touch-action-delay" */ + String get touchActionDelay => + getPropertyValue('touch-action-delay'); + + /** Sets the value of "touch-action-delay" */ + set touchActionDelay(String value) { + setProperty('touch-action-delay', value, ''); + } + + /** Gets the value of "transform" */ + String get transform => + getPropertyValue('transform'); + + /** Sets the value of "transform" */ + set transform(String value) { + setProperty('transform', value, ''); + } + + /** Gets the value of "transform-origin" */ + String get transformOrigin => + getPropertyValue('transform-origin'); + + /** Sets the value of "transform-origin" */ + set transformOrigin(String value) { + setProperty('transform-origin', value, ''); + } + + /** Gets the value of "transform-origin-x" */ + String get transformOriginX => + getPropertyValue('transform-origin-x'); + + /** Sets the value of "transform-origin-x" */ + set transformOriginX(String value) { + setProperty('transform-origin-x', value, ''); + } + + /** Gets the value of "transform-origin-y" */ + String get transformOriginY => + getPropertyValue('transform-origin-y'); + + /** Sets the value of "transform-origin-y" */ + set transformOriginY(String value) { + setProperty('transform-origin-y', value, ''); + } + + /** Gets the value of "transform-origin-z" */ + String get transformOriginZ => + getPropertyValue('transform-origin-z'); + + /** Sets the value of "transform-origin-z" */ + set transformOriginZ(String value) { + setProperty('transform-origin-z', value, ''); + } + + /** Gets the value of "transform-style" */ + String get transformStyle => + getPropertyValue('transform-style'); + + /** Sets the value of "transform-style" */ + set transformStyle(String value) { + setProperty('transform-style', value, ''); + } + + /** Gets the value of "transition" */@SupportedBrowser(SupportedBrowser.CHROME) + @SupportedBrowser(SupportedBrowser.FIREFOX) + @SupportedBrowser(SupportedBrowser.IE, '10') + @SupportedBrowser(SupportedBrowser.SAFARI) + String get transition => + getPropertyValue('transition'); + + /** Sets the value of "transition" */@SupportedBrowser(SupportedBrowser.CHROME) + @SupportedBrowser(SupportedBrowser.FIREFOX) + @SupportedBrowser(SupportedBrowser.IE, '10') + @SupportedBrowser(SupportedBrowser.SAFARI) + set transition(String value) { + setProperty('transition', value, ''); + } + + /** Gets the value of "transition-delay" */ + String get transitionDelay => + getPropertyValue('transition-delay'); + + /** Sets the value of "transition-delay" */ + set transitionDelay(String value) { + setProperty('transition-delay', value, ''); + } + + /** Gets the value of "transition-duration" */ + String get transitionDuration => + getPropertyValue('transition-duration'); + + /** Sets the value of "transition-duration" */ + set transitionDuration(String value) { + setProperty('transition-duration', value, ''); + } + + /** Gets the value of "transition-property" */ + String get transitionProperty => + getPropertyValue('transition-property'); + + /** Sets the value of "transition-property" */ + set transitionProperty(String value) { + setProperty('transition-property', value, ''); + } + + /** Gets the value of "transition-timing-function" */ + String get transitionTimingFunction => + getPropertyValue('transition-timing-function'); + + /** Sets the value of "transition-timing-function" */ + set transitionTimingFunction(String value) { + setProperty('transition-timing-function', value, ''); + } + + /** Gets the value of "unicode-bidi" */ + String get unicodeBidi => + getPropertyValue('unicode-bidi'); + + /** Sets the value of "unicode-bidi" */ + set unicodeBidi(String value) { + setProperty('unicode-bidi', value, ''); + } + + /** Gets the value of "unicode-range" */ + String get unicodeRange => + getPropertyValue('unicode-range'); + + /** Sets the value of "unicode-range" */ + set unicodeRange(String value) { + setProperty('unicode-range', value, ''); + } + + /** Gets the value of "user-drag" */ + String get userDrag => + getPropertyValue('user-drag'); + + /** Sets the value of "user-drag" */ + set userDrag(String value) { + setProperty('user-drag', value, ''); + } + + /** Gets the value of "user-modify" */ + String get userModify => + getPropertyValue('user-modify'); + + /** Sets the value of "user-modify" */ + set userModify(String value) { + setProperty('user-modify', value, ''); + } + + /** Gets the value of "user-select" */ + String get userSelect => + getPropertyValue('user-select'); + + /** Sets the value of "user-select" */ + set userSelect(String value) { + setProperty('user-select', value, ''); + } + + /** Gets the value of "user-zoom" */ + String get userZoom => + getPropertyValue('user-zoom'); + + /** Sets the value of "user-zoom" */ + set userZoom(String value) { + setProperty('user-zoom', value, ''); + } + + /** Gets the value of "vertical-align" */ + String get verticalAlign => + getPropertyValue('vertical-align'); + + /** Sets the value of "vertical-align" */ + set verticalAlign(String value) { + setProperty('vertical-align', value, ''); + } + + /** Gets the value of "visibility" */ + String get visibility => + getPropertyValue('visibility'); + + /** Sets the value of "visibility" */ + set visibility(String value) { + setProperty('visibility', value, ''); + } + + /** Gets the value of "white-space" */ + String get whiteSpace => + getPropertyValue('white-space'); + + /** Sets the value of "white-space" */ + set whiteSpace(String value) { + setProperty('white-space', value, ''); + } + + /** Gets the value of "widows" */ + String get widows => + getPropertyValue('widows'); + + /** Sets the value of "widows" */ + set widows(String value) { + setProperty('widows', value, ''); + } + + /** Gets the value of "width" */ + String get width => + getPropertyValue('width'); + + /** Sets the value of "width" */ + set width(String value) { + setProperty('width', value, ''); + } + + /** Gets the value of "will-change" */ + String get willChange => + getPropertyValue('will-change'); + + /** Sets the value of "will-change" */ + set willChange(String value) { + setProperty('will-change', value, ''); + } + + /** Gets the value of "word-break" */ + String get wordBreak => + getPropertyValue('word-break'); + + /** Sets the value of "word-break" */ + set wordBreak(String value) { + setProperty('word-break', value, ''); + } + + /** Gets the value of "word-spacing" */ + String get wordSpacing => + getPropertyValue('word-spacing'); + + /** Sets the value of "word-spacing" */ + set wordSpacing(String value) { + setProperty('word-spacing', value, ''); + } + + /** Gets the value of "word-wrap" */ + String get wordWrap => + getPropertyValue('word-wrap'); + + /** Sets the value of "word-wrap" */ + set wordWrap(String value) { + setProperty('word-wrap', value, ''); + } + + /** Gets the value of "wrap-flow" */ + String get wrapFlow => + getPropertyValue('wrap-flow'); + + /** Sets the value of "wrap-flow" */ + set wrapFlow(String value) { + setProperty('wrap-flow', value, ''); + } + + /** Gets the value of "wrap-through" */ + String get wrapThrough => + getPropertyValue('wrap-through'); + + /** Sets the value of "wrap-through" */ + set wrapThrough(String value) { + setProperty('wrap-through', value, ''); + } + + /** Gets the value of "writing-mode" */ + String get writingMode => + getPropertyValue('writing-mode'); + + /** Sets the value of "writing-mode" */ + set writingMode(String value) { + setProperty('writing-mode', value, ''); + } + + /** Gets the value of "z-index" */ + String get zIndex => + getPropertyValue('z-index'); + + /** Sets the value of "z-index" */ + set zIndex(String value) { + setProperty('z-index', value, ''); + } + + /** Gets the value of "zoom" */ + String get zoom => + getPropertyValue('zoom'); + + /** Sets the value of "zoom" */ + set zoom(String value) { + setProperty('zoom', value, ''); + } +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +/** + * A generic container for content on an HTML page; + * corresponds to the <div> tag. + * + * The [DivElement] is a generic container and does not have any semantic + * significance. It is functionally similar to [SpanElement]. + * + * The [DivElement] is a block-level element, as opposed to [SpanElement], + * which is an inline-level element. + * + * Example usage: + * + * DivElement div = new DivElement(); + * div.text = 'Here's my new DivElem + * document.body.elements.add(elem); + * + * See also: + * + * * [HTML
element](http://www.w3.org/TR/html-markup/div.html) from W3C. + * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C. + * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C. + */ +@DomName('HTMLDivElement') +@Native("HTMLDivElement") +class DivElement extends HtmlElement { + // To suppress missing implicit constructor warnings. + factory DivElement._() { throw new UnsupportedError("Not supported"); } + + @DomName('HTMLDivElement.HTMLDivElement') + @DocsEditable() + factory DivElement() => document.createElement("div"); + + + @Deprecated("Internal Use Only") + static DivElement internalCreateDivElement() { + return new DivElement.internal_(); + } + + @Deprecated("Internal Use Only") + DivElement.internal_() : super.internal_(); + +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +/** + * 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](http://www.dartlang.org/docs/tutorials/connect-dart-html/). + */ +@DomName('Document') +@Native("Document") +class Document extends Node +{ + + // To suppress missing implicit constructor warnings. + factory Document._() { throw new UnsupportedError("Not supported"); } + + @DomName('Document.pointerlockchangeEvent') + @DocsEditable() + @Experimental() // untriaged + static const EventStreamProvider pointerLockChangeEvent = const EventStreamProvider('pointerlockchange'); + + @DomName('Document.pointerlockerrorEvent') + @DocsEditable() + @Experimental() // untriaged + static const EventStreamProvider pointerLockErrorEvent = const EventStreamProvider('pointerlockerror'); + + /** + * Static factory designed to expose `readystatechange` events to event + * handlers that are not necessarily instances of [Document]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('Document.readystatechangeEvent') + @DocsEditable() + static const EventStreamProvider readyStateChangeEvent = const EventStreamProvider('readystatechange'); + + /** + * Static factory designed to expose `selectionchange` events to event + * handlers that are not necessarily instances of [Document]. + * + * See [EventStreamProvider] for usage information. + */ + @DomName('Document.selectionchangeEvent') + @DocsEditable() + static const EventStreamProvider selectionChangeEvent = const EventStreamProvider('selectionchange'); + + + @Deprecated("Internal Use Only") + static Document internalCreateDocument() { + return new Document.internal_(); + } + + @Deprecated("Internal Use Only") + Document.internal_() : super.internal_(); + + + @DomName('Document.activeElement') + @DocsEditable() + @Experimental() // untriaged + Element get activeElement => wrap_jso(JS("Element", "#.activeElement", this.raw)); + + @JSName('body') + @DomName('Document.body') + @DocsEditable() + HtmlElement get _body => wrap_jso(JS("HtmlElement", "#.body", this.raw)); + @JSName('body') + @DomName('Document.body') + @DocsEditable() + void set _body(HtmlElement val) => JS("void", "#.body = #", this.raw, unwrap_jso(val)); + + @DomName('Document.contentType') + @DocsEditable() + @Experimental() // untriaged + String get contentType => wrap_jso(JS("String", "#.contentType", this.raw)); + + @DomName('Document.cookie') + @DocsEditable() + String get cookie => wrap_jso(JS("String", "#.cookie", this.raw)); + @DomName('Document.cookie') + @DocsEditable() + void set cookie(String val) => JS("void", "#.cookie = #", this.raw, unwrap_jso(val)); + + @DomName('Document.currentScript') + @DocsEditable() + @Experimental() // untriaged + HtmlElement get currentScript => wrap_jso(JS("HtmlElement", "#.currentScript", this.raw)); + + @DomName('Document.window') + @DocsEditable() + @Experimental() // untriaged + 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') + dynamic get _get_window => wrap_jso(JS("dynamic", "#.defaultView", this.raw)); + + @DomName('Document.documentElement') + @DocsEditable() + Element get documentElement => wrap_jso(JS("Element", "#.documentElement", this.raw)); + + @DomName('Document.domain') + @DocsEditable() + String get domain => wrap_jso(JS("String", "#.domain", this.raw)); + + @DomName('Document.fullscreenElement') + @DocsEditable() + @Experimental() // untriaged + Element get fullscreenElement => wrap_jso(JS("Element", "#.fullscreenElement", this.raw)); + + @DomName('Document.fullscreenEnabled') + @DocsEditable() + @Experimental() // untriaged + bool get fullscreenEnabled => wrap_jso(JS("bool", "#.fullscreenEnabled", this.raw)); + + @JSName('head') + @DomName('Document.head') + @DocsEditable() + HeadElement get _head => wrap_jso(JS("HeadElement", "#.head", this.raw)); + + @DomName('Document.hidden') + @DocsEditable() + @Experimental() // untriaged + bool get hidden => wrap_jso(JS("bool", "#.hidden", this.raw)); + + @DomName('Document.implementation') + @DocsEditable() + DomImplementation get implementation => wrap_jso(JS("DomImplementation", "#.implementation", this.raw)); + + @JSName('lastModified') + @DomName('Document.lastModified') + @DocsEditable() + String get _lastModified => wrap_jso(JS("String", "#.lastModified", this.raw)); + + @DomName('Document.pointerLockElement') + @DocsEditable() + @Experimental() // untriaged + Element get pointerLockElement => wrap_jso(JS("Element", "#.pointerLockElement", this.raw)); + + @JSName('preferredStylesheetSet') + @DomName('Document.preferredStylesheetSet') + @DocsEditable() + String get _preferredStylesheetSet => wrap_jso(JS("String", "#.preferredStylesheetSet", this.raw)); + + @DomName('Document.readyState') + @DocsEditable() + String get readyState => wrap_jso(JS("String", "#.readyState", this.raw)); + + @JSName('referrer') + @DomName('Document.referrer') + @DocsEditable() + String get _referrer => wrap_jso(JS("String", "#.referrer", this.raw)); + + @DomName('Document.rootElement') + @DocsEditable() + @Experimental() // untriaged + Element get rootElement => wrap_jso(JS("Element", "#.rootElement", this.raw)); + + @JSName('selectedStylesheetSet') + @DomName('Document.selectedStylesheetSet') + @DocsEditable() + String get _selectedStylesheetSet => wrap_jso(JS("String", "#.selectedStylesheetSet", this.raw)); + @JSName('selectedStylesheetSet') + @DomName('Document.selectedStylesheetSet') + @DocsEditable() + void set _selectedStylesheetSet(String val) => JS("void", "#.selectedStylesheetSet = #", this.raw, unwrap_jso(val)); + + @JSName('title') + @DomName('Document.title') + @DocsEditable() + String get _title => wrap_jso(JS("String", "#.title", this.raw)); + @JSName('title') + @DomName('Document.title') + @DocsEditable() + void set _title(String val) => JS("void", "#.title = #", this.raw, unwrap_jso(val)); + + @DomName('Document.visibilityState') + @DocsEditable() + @Experimental() // untriaged + String get visibilityState => wrap_jso(JS("String", "#.visibilityState", this.raw)); + + @JSName('webkitFullscreenElement') + @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 + Element get _webkitFullscreenElement => wrap_jso(JS("Element", "#.webkitFullscreenElement", this.raw)); + + @JSName('webkitFullscreenEnabled') + @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 + bool get _webkitFullscreenEnabled => wrap_jso(JS("bool", "#.webkitFullscreenEnabled", this.raw)); + + @JSName('webkitHidden') + @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 + bool get _webkitHidden => wrap_jso(JS("bool", "#.webkitHidden", this.raw)); + + @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 + String get _webkitVisibilityState => wrap_jso(JS("String", "#.webkitVisibilityState", this.raw)); + + @DomName('Document.adoptNode') + @DocsEditable() + Node adoptNode(Node node) { + return _adoptNode_1(node); + } + @JSName('adoptNode') + @DomName('Document.adoptNode') + @DocsEditable() + Node _adoptNode_1(Node node) => wrap_jso(JS("Node ", "#.raw.adoptNode(#)", this, unwrap_jso(node))); + + @DomName('Document.caretRangeFromPoint') + @DocsEditable() + // http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint + @Experimental() + Range _caretRangeFromPoint(int x, int y) { + return _caretRangeFromPoint_1(x, y); + } + @JSName('caretRangeFromPoint') + @DomName('Document.caretRangeFromPoint') + @DocsEditable() + // http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint + @Experimental() + Range _caretRangeFromPoint_1(x, y) => wrap_jso(JS("Range ", "#.raw.caretRangeFromPoint(#, #)", this, unwrap_jso(x), unwrap_jso(y))); + + @DomName('Document.createDocumentFragment') + @DocsEditable() + DocumentFragment createDocumentFragment() { + return _createDocumentFragment_1(); + } + @JSName('createDocumentFragment') + @DomName('Document.createDocumentFragment') + @DocsEditable() + DocumentFragment _createDocumentFragment_1() => wrap_jso(JS("DocumentFragment ", "#.raw.createDocumentFragment()", this)); + + @DomName('Document.createElement') + @DocsEditable() + Element _createElement(String localName_OR_tagName, [String typeExtension]) { + if (typeExtension == null) { + return _createElement_1(localName_OR_tagName); + } + if (typeExtension != null) { + return _createElement_2(localName_OR_tagName, typeExtension); + } + throw new ArgumentError("Incorrect number or type of arguments"); + } + @JSName('createElement') + @DomName('Document.createElement') + @DocsEditable() + Element _createElement_1(tagName) => wrap_jso(JS("Element ", "#.raw.createElement(#)", this, unwrap_jso(tagName))); + @JSName('createElement') + @DomName('Document.createElement') + @DocsEditable() + Element _createElement_2(localName, typeExtension) => wrap_jso(JS("Element ", "#.raw.createElement(#, #)", this, unwrap_jso(localName), unwrap_jso(typeExtension))); + + @DomName('Document.createElementNS') + @DocsEditable() + Element _createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) { + if (typeExtension == null) { + return _createElementNS_1(namespaceURI, qualifiedName); + } + if (typeExtension != null) { + return _createElementNS_2(namespaceURI, qualifiedName, typeExtension); + } + throw new ArgumentError("Incorrect number or type of arguments"); + } + @JSName('createElementNS') + @DomName('Document.createElementNS') + @DocsEditable() + Element _createElementNS_1(namespaceURI, qualifiedName) => wrap_jso(JS("Element ", "#.raw.createElementNS(#, #)", this, unwrap_jso(namespaceURI), unwrap_jso(qualifiedName))); + @JSName('createElementNS') + @DomName('Document.createElementNS') + @DocsEditable() + Element _createElementNS_2(namespaceURI, qualifiedName, typeExtension) => wrap_jso(JS("Element ", "#.raw.createElementNS(#, #, #)", this, unwrap_jso(namespaceURI), unwrap_jso(qualifiedName), unwrap_jso(typeExtension))); + + @DomName('Document.createEvent') + @DocsEditable() + Event _createEvent(String eventType) { + return _createEvent_1(eventType); + } + @JSName('createEvent') + @DomName('Document.createEvent') + @DocsEditable() + Event _createEvent_1(eventType) => wrap_jso(JS("Event ", "#.raw.createEvent(#)", this, unwrap_jso(eventType))); + + @DomName('Document.createRange') + @DocsEditable() + Range createRange() { + return _createRange_1(); + } + @JSName('createRange') + @DomName('Document.createRange') + @DocsEditable() + Range _createRange_1() => wrap_jso(JS("Range ", "#.raw.createRange()", this)); + + @DomName('Document.createTextNode') + @DocsEditable() + Text _createTextNode(String data) { + return _createTextNode_1(data); + } + @JSName('createTextNode') + @DomName('Document.createTextNode') + @DocsEditable() + Text _createTextNode_1(data) => wrap_jso(JS("Text ", "#.raw.createTextNode(#)", this, unwrap_jso(data))); + + @DomName('Document.elementFromPoint') + @DocsEditable() + Element _elementFromPoint(int x, int y) { + return _elementFromPoint_1(x, y); + } + @JSName('elementFromPoint') + @DomName('Document.elementFromPoint') + @DocsEditable() + Element _elementFromPoint_1(x, y) => wrap_jso(JS("Element ", "#.raw.elementFromPoint(#, #)", this, unwrap_jso(x), unwrap_jso(y))); + + @DomName('Document.execCommand') + @DocsEditable() + bool execCommand(String command, bool userInterface, String value) { + return _execCommand_1(command, userInterface, value); + } + @JSName('execCommand') + @DomName('Document.execCommand') + @DocsEditable() + bool _execCommand_1(command, userInterface, value) => wrap_jso(JS("bool ", "#.raw.execCommand(#, #, #)", this, unwrap_jso(command), unwrap_jso(userInterface), unwrap_jso(value))); + + @DomName('Document.exitFullscreen') + @DocsEditable() + @Experimental() // untriaged + void exitFullscreen() { + _exitFullscreen_1(); + return; + } + @JSName('exitFullscreen') + @DomName('Document.exitFullscreen') + @DocsEditable() + @Experimental() // untriaged + void _exitFullscreen_1() => wrap_jso(JS("void ", "#.raw.exitFullscreen()", this)); + + @DomName('Document.exitPointerLock') + @DocsEditable() + @Experimental() // untriaged + void exitPointerLock() { + _exitPointerLock_1(); + return; + } + @JSName('exitPointerLock') + @DomName('Document.exitPointerLock') + @DocsEditable() + @Experimental() // untriaged + void _exitPointerLock_1() => wrap_jso(JS("void ", "#.raw.exitPointerLock()", this)); + + @DomName('Document.getCSSCanvasContext') + @DocsEditable() + // https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html + @Experimental() // non-standard + Object _getCssCanvasContext(String contextId, String name, int width, int height) { + return _getCssCanvasContext_1(contextId, name, width, height); + } + @JSName('getCSSCanvasContext') + @DomName('Document.getCSSCanvasContext') + @DocsEditable() + // https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html + @Experimental() // non-standard + Object _getCssCanvasContext_1(contextId, name, width, height) => wrap_jso(JS("Object ", "#.raw.getCSSCanvasContext(#, #, #, #)", this, unwrap_jso(contextId), unwrap_jso(name), unwrap_jso(width), unwrap_jso(height))); + + @DomName('Document.getElementById') + @DocsEditable() + Element getElementById(String elementId) { + return _getElementById_1(elementId); + } + @JSName('getElementById') + @DomName('Document.getElementById') + @DocsEditable() + Element _getElementById_1(elementId) => wrap_jso(JS("Element ", "#.raw.getElementById(#)", this, unwrap_jso(elementId))); + + @DomName('Document.getElementsByClassName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + HtmlCollection getElementsByClassName(String classNames) { + return _getElementsByClassName_1(classNames); + } + @JSName('getElementsByClassName') + @DomName('Document.getElementsByClassName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + HtmlCollection _getElementsByClassName_1(classNames) => wrap_jso(JS("HtmlCollection ", "#.raw.getElementsByClassName(#)", this, unwrap_jso(classNames))); + + @DomName('Document.getElementsByName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + NodeList getElementsByName(String elementName) { + return _getElementsByName_1(elementName); + } + @JSName('getElementsByName') + @DomName('Document.getElementsByName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + NodeList _getElementsByName_1(elementName) => wrap_jso(JS("NodeList ", "#.raw.getElementsByName(#)", this, unwrap_jso(elementName))); + + @DomName('Document.getElementsByTagName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + HtmlCollection getElementsByTagName(String localName) { + return _getElementsByTagName_1(localName); + } + @JSName('getElementsByTagName') + @DomName('Document.getElementsByTagName') + @DocsEditable() + @Creates('NodeList|HtmlCollection') + @Returns('NodeList|HtmlCollection') + HtmlCollection _getElementsByTagName_1(localName) => wrap_jso(JS("HtmlCollection ", "#.raw.getElementsByTagName(#)", this, unwrap_jso(localName))); + + @DomName('Document.importNode') + @DocsEditable() + Node importNode(Node node, [bool deep]) { + if (deep != null) { + return _importNode_1(node, deep); + } + return _importNode_2(node); + } + @JSName('importNode') + @DomName('Document.importNode') + @DocsEditable() + Node _importNode_1(Node node, deep) => wrap_jso(JS("Node ", "#.raw.importNode(#, #)", this, unwrap_jso(node), unwrap_jso(deep))); + @JSName('importNode') + @DomName('Document.importNode') + @DocsEditable() + Node _importNode_2(Node node) => wrap_jso(JS("Node ", "#.raw.importNode(#)", this, unwrap_jso(node))); + + @DomName('Document.queryCommandEnabled') + @DocsEditable() + bool queryCommandEnabled(String command) { + return _queryCommandEnabled_1(command); + } + @JSName('queryCommandEnabled') + @DomName('Document.queryCommandEnabled') + @DocsEditable() + bool _queryCommandEnabled_1(command) => wrap_jso(JS("bool ", "#.raw.queryCommandEnabled(#)", this, unwrap_jso(command))); + + @DomName('Document.queryCommandIndeterm') + @DocsEditable() + bool queryCommandIndeterm(String command) { + return _queryCommandIndeterm_1(command); + } + @JSName('queryCommandIndeterm') + @DomName('Document.queryCommandIndeterm') + @DocsEditable() + bool _queryCommandIndeterm_1(command) => wrap_jso(JS("bool ", "#.raw.queryCommandIndeterm(#)", this, unwrap_jso(command))); + + @DomName('Document.queryCommandState') + @DocsEditable() + bool queryCommandState(String command) { + return _queryCommandState_1(command); + } + @JSName('queryCommandState') + @DomName('Document.queryCommandState') + @DocsEditable() + bool _queryCommandState_1(command) => wrap_jso(JS("bool ", "#.raw.queryCommandState(#)", this, unwrap_jso(command))); + + @DomName('Document.queryCommandSupported') + @DocsEditable() + bool queryCommandSupported(String command) { + return _queryCommandSupported_1(command); + } + @JSName('queryCommandSupported') + @DomName('Document.queryCommandSupported') + @DocsEditable() + bool _queryCommandSupported_1(command) => wrap_jso(JS("bool ", "#.raw.queryCommandSupported(#)", this, unwrap_jso(command))); + + @DomName('Document.queryCommandValue') + @DocsEditable() + String queryCommandValue(String command) { + return _queryCommandValue_1(command); + } + @JSName('queryCommandValue') + @DomName('Document.queryCommandValue') + @DocsEditable() + String _queryCommandValue_1(command) => wrap_jso(JS("String ", "#.raw.queryCommandValue(#)", this, unwrap_jso(command))); + + @DomName('Document.transformDocumentToTreeView') + @DocsEditable() + @Experimental() // untriaged + void transformDocumentToTreeView(String noStyleMessage) { + _transformDocumentToTreeView_1(noStyleMessage); + return; + } + @JSName('transformDocumentToTreeView') + @DomName('Document.transformDocumentToTreeView') + @DocsEditable() + @Experimental() // untriaged + void _transformDocumentToTreeView_1(noStyleMessage) => wrap_jso(JS("void ", "#.raw.transformDocumentToTreeView(#)", this, unwrap_jso(noStyleMessage))); + + @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 _webkitExitFullscreen() { + _webkitExitFullscreen_1(); + return; + } + @JSName('webkitExitFullscreen') + @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 _webkitExitFullscreen_1() => wrap_jso(JS("void ", "#.raw.webkitExitFullscreen()", this)); + + // From ParentNode + + @JSName('childElementCount') + @DomName('Document.childElementCount') + @DocsEditable() + int get _childElementCount => wrap_jso(JS("int", "#.childElementCount", this.raw)); + + @JSName('children') + @DomName('Document.children') + @DocsEditable() + @Returns('HtmlCollection') + @Creates('HtmlCollection') + List get _children => wrap_jso(JS("List", "#.children", this.raw)); + + @JSName('firstElementChild') + @DomName('Document.firstElementChild') + @DocsEditable() + Element get _firstElementChild => wrap_jso(JS("Element", "#.firstElementChild", this.raw)); + + @JSName('lastElementChild') + @DomName('Document.lastElementChild') + @DocsEditable() + Element get _lastElementChild => wrap_jso(JS("Element", "#.lastElementChild", this.raw)); + + /** + * Finds the first descendant element of this document that matches the + * specified group of selectors. + * + * Unless your webpage contains multiple documents, the top-level + * [querySelector] + * 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.querySelector('.className'); + * var element2 = document.querySelector('#id'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + @DomName('Document.querySelector') + @DocsEditable() + Element querySelector(String selectors) { + return _querySelector_1(selectors); + } + @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 + * [querySelector] + * 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.querySelector('.className'); + * var element2 = document.querySelector('#id'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + @DomName('Document.querySelector') + @DocsEditable() + Element _querySelector_1(selectors) => wrap_jso(JS("Element ", "#.raw.querySelector(#)", this, unwrap_jso(selectors))); + + @DomName('Document.querySelectorAll') + @DocsEditable() + @Returns('NodeList') + @Creates('NodeList') + NodeList _querySelectorAll(String selectors) { + return _querySelectorAll_1(selectors); + } + @JSName('querySelectorAll') + @DomName('Document.querySelectorAll') + @DocsEditable() + @Returns('NodeList') + @Creates('NodeList') + NodeList _querySelectorAll_1(selectors) => wrap_jso(JS("NodeList ", "#.raw.querySelectorAll(#)", this, unwrap_jso(selectors))); + + /// Stream of `beforecopy` events handled by this [Document]. + @DomName('Document.onbeforecopy') + @DocsEditable() + Stream get onBeforeCopy => Element.beforeCopyEvent.forTarget(this); + + /// Stream of `beforecut` events handled by this [Document]. + @DomName('Document.onbeforecut') + @DocsEditable() + Stream get onBeforeCut => Element.beforeCutEvent.forTarget(this); + + /// Stream of `beforepaste` events handled by this [Document]. + @DomName('Document.onbeforepaste') + @DocsEditable() + Stream get onBeforePaste => Element.beforePasteEvent.forTarget(this); + + /// Stream of `copy` events handled by this [Document]. + @DomName('Document.oncopy') + @DocsEditable() + Stream get onCopy => Element.copyEvent.forTarget(this); + + /// Stream of `cut` events handled by this [Document]. + @DomName('Document.oncut') + @DocsEditable() + Stream get onCut => Element.cutEvent.forTarget(this); + + /// Stream of `paste` events handled by this [Document]. + @DomName('Document.onpaste') + @DocsEditable() + Stream get onPaste => Element.pasteEvent.forTarget(this); + + @DomName('Document.onpointerlockchange') + @DocsEditable() + @Experimental() // untriaged + Stream get onPointerLockChange => pointerLockChangeEvent.forTarget(this); + + @DomName('Document.onpointerlockerror') + @DocsEditable() + @Experimental() // untriaged + Stream get onPointerLockError => pointerLockErrorEvent.forTarget(this); + + /// Stream of `readystatechange` events handled by this [Document]. + @DomName('Document.onreadystatechange') + @DocsEditable() + Stream get onReadyStateChange => readyStateChangeEvent.forTarget(this); + + /// Stream of `search` events handled by this [Document]. + @DomName('Document.onsearch') + @DocsEditable() + // http://www.w3.org/TR/html-markup/input.search.html + @Experimental() + Stream get onSearch => Element.searchEvent.forTarget(this); + + /// Stream of `selectionchange` events handled by this [Document]. + @DomName('Document.onselectionchange') + @DocsEditable() + Stream get onSelectionChange => selectionChangeEvent.forTarget(this); + + /// Stream of `selectstart` events handled by this [Document]. + @DomName('Document.onselectstart') + @DocsEditable() + Stream get onSelectStart => Element.selectStartEvent.forTarget(this); + + /// Stream of `fullscreenchange` events handled by this [Document]. + @DomName('Document.onwebkitfullscreenchange') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + Stream get onFullscreenChange => Element.fullscreenChangeEvent.forTarget(this); + + /// Stream of `fullscreenerror` events handled by this [Document]. + @DomName('Document.onwebkitfullscreenerror') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + Stream get onFullscreenError => Element.fullscreenErrorEvent.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 + * [querySelectorAll] + * 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.querySelectorAll('.itemClassName'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + ElementList querySelectorAll(String selectors) { + return new _FrozenElementList._wrap(_querySelectorAll(selectors)); + } + + /** + * Alias for [querySelector]. Note this function is deprecated because its + * semantics will be changing in the future. + */ + @deprecated + @Experimental() + @DomName('Document.querySelector') + Element query(String relativeSelectors) => querySelector(relativeSelectors); + + /** + * Alias for [querySelectorAll]. Note this function is deprecated because its + * semantics will be changing in the future. + */ + @deprecated + @Experimental() + @DomName('Document.querySelectorAll') + ElementList queryAll(String relativeSelectors) => + querySelectorAll(relativeSelectors); + + /// Checks if [registerElement] is supported on the current platform. + bool get supportsRegisterElement { + return true; + } + + /// *Deprecated*: use [supportsRegisterElement] instead. + @deprecated + bool get supportsRegister => supportsRegisterElement; + + @DomName('Document.createElement') + Element createElement(String tagName, [String typeExtension]) { + return _createElement(tagName, typeExtension); + } + + @DomName('Document.createElementNS') + @DocsEditable() + Element createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) { + return _createElementNS(namespaceURI, qualifiedName, typeExtension); + } + +} +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DomName('DocumentFragment') +@Native("DocumentFragment") +class DocumentFragment extends Node implements ParentNode { + factory DocumentFragment() => document.createDocumentFragment(); + + factory DocumentFragment.html(String html, + {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { + + return document.body.createFragment(html, + validator: validator, treeSanitizer: treeSanitizer); + } + + factory DocumentFragment.svg(String svgContent, + {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { + throw 'SVG not supported in DDC'; + } + + HtmlCollection get _children => throw new UnimplementedError( + 'Use _docChildren instead'); + + List _docChildren; + + List get children { + if (_docChildren == null) { + _docChildren = new FilteredElementList(this); + } + return _docChildren; + } + + set children(List value) { + // Copy list first since we don't want liveness during iteration. + List copy = new List.from(value); + var children = this.children; + children.clear(); + children.addAll(copy); + } + + /** + * Finds all descendant elements of this document fragment that match the + * specified group of selectors. + * + * [selectors] should be a string using CSS selector syntax. + * + * var items = document.querySelectorAll('.itemClassName'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + ElementList querySelectorAll(String selectors) => + new _FrozenElementList._wrap(_querySelectorAll(selectors)); + + String get innerHtml { + final e = new Element.tag("div"); + e.append(this.clone(true)); + return e.innerHtml; + } + + set innerHtml(String value) { + this.setInnerHtml(value); + } + + void setInnerHtml(String html, + {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { + + this.nodes.clear(); + append(document.body.createFragment( + html, validator: validator, treeSanitizer: treeSanitizer)); + } + + /** + * Adds the specified text as a text node after the last child of this + * document fragment. + */ + void appendText(String text) { + this.append(new Text(text)); + } + + + /** + * Parses the specified text as HTML and adds the resulting node after the + * last child of this document fragment. + */ + void appendHtml(String text, {NodeValidator validator, + NodeTreeSanitizer, treeSanitizer}) { + this.append(new DocumentFragment.html(text, validator: validator, + treeSanitizer: treeSanitizer)); + } + + /** + * Alias for [querySelector]. Note this function is deprecated because its + * semantics will be changing in the future. + */ + @deprecated + @Experimental() + @DomName('DocumentFragment.querySelector') + Element query(String relativeSelectors) { + return querySelector(relativeSelectors); + } + + /** + * Alias for [querySelectorAll]. Note this function is deprecated because its + * semantics will be changing in the future. + */ + @deprecated + @Experimental() + @DomName('DocumentFragment.querySelectorAll') + ElementList queryAll(String relativeSelectors) { + return querySelectorAll(relativeSelectors); + } + // To suppress missing implicit constructor warnings. + factory DocumentFragment._() { throw new UnsupportedError("Not supported"); } + + + @Deprecated("Internal Use Only") + static DocumentFragment internalCreateDocumentFragment() { + return new DocumentFragment.internal_(); + } + + @Deprecated("Internal Use Only") + DocumentFragment.internal_() : super.internal_(); + + + @DomName('DocumentFragment.getElementById') + @DocsEditable() + @Experimental() // untriaged + Element getElementById(String elementId) { + return _getElementById_1(elementId); + } + @JSName('getElementById') + @DomName('DocumentFragment.getElementById') + @DocsEditable() + @Experimental() // untriaged + Element _getElementById_1(elementId) => wrap_jso(JS("Element ", "#.raw.getElementById(#)", this, unwrap_jso(elementId))); + + // From ParentNode + + @JSName('childElementCount') + @DomName('DocumentFragment.childElementCount') + @DocsEditable() + int get _childElementCount => wrap_jso(JS("int", "#.childElementCount", this.raw)); + + @JSName('firstElementChild') + @DomName('DocumentFragment.firstElementChild') + @DocsEditable() + Element get _firstElementChild => wrap_jso(JS("Element", "#.firstElementChild", this.raw)); + + @JSName('lastElementChild') + @DomName('DocumentFragment.lastElementChild') + @DocsEditable() + Element get _lastElementChild => wrap_jso(JS("Element", "#.lastElementChild", this.raw)); + + /** + * Finds the first descendant element of this document fragment that matches + * the specified group of selectors. + * + * [selectors] should be a string using CSS selector syntax. + * + * var element1 = fragment.querySelector('.className'); + * var element2 = fragment.querySelector('#id'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + @DomName('DocumentFragment.querySelector') + @DocsEditable() + Element querySelector(String selectors) { + return _querySelector_1(selectors); + } + @JSName('querySelector') + /** + * Finds the first descendant element of this document fragment that matches + * the specified group of selectors. + * + * [selectors] should be a string using CSS selector syntax. + * + * var element1 = fragment.querySelector('.className'); + * var element2 = fragment.querySelector('#id'); + * + * For details about CSS selector syntax, see the + * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). + */ + @DomName('DocumentFragment.querySelector') + @DocsEditable() + Element _querySelector_1(selectors) => wrap_jso(JS("Element ", "#.raw.querySelector(#)", this, unwrap_jso(selectors))); + + @DomName('DocumentFragment.querySelectorAll') + @DocsEditable() + @Returns('NodeList') + @Creates('NodeList') + NodeList _querySelectorAll(String selectors) { + return _querySelectorAll_1(selectors); + } + @JSName('querySelectorAll') + @DomName('DocumentFragment.querySelectorAll') + @DocsEditable() + @Returns('NodeList') + @Creates('NodeList') + NodeList _querySelectorAll_1(selectors) => wrap_jso(JS("NodeList ", "#.raw.querySelectorAll(#)", this, unwrap_jso(selectors))); + +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('DOMImplementation') +@Native("DOMImplementation") +class DomImplementation extends DartHtmlDomObject { + // To suppress missing implicit constructor warnings. + factory DomImplementation._() { throw new UnsupportedError("Not supported"); } + + @Deprecated("Internal Use Only") + static DomImplementation internalCreateDomImplementation() { + return new DomImplementation.internal_(); + } + + @Deprecated("Internal Use Only") + DomImplementation.internal_() { } + + bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); + int get hashCode => unwrap_jso(this).hashCode; + + @DomName('DOMImplementation.createDocument') + @DocsEditable() + Document createDocument(String namespaceURI, String qualifiedName, Node doctype) { + return _createDocument_1(namespaceURI, qualifiedName, doctype); + } + @JSName('createDocument') + @DomName('DOMImplementation.createDocument') + @DocsEditable() + Document _createDocument_1(namespaceURI, qualifiedName, Node doctype) => wrap_jso(JS("Document ", "#.raw.createDocument(#, #, #)", this, unwrap_jso(namespaceURI), unwrap_jso(qualifiedName), unwrap_jso(doctype))); + + @DomName('DOMImplementation.createDocumentType') + @DocsEditable() + Node createDocumentType(String qualifiedName, String publicId, String systemId) { + return _createDocumentType_1(qualifiedName, publicId, systemId); + } + @JSName('createDocumentType') + @DomName('DOMImplementation.createDocumentType') + @DocsEditable() + Node _createDocumentType_1(qualifiedName, publicId, systemId) => wrap_jso(JS("Node ", "#.raw.createDocumentType(#, #, #)", this, unwrap_jso(qualifiedName), unwrap_jso(publicId), unwrap_jso(systemId))); + + @DomName('DOMImplementation.createHTMLDocument') + @DocsEditable() + HtmlDocument createHtmlDocument(String title) { + return _createHtmlDocument_1(title); + } + @JSName('createHTMLDocument') + @DomName('DOMImplementation.createHTMLDocument') + @DocsEditable() + HtmlDocument _createHtmlDocument_1(title) => wrap_jso(JS("HtmlDocument ", "#.raw.createHTMLDocument(#)", this, unwrap_jso(title))); + + @DomName('DOMImplementation.hasFeature') + @DocsEditable() + bool hasFeature(String feature, String version) { + return _hasFeature_1(feature, version); + } + @JSName('hasFeature') + @DomName('DOMImplementation.hasFeature') + @DocsEditable() + bool _hasFeature_1(feature, version) => wrap_jso(JS("bool ", "#.raw.hasFeature(#, #)", this, unwrap_jso(feature), unwrap_jso(version))); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +@DocsEditable() +@DomName('DOMTokenList') +@Native("DOMTokenList") +class DomTokenList extends DartHtmlDomObject { + // To suppress missing implicit constructor warnings. + factory DomTokenList._() { throw new UnsupportedError("Not supported"); } + + @Deprecated("Internal Use Only") + static DomTokenList internalCreateDomTokenList() { + return new DomTokenList.internal_(); + } + + @Deprecated("Internal Use Only") + DomTokenList.internal_() { } + + bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); + int get hashCode => unwrap_jso(this).hashCode; + + @DomName('DOMTokenList.length') + @DocsEditable() + int get length => wrap_jso(JS("int", "#.length", this.raw)); + + @DomName('DOMTokenList.add') + @DocsEditable() + @Experimental() // untriaged + void add(String tokens) { + _add_1(tokens); + return; + } + @JSName('add') + @DomName('DOMTokenList.add') + @DocsEditable() + @Experimental() // untriaged + void _add_1(tokens) => wrap_jso(JS("void ", "#.raw.add(#)", this, unwrap_jso(tokens))); + + @DomName('DOMTokenList.contains') + @DocsEditable() + bool contains(String token) { + return _contains_1(token); + } + @JSName('contains') + @DomName('DOMTokenList.contains') + @DocsEditable() + bool _contains_1(token) => wrap_jso(JS("bool ", "#.raw.contains(#)", this, unwrap_jso(token))); + + @DomName('DOMTokenList.item') + @DocsEditable() + String item(int index) { + return _item_1(index); + } + @JSName('item') + @DomName('DOMTokenList.item') + @DocsEditable() + String _item_1(index) => wrap_jso(JS("String ", "#.raw.item(#)", this, unwrap_jso(index))); + + @DomName('DOMTokenList.remove') + @DocsEditable() + @Experimental() // untriaged + void remove(String tokens) { + _remove_1(tokens); + return; + } + @JSName('remove') + @DomName('DOMTokenList.remove') + @DocsEditable() + @Experimental() // untriaged + void _remove_1(tokens) => wrap_jso(JS("void ", "#.raw.remove(#)", this, unwrap_jso(tokens))); + + @DomName('DOMTokenList.toggle') + @DocsEditable() + bool toggle(String token, [bool force]) { + if (force != null) { + return _toggle_1(token, force); + } + return _toggle_2(token); + } + @JSName('toggle') + @DomName('DOMTokenList.toggle') + @DocsEditable() + bool _toggle_1(token, force) => wrap_jso(JS("bool ", "#.raw.toggle(#, #)", this, unwrap_jso(token), unwrap_jso(force))); + @JSName('toggle') + @DomName('DOMTokenList.toggle') + @DocsEditable() + bool _toggle_2(token) => wrap_jso(JS("bool ", "#.raw.toggle(#)", this, unwrap_jso(token))); +} +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +class _ChildrenElementList extends ListBase + implements NodeListWrapper { + // Raw Element. + final Element _element; + final HtmlCollection _childElements; + + _ChildrenElementList._wrap(Element element) + : _childElements = element._children, + _element = element; + + bool contains(Object element) => _childElements.contains(element); + + + bool get isEmpty { + return _element._firstElementChild == null; + } + + int get length { + return _childElements.length; + } + + Element operator [](int index) { + return _childElements[index]; + } + + void operator []=(int index, Element value) { + _element._replaceChild(value, _childElements[index]); + } + + set length(int newLength) { + // TODO(jacobr): remove children when length is reduced. + throw new UnsupportedError('Cannot resize element lists'); + } + + Element add(Element value) { + _element.append(value); + return value; + } + + Iterator get iterator => toList().iterator; + + void addAll(Iterable iterable) { + if (iterable is _ChildNodeListLazy) { + iterable = new List.from(iterable); + } + + for (Element element in iterable) { + _element.append(element); + } + } + + void sort([int compare(Element a, Element b)]) { + throw new UnsupportedError('Cannot sort element lists'); + } + + void shuffle([Random random]) { + throw new UnsupportedError('Cannot shuffle element lists'); + } + + void removeWhere(bool test(Element element)) { + _filter(test, false); + } + + void retainWhere(bool test(Element element)) { + _filter(test, true); + } + + void _filter(bool test(var element), bool retainMatching) { + var removed; + if (retainMatching) { + removed = _element.children.where((e) => !test(e)); + } else { + removed = _element.children.where(test); + } + for (var e in removed) e.remove(); + } + + void setRange(int start, int end, Iterable iterable, + [int skipCount = 0]) { + throw new UnimplementedError(); + } + + void replaceRange(int start, int end, Iterable iterable) { + throw new UnimplementedError(); + } + + void fillRange(int start, int end, [Element fillValue]) { + throw new UnimplementedError(); + } + + bool remove(Object object) { + if (object is Element) { + Element element = object; + // We aren't preserving identity of nodes in JSINTEROP mode + if (element.parentNode == _element) { + _element._removeChild(element); + return true; + } + } + return false; + } + + void insert(int index, Element element) { + if (index < 0 || index > length) { + throw new RangeError.range(index, 0, length); + } + if (index == length) { + _element.append(element); + } else { + _element.insertBefore(element, this[index]); + } + } + + void setAll(int index, Iterable iterable) { + throw new UnimplementedError(); + } + + void clear() { + _element._clearChildren(); + } + + Element removeAt(int index) { + final result = this[index]; + if (result != null) { + _element._removeChild(result); + } + return result; + } + + Element removeLast() { + final result = this.last; + if (result != null) { + _element._removeChild(result); + } + return result; + } + + Element get first { + Element result = _element._firstElementChild; + if (result == null) throw new StateError("No elements"); + return result; + } + + + Element get last { + Element result = _element._lastElementChild; + if (result == null) throw new StateError("No elements"); + return result; + } + + Element get single { + if (length > 1) throw new StateError("More than one element"); + return first; + } + + List get rawList => _childElements; +} + +/** + * An immutable list containing HTML elements. This list contains some + * additional methods when compared to regular lists for ease of CSS + * manipulation on a group of elements. + */ +abstract class ElementList extends ListBase { + /** + * The union of all CSS classes applied to the elements in this list. + * + * This set makes it easy to add, remove or toggle (add if not present, remove + * if present) the classes applied to a collection of elements. + * + * htmlList.classes.add('selected'); + * htmlList.classes.toggle('isOnline'); + * htmlList.classes.remove('selected'); + */ + CssClassSet get classes; + + /** Replace the classes with `value` for every element in this list. */ + set classes(Iterable value); + + /** + * Access the union of all [CssStyleDeclaration]s that are associated with an + * [ElementList]. + * + * Grouping the style objects all together provides easy editing of specific + * properties of a collection of elements. Setting a specific property value + * will set that property in all [Element]s in the [ElementList]. Getting a + * specific property value will return the value of the property of the first + * element in the [ElementList]. + */ + CssStyleDeclarationBase get style; + + /** + * Access dimensions and position of the Elements in this list. + * + * Setting the height or width properties will set the height or width + * property for all elements in the list. This returns a rectangle with the + * dimenions actually available for content + * in this element, in pixels, regardless of this element's box-sizing + * property. Getting the height or width returns the height or width of the + * first Element in this list. + * + * Unlike [getBoundingClientRect], the dimensions of this rectangle + * will return the same numerical height if the element is hidden or not. + */ + @Experimental() + CssRect get contentEdge; + + /** + * Access dimensions and position of the first Element's content + padding box + * in this list. + * + * This returns a rectangle with the dimenions actually available for content + * in this element, in pixels, regardless of this element's box-sizing + * property. Unlike [getBoundingClientRect], the dimensions of this rectangle + * will return the same numerical height if the element is hidden or not. This + * can be used to retrieve jQuery's `innerHeight` value for an element. This + * is also a rectangle equalling the dimensions of clientHeight and + * clientWidth. + */ + @Experimental() + CssRect get paddingEdge; + + /** + * Access dimensions and position of the first Element's content + padding + + * border box in this list. + * + * This returns a rectangle with the dimenions actually available for content + * in this element, in pixels, regardless of this element's box-sizing + * property. Unlike [getBoundingClientRect], the dimensions of this rectangle + * will return the same numerical height if the element is hidden or not. This + * can be used to retrieve jQuery's `outerHeight` value for an element. + */ + @Experimental() + CssRect get borderEdge; + + /** + * Access dimensions and position of the first Element's content + padding + + * border + margin box in this list. + * + * This returns a rectangle with the dimenions actually available for content + * in this element, in pixels, regardless of this element's box-sizing + * property. Unlike [getBoundingClientRect], the dimensions of this rectangle + * will return the same numerical height if the element is hidden or not. This + * can be used to retrieve jQuery's `outerHeight` value for an element. + */ + @Experimental() + CssRect get marginEdge; + + /// Stream of `beforecopy` events handled by this [Element]. + @DomName('Element.onbeforecopy') + @DocsEditable() + ElementStream get onBeforeCopy; + + /// Stream of `beforecut` events handled by this [Element]. + @DomName('Element.onbeforecut') + @DocsEditable() + ElementStream get onBeforeCut; + + /// Stream of `beforepaste` events handled by this [Element]. + @DomName('Element.onbeforepaste') + @DocsEditable() + ElementStream get onBeforePaste; + + /// Stream of `copy` events handled by this [Element]. + @DomName('Element.oncopy') + @DocsEditable() + ElementStream get onCopy; + + /// Stream of `cut` events handled by this [Element]. + @DomName('Element.oncut') + @DocsEditable() + ElementStream get onCut; + + /// Stream of `paste` events handled by this [Element]. + @DomName('Element.onpaste') + @DocsEditable() + ElementStream get onPaste; + + /// Stream of `search` events handled by this [Element]. + @DomName('Element.onsearch') + @DocsEditable() + // http://www.w3.org/TR/html-markup/input.search.html + @Experimental() + ElementStream get onSearch; + + /// Stream of `selectstart` events handled by this [Element]. + @DomName('Element.onselectstart') + @DocsEditable() + @Experimental() // nonstandard + ElementStream get onSelectStart; + + /// Stream of `fullscreenchange` events handled by this [Element]. + @DomName('Element.onwebkitfullscreenchange') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + ElementStream get onFullscreenChange; + + /// Stream of `fullscreenerror` events handled by this [Element]. + @DomName('Element.onwebkitfullscreenerror') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + ElementStream get onFullscreenError; + +} + +// Wrapper over an immutable NodeList to make it implement ElementList. +// +// Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are +// declared to return `ElementList`. This provides all the static analysis +// benefit so there is no need for this class have a constrained type parameter. +// +class _FrozenElementList extends ListBase + implements ElementList, NodeListWrapper { + final List _nodeList; + + var dartClass_instance; + + _FrozenElementList._wrap(this._nodeList) { + this.dartClass_instance = this._nodeList; + } + + int get length => _nodeList.length; + + Element operator [](int index) => _nodeList[index]; + + void operator []=(int index, Element value) { + throw new UnsupportedError('Cannot modify list'); + } + + set length(int newLength) { + throw new UnsupportedError('Cannot modify list'); + } + + void sort([Comparator compare]) { + throw new UnsupportedError('Cannot sort list'); + } + + void shuffle([Random random]) { + throw new UnsupportedError('Cannot shuffle list'); + } + + Element get first => _nodeList.first; + + Element get last => _nodeList.last; + + Element get single => _nodeList.single; + + CssClassSet get classes => new _MultiElementCssClassSet(this); + + CssStyleDeclarationBase get style => + new _CssStyleDeclarationSet(this); + + set classes(Iterable value) { + // TODO(sra): This might be faster for Sets: + // + // new _MultiElementCssClassSet(this).writeClasses(value) + // + // as the code below converts the Iterable[value] to a string multiple + // times. Maybe compute the string and set className here. + _nodeList.forEach((e) => e.classes = value); + } + + CssRect get contentEdge => new _ContentCssListRect(this); + + CssRect get paddingEdge => this.first.paddingEdge; + + CssRect get borderEdge => this.first.borderEdge; + + CssRect get marginEdge => this.first.marginEdge; + + List get rawList => _nodeList; + + + /// Stream of `beforecopy` events handled by this [Element]. + @DomName('Element.onbeforecopy') + @DocsEditable() + ElementStream get onBeforeCopy => Element.beforeCopyEvent._forElementList(this); + + /// Stream of `beforecut` events handled by this [Element]. + @DomName('Element.onbeforecut') + @DocsEditable() + ElementStream get onBeforeCut => Element.beforeCutEvent._forElementList(this); + + /// Stream of `beforepaste` events handled by this [Element]. + @DomName('Element.onbeforepaste') + @DocsEditable() + ElementStream get onBeforePaste => Element.beforePasteEvent._forElementList(this); + + /// Stream of `copy` events handled by this [Element]. + @DomName('Element.oncopy') + @DocsEditable() + ElementStream get onCopy => Element.copyEvent._forElementList(this); + + /// Stream of `cut` events handled by this [Element]. + @DomName('Element.oncut') + @DocsEditable() + ElementStream get onCut => Element.cutEvent._forElementList(this); + + /// Stream of `paste` events handled by this [Element]. + @DomName('Element.onpaste') + @DocsEditable() + ElementStream get onPaste => Element.pasteEvent._forElementList(this); + + /// Stream of `search` events handled by this [Element]. + @DomName('Element.onsearch') + @DocsEditable() + // http://www.w3.org/TR/html-markup/input.search.html + @Experimental() + ElementStream get onSearch => Element.searchEvent._forElementList(this); + + /// Stream of `selectstart` events handled by this [Element]. + @DomName('Element.onselectstart') + @DocsEditable() + @Experimental() // nonstandard + ElementStream get onSelectStart => Element.selectStartEvent._forElementList(this); + + /// Stream of `fullscreenchange` events handled by this [Element]. + @DomName('Element.onwebkitfullscreenchange') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + ElementStream get onFullscreenChange => Element.fullscreenChangeEvent._forElementList(this); + + /// Stream of `fullscreenerror` events handled by this [Element]. + @DomName('Element.onwebkitfullscreenerror') + @DocsEditable() + // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html + @Experimental() + ElementStream get onFullscreenError => Element.fullscreenErrorEvent._forElementList(this); + +} + +@DocsEditable() +/** + * An abstract class, which all HTML elements extend. + */ +@DomName('Element') +@Native("Element") +class Element extends Node implements ParentNode, ChildNode { + + /** + * Creates an HTML element from a valid fragment of HTML. + * + * var element = new Element.html('
content
'); + * + * The HTML fragment should contain only one single root element, any + * leading or trailing text nodes will be removed. + * + * The HTML fragment is parsed as if it occurred within the context of a + * `` tag, this means that special elements such as `` which + * must be parsed within the scope of a `` element will be dropped. Use + * [createFragment] to parse contextual HTML fragments. + * + * Unless a validator is provided this will perform the default validation + * and remove all scriptable elements and attributes. + * + * See also: + * + * * [NodeValidator] + * + */ + factory Element.html(String html, + {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { + var fragment = document.body.createFragment(html, validator: validator, + treeSanitizer: treeSanitizer); + + return fragment.nodes.where((e) => e is Element).single; + } + + /** + * Custom element creation constructor. + * + * This constructor is used by the DOM when a custom element has been + * created. It can only be invoked by subclasses of Element from + * that classes created constructor. + * + * class CustomElement extends Element { + * factory CustomElement() => new Element.tag('x-custom'); + * + * CustomElement.created() : super.created() { + * // Perform any element initialization. + * } + * } + * document.registerElement('x-custom', CustomElement); + */ + Element.created() : super._created(); + + /** + * Creates the HTML element specified by the tag name. + * + * This is similar to [Document.createElement]. + * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then + * this will create an [UnknownElement]. + * + * var divElement = new Element.tag('div'); + * print(divElement is DivElement); // 'true' + * var myElement = new Element.tag('unknownTag'); + * print(myElement is UnknownElement); // 'true' + * + * For standard elements it is more preferable to use the type constructors: + * var element = new DivElement(); + * + * See also: + * + * * [isTagSupported] + */ + factory Element.tag(String tag, [String typeExtention]) => + _ElementFactoryProvider.createElement_tag(tag, typeExtention); + + /// Creates a new `` element. + /// + /// This is identical to calling `new Element.tag('a')`. + factory Element.a() => new Element.tag('a'); + + /// Creates a new `
` element. + /// + /// This is identical to calling `new Element.tag('article')`. + factory Element.article() => new Element.tag('article'); + + /// Creates a new `