Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: pkg/dev_compiler/lib/js/amd/dart_sdk.js

Issue 2748713002: Invoke native methods directly (Closed)
Patch Set: Address comments / cleanup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: pkg/dev_compiler/lib/js/amd/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
index 4c79816be847d8e46599b29565a55a8a9cdb9a05..0903be9e7f10875f38bebd4bfbb28ef6687e4a51 100644
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
@@ -14844,7 +14844,7 @@ define([], function() {
}
}
get buffer() {
- return this[_storage][dartx.buffer];
+ return this[_storage].buffer;
}
get lengthInBytes() {
return this[_storage][dartx.lengthInBytes];
@@ -15311,7 +15311,7 @@ define([], function() {
return dart.wrapType(typed_data.Float64x2List);
}
get buffer() {
- return this[_storage][dartx.buffer];
+ return this[_storage].buffer;
}
get lengthInBytes() {
return this[_storage][dartx.lengthInBytes];
@@ -16508,7 +16508,7 @@ define([], function() {
return _native_typed_data.NativeFloat32List.new(4);
},
get _uint32view() {
- return _native_typed_data.NativeFloat32x4._list[dartx.buffer][dartx.asUint32List]();
+ return _native_typed_data.NativeFloat32x4._list.buffer[dartx.asUint32List]();
}
});
_native_typed_data.NativeInt32x4 = class NativeInt32x4 extends core.Object {
@@ -16538,7 +16538,7 @@ define([], function() {
floatList[dartx._set](1, f.y);
floatList[dartx._set](2, f.z);
floatList[dartx._set](3, f.w);
- let view = _native_typed_data.NativeInt32List._check(floatList[dartx.buffer][dartx.asInt32List]());
+ let view = _native_typed_data.NativeInt32List._check(floatList.buffer[dartx.asInt32List]());
return new _native_typed_data.NativeInt32x4._truncated(view[dartx._get](0), view[dartx._get](1), view[dartx._get](2), view[dartx._get](3));
}
_truncated(x, y, z, w) {
@@ -16841,7 +16841,7 @@ define([], function() {
},
set _list(_) {},
get _uint32View() {
- return _native_typed_data.NativeUint32List._check(_native_typed_data.NativeFloat64x2._list[dartx.buffer][dartx.asUint32List]());
+ return _native_typed_data.NativeUint32List._check(_native_typed_data.NativeFloat64x2._list.buffer[dartx.asUint32List]());
},
set _uint32View(_) {}
});
@@ -53812,7 +53812,7 @@ define([], function() {
get [dartx.completed]() {
let completer = CompleterOfDatabase().new();
this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
- completer.complete(this[dartx.db]);
+ completer.complete(this.db);
}, EventToNull()));
this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
completer.completeError(e);
@@ -54191,14 +54191,14 @@ define([], function() {
}
}
[dartx.remove]() {
- if (this[dartx.parentNode] != null) {
- let parent = this[dartx.parentNode];
- this[dartx.parentNode][_removeChild](this);
+ if (this.parentNode != null) {
+ let parent = this.parentNode;
+ this.parentNode[_removeChild](this);
}
}
[dartx.replaceWith](otherNode) {
try {
- let parent = this[dartx.parentNode];
+ let parent = this.parentNode;
parent[_replaceChild](otherNode, this);
} catch (e) {
}
@@ -54213,21 +54213,21 @@ define([], function() {
dart.throw(new core.ArgumentError(newNodes));
}
for (let i = 0, len = otherList.length; i < dart.notNull(len); ++i) {
- this[dartx.insertBefore](otherList[_this][dartx.firstChild], refChild);
+ this.insertBefore(otherList[_this].firstChild, refChild);
}
} else {
for (let node of newNodes) {
- this[dartx.insertBefore](node, refChild);
+ this.insertBefore(node, refChild);
}
}
}
[_clearChildren]() {
- while (this[dartx.firstChild] != null) {
- this[_removeChild](this[dartx.firstChild]);
+ while (this.firstChild != null) {
+ this[_removeChild](this.firstChild);
}
}
[dartx.toString]() {
- let value = this[dartx.nodeValue];
+ let value = this.nodeValue;
return value == null ? super.toString() : value;
}
get [dartx.childNodes]() {
@@ -54530,7 +54530,7 @@ define([], function() {
static html(html, opts) {
let validator = opts && 'validator' in opts ? opts.validator : null;
let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null;
- let fragment = html$.document[dartx.body][dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer});
+ let fragment = html$.document.body[dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer});
return html$.Element._check(fragment[dartx.nodes][dartx.where](dart.fn(e => html$.Element.is(e), NodeTobool$()))[dartx.single]);
}
created() {
@@ -54687,7 +54687,7 @@ define([], function() {
};
}
[dartx.query](relativeSelectors) {
- return this[dartx.querySelector](relativeSelectors);
+ return this.querySelector(relativeSelectors);
}
[dartx.queryAll](T) {
return relativeSelectors => {
@@ -54723,7 +54723,7 @@ define([], function() {
return html$.window[_getComputedStyle](this, pseudoElement);
}
get [dartx.client]() {
- return new (RectangleOfint())(this[dartx.clientLeft], this[dartx.clientTop], this[dartx.clientWidth], this[dartx.clientHeight]);
+ return new (RectangleOfint())(this.clientLeft, this.clientTop, this.clientWidth, this.clientHeight);
}
get [dartx.offset]() {
return new (RectangleOfint())(this[dartx.offsetLeft], this[dartx.offsetTop], this[dartx.offsetWidth], this[dartx.offsetHeight]);
@@ -54853,13 +54853,13 @@ define([], function() {
switch (where[dartx.toLowerCase]()) {
case 'beforebegin':
{
- this[dartx.parentNode][dartx.insertBefore](node, this);
+ this.parentNode.insertBefore(node, this);
break;
}
case 'afterbegin':
{
let first = dart.notNull(this[dartx.nodes][dartx.length]) > 0 ? this[dartx.nodes][dartx._get](0) : null;
- this[dartx.insertBefore](node, first);
+ this.insertBefore(node, first);
break;
}
case 'beforeend':
@@ -54869,7 +54869,7 @@ define([], function() {
}
case 'afterend':
{
- this[dartx.parentNode][dartx.insertBefore](node, this[dartx.nextNode]);
+ this.parentNode.insertBefore(node, this[dartx.nextNode]);
break;
}
default:
@@ -54920,19 +54920,19 @@ define([], function() {
return new html$._MarginCssRect(this);
}
get [dartx.documentOffset]() {
- return this[dartx.offsetTo](html$.document[dartx.documentElement]);
+ return this[dartx.offsetTo](html$.document.documentElement);
}
[dartx.offsetTo](parent) {
return html$.Element._offsetToHelper(this, parent);
}
static _offsetToHelper(current, parent) {
let sameAsParent = core.identical(current, parent);
- let foundAsParent = sameAsParent || parent[dartx.tagName] == 'HTML';
+ let foundAsParent = sameAsParent || parent.tagName == 'HTML';
if (current == null || sameAsParent) {
if (foundAsParent) return new (PointOfnum())(0, 0);
dart.throw(new core.ArgumentError("Specified element is not a transitive offset " + "parent of this element."));
}
- let parentOffset = current[dartx.offsetParent];
+ let parentOffset = current.offsetParent;
let p = html$.Element._offsetToHelper(parentOffset, parent);
return new (PointOfnum())(dart.notNull(p.x) + dart.notNull(current[dartx.offsetLeft]), dart.notNull(p.y) + dart.notNull(current[dartx.offsetTop]));
}
@@ -54956,42 +54956,42 @@ define([], function() {
dart.throw(new core.ArgumentError('validator can only be passed if treeSanitizer is null'));
}
if (html$.Element._parseDocument == null) {
- html$.Element._parseDocument = html$.document[dartx.implementation][dartx.createHtmlDocument]('');
- html$.Element._parseRange = html$.Element._parseDocument[dartx.createRange]();
+ html$.Element._parseDocument = html$.document.implementation[dartx.createHtmlDocument]('');
+ html$.Element._parseRange = html$.Element._parseDocument.createRange();
let base = html$.BaseElement._check(html$.Element._parseDocument[dartx.createElement]('base'));
- base[dartx.href] = html$.document[dartx.baseUri];
+ base.href = html$.document[dartx.baseUri];
html$.Element._parseDocument[dartx.head][dartx.append](base);
}
let contextElement = null;
if (html$.BodyElement.is(this)) {
- contextElement = html$.Element._parseDocument[dartx.body];
+ contextElement = html$.Element._parseDocument.body;
} else {
- contextElement = html$.Element._parseDocument[dartx.createElement](this[dartx.tagName]);
- html$.Element._parseDocument[dartx.body][dartx.append](html$.Node._check(contextElement));
+ contextElement = html$.Element._parseDocument[dartx.createElement](this.tagName);
+ html$.Element._parseDocument.body[dartx.append](html$.Node._check(contextElement));
}
let fragment = null;
if (dart.test(html$.Range.supportsCreateContextualFragment) && dart.test(this[_canBeUsedToCreateContextualFragment])) {
- html$.Element._parseRange[dartx.selectNodeContents](html$.Node._check(contextElement));
- fragment = html$.Element._parseRange[dartx.createContextualFragment](html);
+ html$.Element._parseRange.selectNodeContents(html$.Node._check(contextElement));
+ fragment = html$.Element._parseRange.createContextualFragment(html);
} else {
dart.dput(contextElement, _innerHtml, html);
- fragment = html$.Element._parseDocument[dartx.createDocumentFragment]();
+ fragment = html$.Element._parseDocument.createDocumentFragment();
while (dart.dload(contextElement, 'firstChild') != null) {
dart.dsend(fragment, 'append', dart.dload(contextElement, 'firstChild'));
}
}
- if (!dart.equals(contextElement, html$.Element._parseDocument[dartx.body])) {
+ if (!dart.equals(contextElement, html$.Element._parseDocument.body)) {
dart.dsend(contextElement, 'remove');
}
treeSanitizer.sanitizeTree(html$.Node._check(fragment));
- html$.document[dartx.adoptNode](html$.Node._check(fragment));
+ html$.document.adoptNode(html$.Node._check(fragment));
return html$.DocumentFragment._check(fragment);
}
get [_canBeUsedToCreateContextualFragment]() {
return !dart.test(this[_cannotBeUsedToCreateContextualFragment]);
}
get [_cannotBeUsedToCreateContextualFragment]() {
- return html$.Element._tagsForWhichCreateContextualFragmentIsNotSupported[dartx.contains](this[dartx.tagName]);
+ return html$.Element._tagsForWhichCreateContextualFragmentIsNotSupported[dartx.contains](this.tagName);
}
set [dartx.innerHtml](html) {
this[dartx.setInnerHtml](html);
@@ -56121,7 +56121,7 @@ define([], function() {
static new(opts) {
let href = opts && 'href' in opts ? opts.href : null;
let e = html$.AnchorElement._check(html$.document[dartx.createElement]("a"));
- if (href != null) e[dartx.href] = href;
+ if (href != null) e.href = href;
return e;
}
created() {
@@ -58329,8 +58329,8 @@ define([], function() {
let width = opts && 'width' in opts ? opts.width : null;
let height = opts && 'height' in opts ? opts.height : null;
let e = html$.CanvasElement._check(html$.document[dartx.createElement]("canvas"));
- if (width != null) e[dartx.width] = width;
- if (height != null) e[dartx.height] = height;
+ if (width != null) e.width = width;
+ if (height != null) e.height = height;
return e;
}
created() {
@@ -58848,19 +58848,19 @@ define([], function() {
}
[dartx.setFillColorRgb](r, g, b, a) {
if (a === void 0) a = 1;
- this[dartx.fillStyle] = dart.str`rgba(${r}, ${g}, ${b}, ${a})`;
+ this.fillStyle = dart.str`rgba(${r}, ${g}, ${b}, ${a})`;
}
[dartx.setFillColorHsl](h, s, l, a) {
if (a === void 0) a = 1;
- this[dartx.fillStyle] = dart.str`hsla(${h}, ${s}%, ${l}%, ${a})`;
+ this.fillStyle = dart.str`hsla(${h}, ${s}%, ${l}%, ${a})`;
}
[dartx.setStrokeColorRgb](r, g, b, a) {
if (a === void 0) a = 1;
- this[dartx.strokeStyle] = dart.str`rgba(${r}, ${g}, ${b}, ${a})`;
+ this.strokeStyle = dart.str`rgba(${r}, ${g}, ${b}, ${a})`;
}
[dartx.setStrokeColorHsl](h, s, l, a) {
if (a === void 0) a = 1;
- this[dartx.strokeStyle] = dart.str`hsla(${h}, ${s}%, ${l}%, ${a})`;
+ this.strokeStyle = dart.str`hsla(${h}, ${s}%, ${l}%, ${a})`;
}
[dartx.arc](x, y, radius, startAngle, endAngle, anticlockwise) {
if (anticlockwise === void 0) anticlockwise = false;
@@ -64837,8 +64837,8 @@ define([], function() {
return html$.CssStyleDeclaration.css('');
}
static css(css) {
- let style = html$.Element.tag('div')[dartx.style];
- style[dartx.cssText] = css;
+ let style = html$.Element.tag('div').style;
+ style.cssText = css;
return style;
}
[dartx.getPropertyValue](propertyName) {
@@ -64890,7 +64890,7 @@ define([], function() {
this.setProperty(propertyName, value, priority);
}
static get supportsTransitions() {
- return html$.document[dartx.body][dartx.style][dartx.supportsProperty]('transition');
+ return html$.document.body.style[dartx.supportsProperty]('transition');
}
static _() {
dart.throw(new core.UnsupportedError("Not supported"));
@@ -68542,7 +68542,7 @@ define([], function() {
};
}
[dartx.query](relativeSelectors) {
- return this[dartx.querySelector](relativeSelectors);
+ return this.querySelector(relativeSelectors);
}
[dartx.queryAll](T) {
return relativeSelectors => {
@@ -68776,12 +68776,12 @@ define([], function() {
]);
html$.DocumentFragment = class DocumentFragment extends html$.Node {
static new() {
- return html$.document[dartx.createDocumentFragment]();
+ return html$.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 html$.document[dartx.body][dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer});
+ return html$.document.body[dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer});
}
static svg(svgContent, opts) {
let validator = opts && 'validator' in opts ? opts.validator : null;
@@ -68826,7 +68826,7 @@ define([], function() {
let validator = opts && 'validator' in opts ? opts.validator : null;
let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null;
this[dartx.nodes][dartx.clear]();
- this[dartx.append](html$.document[dartx.body][dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer}));
+ this[dartx.append](html$.document.body[dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer}));
}
[dartx.appendText](text) {
this[dartx.append](html$.Text.new(text));
@@ -68838,7 +68838,7 @@ define([], function() {
this[dartx.append](html$.DocumentFragment.html(text, {validator: validator, treeSanitizer: html$.NodeTreeSanitizer._check(treeSanitizer)}));
}
[dartx.query](relativeSelectors) {
- return this[dartx.querySelector](relativeSelectors);
+ return this.querySelector(relativeSelectors);
}
[dartx.queryAll](T) {
return relativeSelectors => {
@@ -69983,7 +69983,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.item](index);
+ return this.item(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -70126,7 +70126,7 @@ define([], function() {
remove(object) {
if (html$.Element.is(object)) {
let element = object;
- if (core.identical(element[dartx.parentNode], this[_element$])) {
+ if (core.identical(element.parentNode, this[_element$])) {
this[_element$][_removeChild](element);
return true;
}
@@ -70140,7 +70140,7 @@ define([], function() {
if (index == this.length) {
this[_element$][dartx.append](element);
} else {
- this[_element$][dartx.insertBefore](element, this._get(index));
+ this[_element$].insertBefore(element, this._get(index));
}
}
setAll(index, iterable) {
@@ -73493,7 +73493,7 @@ define([], function() {
static getString(url, opts) {
let withCredentials = opts && 'withCredentials' in opts ? opts.withCredentials : null;
let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null;
- return html$.HttpRequest.request(url, {withCredentials: withCredentials, onProgress: onProgress}).then(core.String)(dart.fn(xhr => xhr[dartx.responseText], HttpRequestToString()));
+ return html$.HttpRequest.request(url, {withCredentials: withCredentials, onProgress: onProgress}).then(core.String)(dart.fn(xhr => xhr.responseText, HttpRequestToString()));
}
static postFormData(url, data, opts) {
let withCredentials = opts && 'withCredentials' in opts ? opts.withCredentials : null;
@@ -73524,29 +73524,29 @@ define([], function() {
if (method == null) {
method = 'GET';
}
- xhr[dartx.open](method, url, {async: true});
+ xhr.open(method, url, {async: true});
if (withCredentials != null) {
- xhr[dartx.withCredentials] = withCredentials;
+ xhr.withCredentials = withCredentials;
}
if (responseType != null) {
- xhr[dartx.responseType] = responseType;
+ xhr.responseType = responseType;
}
if (mimeType != null) {
- xhr[dartx.overrideMimeType](mimeType);
+ xhr.overrideMimeType(mimeType);
}
if (requestHeaders != null) {
requestHeaders[dartx.forEach](dart.fn((header, value) => {
- xhr[dartx.setRequestHeader](header, value);
+ xhr.setRequestHeader(header, value);
}, StringAndStringToNull()));
}
if (onProgress != null) {
xhr[dartx.onProgress].listen(onProgress);
}
xhr[dartx.onLoad].listen(dart.fn(e => {
- let accepted = dart.notNull(xhr[dartx.status]) >= 200 && dart.notNull(xhr[dartx.status]) < 300;
- let fileUri = xhr[dartx.status] == 0;
- let notModified = xhr[dartx.status] == 304;
- let unknownRedirect = dart.notNull(xhr[dartx.status]) > 307 && dart.notNull(xhr[dartx.status]) < 400;
+ 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 (accepted || fileUri || notModified || unknownRedirect) {
completer.complete(xhr);
} else {
@@ -73555,9 +73555,9 @@ define([], function() {
}, ProgressEventToNull()));
xhr[dartx.onError].listen(dart.bind(completer, 'completeError'));
if (sendData != null) {
- xhr[dartx.send](sendData);
+ xhr.send(sendData);
} else {
- xhr[dartx.send]();
+ xhr.send();
}
return completer.future;
}
@@ -73581,7 +73581,7 @@ define([], function() {
let method = opts && 'method' in opts ? opts.method : null;
let sendData = opts && 'sendData' in opts ? opts.sendData : null;
if (dart.test(html$.HttpRequest.supportsCrossOrigin)) {
- return html$.HttpRequest.request(url, {method: method, sendData: sendData}).then(core.String)(dart.fn(xhr => xhr[dartx.responseText], HttpRequestToString()));
+ return html$.HttpRequest.request(url, {method: method, sendData: sendData}).then(core.String)(dart.fn(xhr => xhr.responseText, HttpRequestToString()));
}
let completer = CompleterOfString().new();
if (method == null) {
@@ -73608,7 +73608,7 @@ define([], function() {
}
get [dartx.responseHeaders]() {
let headers = dart.map({}, core.String, core.String);
- let headersString = this[dartx.getAllResponseHeaders]();
+ let headersString = this.getAllResponseHeaders();
if (headersString == null) {
return headers;
}
@@ -73955,9 +73955,9 @@ define([], function() {
let width = opts && 'width' in opts ? opts.width : null;
let height = opts && 'height' in opts ? opts.height : null;
let e = html$.ImageElement._check(html$.document[dartx.createElement]("img"));
- if (src != null) e[dartx.src] = src;
- if (width != null) e[dartx.width] = width;
- if (height != null) e[dartx.height] = height;
+ if (src != null) e.src = src;
+ if (width != null) e.width = width;
+ if (height != null) e.height = height;
return e;
}
created() {
@@ -74181,7 +74181,7 @@ define([], function() {
let e = html$.InputElement._check(html$.document[dartx.createElement]("input"));
if (type != null) {
try {
- e[dartx.type] = type;
+ e.type = type;
} catch (_) {
}
@@ -74864,7 +74864,7 @@ define([], function() {
this[dirName] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'search'})[dartx.type] == 'search';
+ return html$.InputElement.new({type: 'search'}).type == 'search';
}
};
const dirName = Symbol("SearchInputElement.dirName");
@@ -74898,7 +74898,7 @@ define([], function() {
return html$.InputElement.new({type: 'url'});
}
static get supported() {
- return html$.InputElement.new({type: 'url'})[dartx.type] == 'url';
+ return html$.InputElement.new({type: 'url'}).type == 'url';
}
};
html$.UrlInputElement[dart.implements] = () => [html$.TextInputElementBase];
@@ -74907,7 +74907,7 @@ define([], function() {
return html$.InputElement.new({type: 'tel'});
}
static get supported() {
- return html$.InputElement.new({type: 'tel'})[dartx.type] == 'tel';
+ return html$.InputElement.new({type: 'tel'}).type == 'tel';
}
};
html$.TelephoneInputElement[dart.implements] = () => [html$.TextInputElementBase];
@@ -74981,7 +74981,7 @@ define([], function() {
this[size$] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'email'})[dartx.type] == 'email';
+ return html$.InputElement.new({type: 'email'}).type == 'email';
}
};
const autocomplete$ = Symbol("EmailInputElement.autocomplete");
@@ -75122,7 +75122,7 @@ define([], function() {
this[required$0] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'date'})[dartx.type] == 'date';
+ return html$.InputElement.new({type: 'date'}).type == 'date';
}
};
const valueAsDate = Symbol("DateInputElement.valueAsDate");
@@ -75172,7 +75172,7 @@ define([], function() {
this[required$1] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'month'})[dartx.type] == 'month';
+ return html$.InputElement.new({type: 'month'}).type == 'month';
}
};
const valueAsDate$ = Symbol("MonthInputElement.valueAsDate");
@@ -75222,7 +75222,7 @@ define([], function() {
this[required$2] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'week'})[dartx.type] == 'week';
+ return html$.InputElement.new({type: 'week'}).type == 'week';
}
};
const valueAsDate$0 = Symbol("WeekInputElement.valueAsDate");
@@ -75272,7 +75272,7 @@ define([], function() {
this[required$3] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'time'})[dartx.type] == 'time';
+ return html$.InputElement.new({type: 'time'}).type == 'time';
}
};
const valueAsDate$1 = Symbol("TimeInputElement.valueAsDate");
@@ -75315,7 +75315,7 @@ define([], function() {
this[required$4] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'datetime-local'})[dartx.type] == 'datetime-local';
+ return html$.InputElement.new({type: 'datetime-local'}).type == 'datetime-local';
}
};
const readOnly$4 = Symbol("LocalDateTimeInputElement.readOnly");
@@ -75356,7 +75356,7 @@ define([], function() {
this[required$5] = value;
}
static get supported() {
- return html$.InputElement.new({type: 'number'})[dartx.type] == 'number';
+ return html$.InputElement.new({type: 'number'}).type == 'number';
}
};
const placeholder$0 = Symbol("NumberInputElement.placeholder");
@@ -75383,7 +75383,7 @@ define([], function() {
return html$.InputElement.new({type: 'range'});
}
static get supported() {
- return html$.InputElement.new({type: 'range'})[dartx.type] == 'range';
+ return html$.InputElement.new({type: 'range'}).type == 'range';
}
};
html$.RangeInputElement[dart.implements] = () => [html$.RangeInputElementBase];
@@ -76276,7 +76276,7 @@ define([], function() {
if ("origin" in this) {
return this.origin;
}
- return dart.str`${this[dartx.protocol]}//${this[dartx.host]}`;
+ return dart.str`${this.protocol}//${this.host}`;
}
[dartx.toString]() {
return String(this);
@@ -77139,7 +77139,7 @@ define([], function() {
return html$.MediaStream.removeTrackEvent.forTarget(this);
}
static get supported() {
- return !!(html$.window[dartx.navigator].getUserMedia || html$.window[dartx.navigator].webkitGetUserMedia || html$.window[dartx.navigator].mozGetUserMedia || html$.window[dartx.navigator].msGetUserMedia);
+ return !!(html$.window.navigator.getUserMedia || html$.window.navigator.webkitGetUserMedia || html$.window.navigator.mozGetUserMedia || html$.window.navigator.msGetUserMedia);
}
};
dart.setSignature(html$.MediaStream, {
@@ -78324,7 +78324,7 @@ define([], function() {
dart.throw(new core.UnsupportedError('offsetX is only supported on elements'));
}
let target = html$.Element._check(this[dartx.target]);
- let point = this[dartx.client]['-'](target[dartx.getBoundingClientRect]()[dartx.topLeft]);
+ let point = this[dartx.client]['-'](target.getBoundingClientRect()[dartx.topLeft]);
return new (PointOfnum())(point.x[dartx.toInt](), point.y[dartx.toInt]());
}
}
@@ -79019,7 +79019,7 @@ define([], function() {
let otherList = iterable;
if (!core.identical(otherList[_this], this[_this])) {
for (let i = 0, len = otherList.length; i < dart.notNull(len); ++i) {
- this[_this][dartx.append](otherList[_this][dartx.firstChild]);
+ this[_this][dartx.append](otherList[_this].firstChild);
}
}
return;
@@ -79035,7 +79035,7 @@ define([], function() {
if (index == this.length) {
this[_this][dartx.append](node);
} else {
- this[_this][dartx.insertBefore](node, this._get(index));
+ this[_this].insertBefore(node, this._get(index));
}
}
insertAll(index, iterable) {
@@ -79066,12 +79066,12 @@ define([], function() {
remove(object) {
if (!html$.Node.is(object)) return false;
let node = html$.Node._check(object);
- if (!core.identical(this[_this], node[dartx.parentNode])) return false;
+ if (!core.identical(this[_this], node.parentNode)) return false;
this[_this][_removeChild](node);
return true;
}
[_filter$0](test, removeMatching) {
- let child = this[_this][dartx.firstChild];
+ let child = this[_this].firstChild;
while (child != null) {
let nextChild = child[dartx.nextNode];
if (test(child) == removeMatching) {
@@ -79094,7 +79094,7 @@ define([], function() {
return value;
}
get iterator() {
- return this[_this][dartx.childNodes][dartx.iterator];
+ return this[_this].childNodes[dartx.iterator];
}
sort(compare) {
if (compare === void 0) compare = null;
@@ -79113,16 +79113,16 @@ define([], function() {
dart.throw(new core.UnsupportedError("Cannot fillRange on Node list"));
}
get length() {
- return this[_this][dartx.childNodes][dartx.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][dartx.childNodes][dartx._get](index);
+ return this[_this].childNodes[dartx._get](index);
}
get rawList() {
- return this[_this][dartx.childNodes];
+ return this[_this].childNodes;
}
};
dart.addSimpleTypeTests(html$._ChildNodeListLazy);
@@ -81579,7 +81579,7 @@ define([], function() {
]);
html$.Range = class Range extends _interceptors.Interceptor {
static new() {
- return html$.document[dartx.createRange]();
+ return html$.document.createRange();
}
static fromPoint(point) {
return html$.document[_caretRangeFromPoint](dart.asInt(point.x), dart.asInt(point.y));
@@ -83179,11 +83179,11 @@ define([], function() {
return new (UnmodifiableListViewOfOptionElement())(options);
}
get [dartx.selectedOptions]() {
- if (dart.test(this[dartx.multiple])) {
- let options = this[dartx.options][dartx.where](dart.fn(o => o[dartx.selected], OptionElementTobool()))[dartx.toList]();
+ if (dart.test(this.multiple)) {
+ let options = this[dartx.options][dartx.where](dart.fn(o => o.selected, OptionElementTobool()))[dartx.toList]();
return new (UnmodifiableListViewOfOptionElement())(options);
} else {
- return JSArrayOfOptionElement().of([this[dartx.options][dartx._get](this[dartx.selectedIndex])]);
+ return JSArrayOfOptionElement().of([this[dartx.options][dartx._get](this.selectedIndex)]);
}
}
};
@@ -85881,7 +85881,7 @@ define([], function() {
let treeSanitizer = opts && 'treeSanitizer' in opts ? opts.treeSanitizer : null;
this[dartx.text] = null;
let fragment = this[dartx.createFragment](html, {validator: validator, treeSanitizer: treeSanitizer});
- this[dartx.content][dartx.append](fragment);
+ this.content[dartx.append](fragment);
}
};
dart.defineNamedConstructor(html$.TemplateElement, 'created');
@@ -89434,10 +89434,10 @@ define([], function() {
return this.pageYOffset[dartx.round]();
}
get [dartx.scrollX]() {
- return "scrollX" in this ? this.scrollX[dartx.round]() : this[dartx.document][dartx.documentElement][dartx.scrollLeft];
+ return "scrollX" in this ? this.scrollX[dartx.round]() : this[dartx.document].documentElement[dartx.scrollLeft];
}
get [dartx.scrollY]() {
- return "scrollY" in this ? this.scrollY[dartx.round]() : this[dartx.document][dartx.documentElement][dartx.scrollTop];
+ return "scrollY" in this ? this.scrollY[dartx.round]() : this[dartx.document].documentElement[dartx.scrollTop];
}
};
html$.Window[dart.implements] = () => [html$.WindowEventHandlers, html$.WindowBase, html$.GlobalEventHandlers, html$._WindowTimers, html$.WindowBase64];
@@ -89715,40 +89715,40 @@ define([], function() {
this[_selector] = null;
}
get bubbles() {
- return this.wrapped[dartx.bubbles];
+ return this.wrapped.bubbles;
}
get cancelable() {
- return this.wrapped[dartx.cancelable];
+ return this.wrapped.cancelable;
}
get currentTarget() {
return this.wrapped[dartx.currentTarget];
}
get defaultPrevented() {
- return this.wrapped[dartx.defaultPrevented];
+ return this.wrapped.defaultPrevented;
}
get eventPhase() {
- return this.wrapped[dartx.eventPhase];
+ return this.wrapped.eventPhase;
}
get target() {
return this.wrapped[dartx.target];
}
get timeStamp() {
- return this.wrapped[dartx.timeStamp];
+ return this.wrapped.timeStamp;
}
get type() {
- return this.wrapped[dartx.type];
+ return this.wrapped.type;
}
[_initEvent](eventTypeArg, canBubbleArg, cancelableArg) {
dart.throw(new core.UnsupportedError('Cannot initialize this Event.'));
}
preventDefault() {
- this.wrapped[dartx.preventDefault]();
+ this.wrapped.preventDefault();
}
stopImmediatePropagation() {
- this.wrapped[dartx.stopImmediatePropagation]();
+ this.wrapped.stopImmediatePropagation();
}
stopPropagation() {
- this.wrapped[dartx.stopPropagation]();
+ this.wrapped.stopPropagation();
}
get matchingTarget() {
if (this[_selector] == null) {
@@ -89764,7 +89764,7 @@ define([], function() {
dart.throw(new core.StateError('No selector matched for populating matchedTarget.'));
}
get path() {
- return ListOfNode()._check(this.wrapped[dartx.path]);
+ return ListOfNode()._check(this.wrapped.path);
}
get [_get_currentTarget]() {
return this.wrapped[_get_currentTarget];
@@ -90411,21 +90411,21 @@ define([], function() {
]);
html$._ClientRect = class _ClientRect extends _interceptors.Interceptor {
[dartx.toString]() {
- return dart.str`Rectangle (${this[dartx.left]}, ${this[dartx.top]}) ${this[dartx.width]} x ${this[dartx.height]}`;
+ return dart.str`Rectangle (${this.left}, ${this.top}) ${this.width} x ${this.height}`;
}
[dartx['==']](other) {
if (!RectangleOfnum().is(other)) return false;
- return dart.equals(this[dartx.left], dart.dload(other, 'left')) && dart.equals(this[dartx.top], dart.dload(other, 'top')) && dart.equals(this[dartx.width], dart.dload(other, 'width')) && dart.equals(this[dartx.height], dart.dload(other, 'height'));
+ 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 [dartx.hashCode]() {
- return html$._JenkinsSmiHash.hash4(dart.hashCode(this[dartx.left]), dart.hashCode(this[dartx.top]), dart.hashCode(this[dartx.width]), dart.hashCode(this[dartx.height]));
+ return html$._JenkinsSmiHash.hash4(dart.hashCode(this.left), dart.hashCode(this.top), dart.hashCode(this.width), dart.hashCode(this.height));
}
[dartx.intersection](other) {
- let x0 = math.max(core.num)(this[dartx.left], other[dartx.left]);
- let x1 = math.min(core.num)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
+ let x0 = math.max(core.num)(this.left, other[dartx.left]);
+ let x1 = math.min(core.num)(dart.notNull(this.left) + dart.notNull(this.width), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
if (dart.notNull(x0) <= dart.notNull(x1)) {
- let y0 = math.max(core.num)(this[dartx.top], other[dartx.top]);
- let y1 = math.min(core.num)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
+ let y0 = math.max(core.num)(this.top, other[dartx.top]);
+ let y1 = math.min(core.num)(dart.notNull(this.top) + dart.notNull(this.height), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
if (dart.notNull(y0) <= dart.notNull(y1)) {
return new (RectangleOfnum())(x0, y0, dart.notNull(x1) - dart.notNull(x0), dart.notNull(y1) - dart.notNull(y0));
}
@@ -90433,32 +90433,32 @@ define([], function() {
return null;
}
[dartx.intersects](other) {
- return dart.notNull(this[dartx.left]) <= dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]) && dart.notNull(other[dartx.left]) <= dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]) && dart.notNull(this[dartx.top]) <= dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]) && dart.notNull(other[dartx.top]) <= dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]);
+ return dart.notNull(this.left) <= dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]) && dart.notNull(other[dartx.left]) <= dart.notNull(this.left) + dart.notNull(this.width) && dart.notNull(this.top) <= dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]) && dart.notNull(other[dartx.top]) <= dart.notNull(this.top) + dart.notNull(this.height);
}
[dartx.boundingBox](other) {
- let right = math.max(core.num)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
- let bottom = math.max(core.num)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
- let left = math.min(core.num)(this[dartx.left], other[dartx.left]);
- let top = math.min(core.num)(this[dartx.top], other[dartx.top]);
+ let right = math.max(core.num)(dart.notNull(this.left) + dart.notNull(this.width), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
+ let bottom = math.max(core.num)(dart.notNull(this.top) + dart.notNull(this.height), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
+ let left = math.min(core.num)(this.left, other[dartx.left]);
+ let top = math.min(core.num)(this.top, other[dartx.top]);
return new (RectangleOfnum())(left, top, dart.notNull(right) - dart.notNull(left), dart.notNull(bottom) - dart.notNull(top));
}
[dartx.containsRectangle](another) {
- return dart.notNull(this[dartx.left]) <= dart.notNull(another[dartx.left]) && dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]) >= dart.notNull(another[dartx.left]) + dart.notNull(another[dartx.width]) && dart.notNull(this[dartx.top]) <= dart.notNull(another[dartx.top]) && dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]) >= dart.notNull(another[dartx.top]) + dart.notNull(another[dartx.height]);
+ return dart.notNull(this.left) <= dart.notNull(another[dartx.left]) && dart.notNull(this.left) + dart.notNull(this.width) >= dart.notNull(another[dartx.left]) + dart.notNull(another[dartx.width]) && dart.notNull(this.top) <= dart.notNull(another[dartx.top]) && dart.notNull(this.top) + dart.notNull(this.height) >= dart.notNull(another[dartx.top]) + dart.notNull(another[dartx.height]);
}
[dartx.containsPoint](another) {
- return dart.notNull(another.x) >= dart.notNull(this[dartx.left]) && dart.notNull(another.x) <= dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]) && dart.notNull(another.y) >= dart.notNull(this[dartx.top]) && dart.notNull(another.y) <= dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]);
+ 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 [dartx.topLeft]() {
- return new (PointOfnum())(this[dartx.left], this[dartx.top]);
+ return new (PointOfnum())(this.left, this.top);
}
get [dartx.topRight]() {
- return new (PointOfnum())(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), this[dartx.top]);
+ return new (PointOfnum())(dart.notNull(this.left) + dart.notNull(this.width), this.top);
}
get [dartx.bottomRight]() {
- return new (PointOfnum())(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]));
+ return new (PointOfnum())(dart.notNull(this.left) + dart.notNull(this.width), dart.notNull(this.top) + dart.notNull(this.height));
}
get [dartx.bottomLeft]() {
- return new (PointOfnum())(this[dartx.left], dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]));
+ return new (PointOfnum())(this.left, dart.notNull(this.top) + dart.notNull(this.height));
}
static _() {
dart.throw(new core.UnsupportedError("Not supported"));
@@ -90554,7 +90554,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.item](index);
+ return this.item(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -91416,7 +91416,7 @@ define([], function() {
for (let i = 0, len = attributes[dartx.length]; i < dart.notNull(len); i++) {
let attr = html$._Attr._check(attributes[dartx._get](i));
if (dart.test(this[_matches](attr))) {
- keys[dartx.add](attr[dartx.name]);
+ keys[dartx.add](attr.name);
}
}
return keys;
@@ -91427,7 +91427,7 @@ define([], function() {
for (let i = 0, len = attributes[dartx.length]; i < dart.notNull(len); i++) {
let attr = html$._Attr._check(attributes[dartx._get](i));
if (dart.test(this[_matches](attr))) {
- values[dartx.add](attr[dartx.value]);
+ values[dartx.add](attr.value);
}
}
return values;
@@ -91475,14 +91475,14 @@ define([], function() {
return this[_element$][_hasAttribute](core.String._check(key));
}
_get(key) {
- return this[_element$][dartx.getAttribute](core.String._check(key));
+ return this[_element$].getAttribute(core.String._check(key));
}
_set(key, value) {
- this[_element$][dartx.setAttribute](key, value);
+ this[_element$].setAttribute(key, value);
return value;
}
remove(key) {
- let value = this[_element$][dartx.getAttribute](core.String._check(key));
+ let value = this[_element$].getAttribute(core.String._check(key));
this[_element$][_removeAttribute](core.String._check(key));
return value;
}
@@ -91520,10 +91520,10 @@ define([], function() {
return this[_element$][_hasAttributeNS](this[_namespace], core.String._check(key));
}
_get(key) {
- return this[_element$][dartx.getAttributeNS](this[_namespace], core.String._check(key));
+ return this[_element$].getAttributeNS(this[_namespace], core.String._check(key));
}
_set(key, value) {
- this[_element$][dartx.setAttributeNS](this[_namespace], key, value);
+ this[_element$].setAttributeNS(this[_namespace], key, value);
return value;
}
remove(key) {
@@ -91845,10 +91845,10 @@ define([], function() {
set height(newHeight) {
if (html$.Dimension.is(newHeight)) {
if (dart.test(dart.dsend(dart.dload(newHeight, 'value'), '<', 0))) newHeight = new html$.Dimension.px(0);
- this[_element$][dartx.style][dartx.height] = dart.toString(newHeight);
+ this[_element$].style[dartx.height] = dart.toString(newHeight);
} else if (typeof newHeight == 'number') {
if (dart.test(dart.dsend(newHeight, '<', 0))) newHeight = 0;
- this[_element$][dartx.style][dartx.height] = dart.str`${newHeight}px`;
+ this[_element$].style[dartx.height] = dart.str`${newHeight}px`;
} else {
dart.throw(new core.ArgumentError("newHeight is not a Dimension or num"));
}
@@ -91856,19 +91856,19 @@ define([], function() {
set width(newWidth) {
if (html$.Dimension.is(newWidth)) {
if (dart.test(dart.dsend(dart.dload(newWidth, 'value'), '<', 0))) newWidth = new html$.Dimension.px(0);
- this[_element$][dartx.style][dartx.width] = dart.toString(newWidth);
+ this[_element$].style[dartx.width] = dart.toString(newWidth);
} else if (typeof newWidth == 'number') {
if (dart.test(dart.dsend(newWidth, '<', 0))) newWidth = 0;
- this[_element$][dartx.style][dartx.width] = dart.str`${newWidth}px`;
+ this[_element$].style[dartx.width] = dart.str`${newWidth}px`;
} else {
dart.throw(new core.ArgumentError("newWidth is not a Dimension or num"));
}
}
get left() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._CONTENT));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._CONTENT));
}
get top() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._CONTENT));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._CONTENT));
}
};
dart.setSignature(html$._ContentCssRect, {
@@ -91920,10 +91920,10 @@ define([], function() {
super.width = value;
}
get left() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._PADDING));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._PADDING));
}
get top() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._PADDING));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._PADDING));
}
};
dart.setSignature(html$._PaddingCssRect, {
@@ -91952,10 +91952,10 @@ define([], function() {
super.width = value;
}
get left() {
- return this[_element$][dartx.getBoundingClientRect]()[dartx.left];
+ return this[_element$].getBoundingClientRect()[dartx.left];
}
get top() {
- return this[_element$][dartx.getBoundingClientRect]()[dartx.top];
+ return this[_element$].getBoundingClientRect()[dartx.top];
}
};
dart.setSignature(html$._BorderCssRect, {
@@ -91984,10 +91984,10 @@ define([], function() {
super.width = value;
}
get left() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._MARGIN));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.left]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['left']), html$._MARGIN));
}
get top() {
- return dart.notNull(this[_element$][dartx.getBoundingClientRect]()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._MARGIN));
+ return dart.notNull(this[_element$].getBoundingClientRect()[dartx.top]) - dart.notNull(this[_addOrSubtractToBoxModel](JSArrayOfString().of(['top']), html$._MARGIN));
}
};
dart.setSignature(html$._MarginCssRect, {
@@ -92295,7 +92295,7 @@ define([], function() {
writeClasses(s) {
let classes = s.join(' ');
for (let e of this[_elementIterable]) {
- e[dartx.className] = classes;
+ e.className = classes;
}
}
modify(f) {
@@ -92326,7 +92326,7 @@ define([], function() {
}
readClasses() {
let s = LinkedHashSetOfString().new();
- let classname = this[_element$][dartx.className];
+ let classname = this[_element$].className;
for (let name of classname[dartx.split](' ')) {
let trimmed = name[dartx.trim]();
if (!dart.test(trimmed[dartx.isEmpty])) {
@@ -92336,7 +92336,7 @@ define([], function() {
return s;
}
writeClasses(s) {
- this[_element$][dartx.className] = s.join(' ');
+ this[_element$].className = s.join(' ');
}
get length() {
return html$._ElementCssClassSet._classListLength(html$._ElementCssClassSet._classListOf(this[_element$]));
@@ -92348,7 +92348,7 @@ define([], function() {
return this.length != 0;
}
clear() {
- this[_element$][dartx.className] = '';
+ this[_element$].className = '';
}
contains(value) {
return html$._ElementCssClassSet._contains(this[_element$], value);
@@ -92426,7 +92426,7 @@ define([], function() {
let list = html$._ElementCssClassSet._classListOf(_element);
let i = 0;
while (i < dart.notNull(html$._ElementCssClassSet._classListLength(list))) {
- let item = list[dartx.item](i);
+ let item = list.item(i);
if (doRemove == test(item)) {
html$._ElementCssClassSet._classListRemove(list, item);
} else {
@@ -92893,7 +92893,7 @@ define([], function() {
}
add(event) {
T._check(event);
- if (event[dartx.type] == this[_type$]) this[_streamController].add(event);
+ if (event.type == this[_type$]) this[_streamController].add(event);
}
}
_CustomEventStreamImpl[dart.implements] = () => [CustomStreamOfT()];
@@ -93032,28 +93032,28 @@ define([], function() {
}
}
get code() {
- return this[_parent$][dartx.code];
+ return this[_parent$].code;
}
get ctrlKey() {
- return this[_parent$][dartx.ctrlKey];
+ return this[_parent$].ctrlKey;
}
get detail() {
- return this[_parent$][dartx.detail];
+ return this[_parent$].detail;
}
get key() {
- return this[_parent$][dartx.key];
+ return this[_parent$].key;
}
get keyLocation() {
- return this[_parent$][dartx.keyLocation];
+ return this[_parent$].keyLocation;
}
get metaKey() {
- return this[_parent$][dartx.metaKey];
+ return this[_parent$].metaKey;
}
get shiftKey() {
- return this[_parent$][dartx.shiftKey];
+ return this[_parent$].shiftKey;
}
get sourceDevice() {
- return this[_parent$][dartx.sourceDevice];
+ return this[_parent$].sourceDevice;
}
get view() {
return html$.Window._check(this[_parent$][dartx.view]);
@@ -93181,7 +93181,7 @@ define([], function() {
}
add(event) {
if (event.type == this[_type$]) {
- event.currentTarget[dartx.dispatchEvent](event[_parent$]);
+ event.currentTarget.dispatchEvent(event[_parent$]);
this[_streamController].add(event);
}
}
@@ -93838,14 +93838,14 @@ define([], function() {
if (prevEvent[_shadowCharCode] == event[dartx.charCode]) {
return prevEvent.keyCode;
}
- if ((dart.test(event[dartx.shiftKey]) || dart.test(this[_capsLockOn])) && dart.notNull(event[dartx.charCode]) >= dart.notNull("A"[dartx.codeUnits][dartx._get](0)) && dart.notNull(event[dartx.charCode]) <= dart.notNull("Z"[dartx.codeUnits][dartx._get](0)) && dart.notNull(event[dartx.charCode]) + dart.notNull(html$._KeyboardEventHandler._ROMAN_ALPHABET_OFFSET) == prevEvent[_shadowCharCode]) {
+ if ((dart.test(event.shiftKey) || dart.test(this[_capsLockOn])) && dart.notNull(event[dartx.charCode]) >= dart.notNull("A"[dartx.codeUnits][dartx._get](0)) && dart.notNull(event[dartx.charCode]) <= dart.notNull("Z"[dartx.codeUnits][dartx._get](0)) && dart.notNull(event[dartx.charCode]) + dart.notNull(html$._KeyboardEventHandler._ROMAN_ALPHABET_OFFSET) == prevEvent[_shadowCharCode]) {
return prevEvent.keyCode;
}
}
return html$.KeyCode.UNKNOWN;
}
[_findCharCodeKeyDown](event) {
- if (event[dartx.keyLocation] == 3) {
+ if (event.keyLocation == 3) {
switch (event[dartx.keyCode]) {
case html$.KeyCode.NUM_ZERO:
{
@@ -94011,7 +94011,7 @@ define([], function() {
return event[dartx.keyCode];
}
processKeyDown(e) {
- if (dart.notNull(this[_keyDownList][dartx.length]) > 0 && (this[_keyDownList][dartx.last].keyCode == html$.KeyCode.CTRL && !dart.test(e[dartx.ctrlKey]) || this[_keyDownList][dartx.last].keyCode == html$.KeyCode.ALT && !dart.test(e[dartx.altKey]) || dart.test(html_common.Device.userAgent[dartx.contains]('Mac')) && this[_keyDownList][dartx.last].keyCode == html$.KeyCode.META && !dart.test(e[dartx.metaKey]))) {
+ if (dart.notNull(this[_keyDownList][dartx.length]) > 0 && (this[_keyDownList][dartx.last].keyCode == html$.KeyCode.CTRL && !dart.test(e.ctrlKey) || this[_keyDownList][dartx.last].keyCode == html$.KeyCode.ALT && !dart.test(e.altKey) || dart.test(html_common.Device.userAgent[dartx.contains]('Mac')) && this[_keyDownList][dartx.last].keyCode == html$.KeyCode.META && !dart.test(e.metaKey))) {
this[_keyDownList][dartx.clear]();
}
let event = new html$.KeyEvent.wrap(e);
@@ -94511,14 +94511,14 @@ define([], function() {
html$._HttpRequestUtils = class _HttpRequestUtils extends core.Object {
static get(url, onComplete, withCredentials) {
let request = html$.HttpRequest.new();
- request[dartx.open]('GET', url, {async: true});
- request[dartx.withCredentials] = withCredentials;
+ request.open('GET', url, {async: true});
+ request.withCredentials = withCredentials;
request[dartx.onReadyStateChange].listen(dart.fn(e => {
- if (request[dartx.readyState] == html$.HttpRequest.DONE) {
+ if (request.readyState == html$.HttpRequest.DONE) {
onComplete(request);
}
}, ProgressEventToNull()));
- request[dartx.send]();
+ request.send();
return request;
}
};
@@ -94918,7 +94918,7 @@ define([], function() {
this[_history] = history;
}
static _createSafe(h) {
- if (core.identical(h, html$.window[dartx.history])) {
+ if (core.identical(h, html$.window.history)) {
return html$.HistoryBase._check(h);
} else {
return new html$._HistoryCrossFrame(h);
@@ -94979,7 +94979,7 @@ define([], function() {
};
dart.fn(html$.queryAll, StringToElementListOfElement());
html$.querySelector = function(selectors) {
- return html$.document[dartx.querySelector](selectors);
+ return html$.document.querySelector(selectors);
};
dart.fn(html$.querySelector, StringToElement());
html$.querySelectorAll = function(selectors) {
@@ -95028,8 +95028,8 @@ define([], function() {
this[_loc] = html$.window[dartx.location];
}
allowsUri(uri) {
- this[_hiddenAnchor][dartx.href] = uri;
- return this[_hiddenAnchor][dartx.hostname] == this[_loc][dartx.hostname] && this[_hiddenAnchor][dartx.port] == this[_loc][dartx.port] && this[_hiddenAnchor][dartx.protocol] == this[_loc][dartx.protocol] || this[_hiddenAnchor][dartx.hostname] == '' && this[_hiddenAnchor][dartx.port] == '' && (this[_hiddenAnchor][dartx.protocol] == ':' || this[_hiddenAnchor][dartx.protocol] == '');
+ 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 == '');
}
};
html$._SameOriginUriPolicy[dart.implements] = () => [html$.UriPolicy];
@@ -95074,7 +95074,7 @@ define([], function() {
sanitizeTree(node) {
const walk = (function(node, parent) {
this.sanitizeNode(node, parent);
- let child = node[dartx.lastChild];
+ let child = node.lastChild;
while (child != null) {
let nextChild = child[dartx.previousNode];
walk(child, node);
@@ -95151,11 +95151,11 @@ define([], function() {
}
if (html$.TemplateElement.is(element)) {
let template = element;
- this.sanitizeTree(template[dartx.content]);
+ this.sanitizeTree(template.content);
}
}
sanitizeNode(node, parent) {
- switch (node[dartx.nodeType]) {
+ switch (node.nodeType) {
case html$.Node.ELEMENT_NODE:
{
this[_sanitizeUntrustedElement](node, parent);
@@ -95428,7 +95428,7 @@ define([], function() {
html_common.convertNativeToDart_ImageData = function(nativeImageData) {
0;
if (html$.ImageData.is(nativeImageData)) {
- let data = nativeImageData[dartx.data];
+ let data = nativeImageData.data;
if (data.constructor === Array) {
if (typeof CanvasPixelArray !== "undefined") {
data.constructor = CanvasPixelArray;
@@ -95582,7 +95582,7 @@ define([], function() {
dart.fn(html_common.convertNativePromiseToDartFuture, dynamicToFuture());
html_common.Device = class Device extends core.Object {
static get userAgent() {
- return html$.window[dartx.navigator][dartx.userAgent];
+ return html$.window.navigator.userAgent;
}
static get isOpera() {
if (html_common.Device._isOpera == null) {
@@ -95698,7 +95698,7 @@ define([], function() {
contains(needle) {
if (!html$.Element.is(needle)) return false;
let element = html$.Element._check(needle);
- return dart.equals(element[dartx.parentNode], this[_node]);
+ return dart.equals(element.parentNode, this[_node]);
}
get reversed() {
return this[_filtered][dartx.reversed];
@@ -95736,7 +95736,7 @@ define([], function() {
this.add(value);
} else {
let element = this[_iterable$0][dartx.elementAt](index);
- element[dartx.parentNode][dartx.insertBefore](value, element);
+ element.parentNode.insertBefore(value, element);
}
}
insertAll(index, iterable) {
@@ -95744,7 +95744,7 @@ define([], function() {
this.addAll(iterable);
} else {
let element = this[_iterable$0][dartx.elementAt](index);
- element[dartx.parentNode][dartx.insertAllBefore](iterable, element);
+ element.parentNode[dartx.insertAllBefore](iterable, element);
}
}
removeAt(index) {
@@ -95771,7 +95771,7 @@ define([], function() {
return this[_filtered][dartx.iterator];
}
get rawList() {
- return this[_node][dartx.childNodes];
+ return this[_node].childNodes;
}
};
dart.addSimpleTypeTests(html_common.FilteredElementList);
@@ -95960,7 +95960,7 @@ define([], function() {
let match = svg$.SvgElement._START_TAG_REGEXP.firstMatch(svg);
let parentElement = null;
if (match != null && match.group(1)[dartx.toLowerCase]() == 'svg') {
- parentElement = html$.document[dartx.body];
+ parentElement = html$.document.body;
} else {
parentElement = svg$.SvgSvgElement.new();
}
@@ -96007,11 +96007,11 @@ define([], function() {
treeSanitizer = html$.NodeTreeSanitizer.new(validator);
}
let html = dart.str`<svg version="1.1">${svg}</svg>`;
- let fragment = html$.document[dartx.body][dartx.createFragment](html, {treeSanitizer: treeSanitizer});
+ let fragment = html$.document.body[dartx.createFragment](html, {treeSanitizer: treeSanitizer});
let svgFragment = html$.DocumentFragment.new();
let root = fragment[dartx.nodes][dartx.single];
- while (root[dartx.firstChild] != null) {
- svgFragment[dartx.append](root[dartx.firstChild]);
+ while (root.firstChild != null) {
+ svgFragment[dartx.append](root.firstChild);
}
return svgFragment;
}
@@ -98996,7 +98996,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.getItem](index);
+ return this.getItem(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -99549,7 +99549,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.getItem](index);
+ return this.getItem(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -100480,7 +100480,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.getItem](index);
+ return this.getItem(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -101173,7 +101173,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.getItem](index);
+ return this.getItem(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));
@@ -101964,7 +101964,7 @@ define([], function() {
}
[dartx._get](index) {
if (index >>> 0 !== index || index >= this[dartx.length]) dart.throw(core.RangeError.index(index, this));
- return this[dartx.getItem](index);
+ return this.getItem(index);
}
[dartx._set](index, value) {
dart.throw(new core.UnsupportedError("Cannot assign element of immutable List."));

Powered by Google App Engine
This is Rietveld 408576698