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

Unified Diff: lib/html/release/html.dart

Issue 9997003: Add back @domName annotations to dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ready to review Created 8 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
« lib/html/dartium/html_dartium.dart ('K') | « lib/html/frog/html_frog.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/release/html.dart
diff --git a/lib/html/release/html.dart b/lib/html/release/html.dart
index 5f34f2bd82788c80975c3863e226dbfb5b860a91..bf84af27a02f52c5e6a4e9e7cc1ab13f0fe213ca 100644
--- a/lib/html/release/html.dart
+++ b/lib/html/release/html.dart
@@ -4739,10 +4739,22 @@ class _CanvasPixelArrayImpl extends _DOMTypeBase implements CanvasPixelArray {
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
+ }
+
+ // From Collection<int>:
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -4756,78 +4768,56 @@ class _CanvasPixelArrayImpl extends _DOMTypeBase implements CanvasPixelArray {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
}
class _CanvasRenderingContextImpl extends _DOMTypeBase implements CanvasRenderingContext {
@@ -7143,15 +7133,15 @@ class FilteredElementList implements ElementList {
throw const NotImplementedException();
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const NotImplementedException();
}
- void removeRange(int start, int length) {
- _filtered.getRange(start, length).forEach((el) => el.remove());
+ void removeRange(int start, int rangeLength) {
+ _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const NotImplementedException();
}
@@ -7162,11 +7152,11 @@ class FilteredElementList implements ElementList {
}
Element removeLast() {
- final last = this.last();
- if (last != null) {
- last.remove();
+ final result = this.last();
+ if (result != null) {
+ result.remove();
}
- return last;
+ return result;
}
Collection map(f(Element element)) => _filtered.map(f);
@@ -7177,8 +7167,8 @@ class FilteredElementList implements ElementList {
int get length() => _filtered.length;
Element operator [](int index) => _filtered[index];
Iterator<Element> iterator() => _filtered.iterator();
- List<Element> getRange(int start, int length) =>
- _filtered.getRange(start, length);
+ List<Element> getRange(int start, int rangeLength) =>
+ _filtered.getRange(start, rangeLength);
int indexOf(Element element, [int start = 0]) =>
_filtered.indexOf(element, start);
@@ -7580,20 +7570,20 @@ class _ChildrenElementList implements ElementList {
throw 'Not impl yet. todo(jacobr)';
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const NotImplementedException();
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw const NotImplementedException();
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const NotImplementedException();
}
- List getRange(int start, int length) =>
- new _FrozenElementList._wrap(_Lists.getRange(this, start, length,
+ List getRange(int start, int rangeLength) =>
+ new _FrozenElementList._wrap(_Lists.getRange(this, start, rangeLength,
<Element>[]));
int indexOf(Element element, [int start = 0]) {
@@ -7611,11 +7601,11 @@ class _ChildrenElementList implements ElementList {
}
Element removeLast() {
- final last = this.last();
- if (last != null) {
- _element.$dom_removeChild(last);
+ final result = this.last();
+ if (result != null) {
+ _element.$dom_removeChild(result);
}
- return last;
+ return result;
}
Element last() {
@@ -7708,20 +7698,20 @@ class _FrozenElementList implements ElementList {
throw const UnsupportedOperationException('');
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const UnsupportedOperationException('');
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw const UnsupportedOperationException('');
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const UnsupportedOperationException('');
}
- ElementList getRange(int start, int length) =>
- new _FrozenElementList._wrap(_nodeList.getRange(start, length));
+ ElementList getRange(int start, int rangeLength) =>
+ new _FrozenElementList._wrap(_nodeList.getRange(start, rangeLength));
int indexOf(Element element, [int start = 0]) =>
_nodeList.indexOf(element, start);
@@ -7770,8 +7760,8 @@ class _ElementList extends _ListWrapper<Element> implements ElementList {
ElementList filter(bool f(Element element)) =>
new _ElementList(super.filter(f));
- ElementList getRange(int start, int length) =>
- new _ElementList(super.getRange(start, length));
+ ElementList getRange(int start, int rangeLength) =>
+ new _ElementList(super.getRange(start, rangeLength));
}
class _ElementAttributeMap implements AttributeMap {
@@ -9376,10 +9366,22 @@ class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array, Li
num operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, num value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<num> mixins.
+ // num is the element type.
+
+ // From Iterable<num>:
+
+ Iterator<num> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<num>(this);
+ }
+
+ // From Collection<num>:
void add(num value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -9393,78 +9395,56 @@ class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array, Li
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(num a, num b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(num element)) => _Collections.map(this, [], f);
- int indexOf(num element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<num> filter(bool f(num element)) =>
+ _Collections.filter(this, <num>[], f);
- int lastIndexOf(num element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(num element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(num element)) => _Collections.some(this, f);
- num removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- num last() {
- return this[length - 1];
- }
+ // From List<num>:
- void forEach(void f(num element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(num a, num b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(num element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(num element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<num> filter(bool f(num element)) {
- return _Collections.filter(this, new List<num>(), f);
+ int lastIndexOf(num element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(num element)) {
- return _Collections.every(this, f);
- }
+ num last() => this[length - 1];
- bool some(bool f(num element)) {
- return _Collections.some(this, f);
+ num removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<num> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [num initialValue]) {
+ void insertRange(int start, int rangeLength, [num initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<num> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<num> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <num>[]);
- Iterator<num> iterator() {
- return new _FixedSizeListIterator<num>(this);
- }
+ // -- end List<num> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -9492,11 +9472,23 @@ class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li
num operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, num value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<num> mixins.
+ // num is the element type.
+
+ // From Iterable<num>:
+
+ Iterator<num> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<num>(this);
}
+ // From Collection<num>:
+
void add(num value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -9509,78 +9501,56 @@ class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(num a, num b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(num element)) => _Collections.map(this, [], f);
- int indexOf(num element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<num> filter(bool f(num element)) =>
+ _Collections.filter(this, <num>[], f);
- int lastIndexOf(num element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(num element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(num element)) => _Collections.some(this, f);
- num removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- num last() {
- return this[length - 1];
- }
+ // From List<num>:
- void forEach(void f(num element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(num a, num b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(num element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(num element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<num> filter(bool f(num element)) {
- return _Collections.filter(this, new List<num>(), f);
+ int lastIndexOf(num element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(num element)) {
- return _Collections.every(this, f);
- }
+ num last() => this[length - 1];
- bool some(bool f(num element)) {
- return _Collections.some(this, f);
+ num removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<num> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [num initialValue]) {
+ void insertRange(int start, int rangeLength, [num initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<num> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<num> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <num>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<num> iterator() {
- return new _FixedSizeListIterator<num>(this);
- }
+ // -- end List<num> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -9852,10 +9822,22 @@ class _HTMLCollectionImpl extends _DOMTypeBase implements HTMLCollection {
Node operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Node value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Node> mixins.
+ // Node is the element type.
+
+ // From Iterable<Node>:
+
+ Iterator<Node> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<Node>(this);
+ }
+
+ // From Collection<Node>:
void add(Node value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -9869,78 +9851,56 @@ class _HTMLCollectionImpl extends _DOMTypeBase implements HTMLCollection {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(Node a, Node b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
- int indexOf(Node element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<Node> filter(bool f(Node element)) =>
+ _Collections.filter(this, <Node>[], f);
- int lastIndexOf(Node element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(Node element)) => _Collections.some(this, f);
- Node removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- Node last() {
- return this[length - 1];
- }
+ // From List<Node>:
- void forEach(void f(Node element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(Node a, Node b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(Node element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<Node> filter(bool f(Node element)) {
- return _Collections.filter(this, new List<Node>(), f);
+ int lastIndexOf(Node element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(Node element)) {
- return _Collections.every(this, f);
- }
+ Node last() => this[length - 1];
- bool some(bool f(Node element)) {
- return _Collections.some(this, f);
+ Node removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Node> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
- Iterator<Node> iterator() {
- return new _FixedSizeListIterator<Node>(this);
- }
+ // -- end List<Node> mixins.
Node item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -10924,11 +10884,23 @@ class _Int16ArrayImpl extends _ArrayBufferViewImpl implements Int16Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -10941,78 +10913,56 @@ class _Int16ArrayImpl extends _ArrayBufferViewImpl implements Int16Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11040,10 +10990,22 @@ class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
+ }
+
+ // From Collection<int>:
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -11057,78 +11019,56 @@ class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11156,11 +11096,23 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -11173,78 +11125,56 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11831,10 +11761,22 @@ class _MediaListImpl extends _DOMTypeBase implements MediaList {
String operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, String value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<String> mixins.
+ // String is the element type.
+
+ // From Iterable<String>:
+
+ Iterator<String> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<String>(this);
+ }
+
+ // From Collection<String>:
void add(String value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -11848,78 +11790,56 @@ class _MediaListImpl extends _DOMTypeBase implements MediaList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(String a, String b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(String element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(String element)) => _Collections.map(this, [], f);
- int indexOf(String element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<String> filter(bool f(String element)) =>
+ _Collections.filter(this, <String>[], f);
- int lastIndexOf(String element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(String element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(String element)) => _Collections.some(this, f);
- String removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- String last() {
- return this[length - 1];
- }
+ // From List<String>:
- void forEach(void f(String element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(String a, String b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(String element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(String element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<String> filter(bool f(String element)) {
- return _Collections.filter(this, new List<String>(), f);
+ int lastIndexOf(String element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(String element)) {
- return _Collections.every(this, f);
- }
+ String last() => this[length - 1];
- bool some(bool f(String element)) {
- return _Collections.some(this, f);
+ String removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<String> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [String initialValue]) {
+ void insertRange(int start, int rangeLength, [String initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<String> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<String> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <String>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<String> iterator() {
- return new _FixedSizeListIterator<String>(this);
- }
+ // -- end List<String> mixins.
void appendMedium(String newMedium) {
_ptr.appendMedium(_unwrap(newMedium));
@@ -12299,10 +12219,22 @@ class _NamedNodeMapImpl extends _DOMTypeBase implements NamedNodeMap {
Node operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Node value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Node> mixins.
+ // Node is the element type.
+
+ // From Iterable<Node>:
+
+ Iterator<Node> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<Node>(this);
+ }
+
+ // From Collection<Node>:
void add(Node value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -12312,82 +12244,60 @@ class _NamedNodeMapImpl extends _DOMTypeBase implements NamedNodeMap {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void addAll(Collection<Node> collection) {
- throw new UnsupportedOperationException("Cannot add to immutable List.");
- }
+ void addAll(Collection<Node> collection) {
+ throw new UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
+
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
+
+ Collection<Node> filter(bool f(Node element)) =>
+ _Collections.filter(this, <Node>[], f);
+
+ bool every(bool f(Node element)) => _Collections.every(this, f);
+
+ bool some(bool f(Node element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<Node>:
void sort(int compare(Node a, Node b)) {
throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
-
- int indexOf(Node element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- int lastIndexOf(Node element, [int start = null]) {
+ int lastIndexOf(Node element, [int start]) {
if (start === null) start = length - 1;
return _Lists.lastIndexOf(this, element, start);
}
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ Node last() => this[length - 1];
Node removeLast() {
throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- Node last() {
- return this[length - 1];
- }
-
- void forEach(void f(Node element)) {
- _Collections.forEach(this, f);
- }
-
- Collection map(f(Node element)) {
- return _Collections.map(this, [], f);
- }
-
- Collection<Node> filter(bool f(Node element)) {
- return _Collections.filter(this, new List<Node>(), f);
- }
-
- bool every(bool f(Node element)) {
- return _Collections.every(this, f);
- }
-
- bool some(bool f(Node element)) {
- return _Collections.some(this, f);
- }
-
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Node> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
- Iterator<Node> iterator() {
- return new _FixedSizeListIterator<Node>(this);
- }
+ // -- end List<Node> mixins.
Node getNamedItem(String name) {
return _wrap(_ptr.getNamedItem(_unwrap(name)));
@@ -12515,11 +12425,11 @@ class _ChildNodeListLazy implements NodeList {
}
_NodeImpl removeLast() {
- final last = last();
- if (last != null) {
- _this.$dom_removeChild(last);
+ final result = last();
+ if (result != null) {
+ _this.$dom_removeChild(result);
}
- return last;
+ return result;
}
void clear() {
@@ -12561,21 +12471,21 @@ class _ChildNodeListLazy implements NodeList {
int lastIndexOf(Node element, [int start = 0]) =>
_Lists.lastIndexOf(this, element, start);
- // FIXME: implement thesee.
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException(
"Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException(
"Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException(
"Cannot insertRange on immutable List.");
}
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[]));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
// -- end List<Node> mixins.
@@ -12762,15 +12672,17 @@ class _ListWrapper<E> implements List<E> {
E last() => _list.last();
- List<E> getRange(int start, int length) => _list.getRange(start, length);
+ List<E> getRange(int start, int rangeLength) =>
+ _list.getRange(start, rangeLength);
- void setRange(int start, int length, List<E> from, [int startFrom = 0]) =>
- _list.setRange(start, length, from, startFrom);
+ void setRange(int start, int rangeLength, List<E> from, [int startFrom = 0])
+ => _list.setRange(start, rangeLength, from, startFrom);
- void removeRange(int start, int length) => _list.removeRange(start, length);
+ void removeRange(int start, int rangeLength) =>
+ _list.removeRange(start, rangeLength);
- void insertRange(int start, int length, [E initialValue = null]) =>
- _list.insertRange(start, length, initialValue);
+ void insertRange(int start, int rangeLength, [E initialValue = null]) =>
+ _list.insertRange(start, rangeLength, initialValue);
E get first() => _list[0];
}
@@ -12785,8 +12697,8 @@ class _NodeListWrapper extends _ListWrapper<Node> implements NodeList {
NodeList filter(bool f(Node element)) =>
new _NodeListWrapper(_list.filter(f));
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_list.getRange(start, length));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_list.getRange(start, rangeLength));
}
class _NodeListImpl extends _DOMTypeBase implements NodeList {
@@ -12821,11 +12733,11 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
}
_NodeImpl removeLast() {
- final last = this.last();
- if (last != null) {
- _parent.$dom_removeChild(last);
+ final result = this.last();
+ if (result != null) {
+ _parent.$dom_removeChild(result);
}
- return last;
+ return result;
}
void clear() {
@@ -12865,17 +12777,17 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
Node get first() => this[0];
// FIXME: implement thesee.
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[]));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
// -- end List<Node> mixins.
@@ -12885,7 +12797,6 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
Node operator[](int index) => _wrap(_ptr[index]);
-
}
class _NodeSelectorImpl extends _DOMTypeBase implements NodeSelector {
@@ -14408,15 +14319,15 @@ class _SVGElementImpl extends _ElementImpl implements SVGElement {
String get outerHTML() {
final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.add(clone);
+ final SVGElement cloned = this.clone(true);
+ container.elements.add(cloned);
return container.innerHTML;
}
String get innerHTML() {
final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.addAll(clone.elements);
+ final SVGElement cloned = this.clone(true);
+ container.elements.addAll(cloned.elements);
return container.innerHTML;
}
@@ -18583,10 +18494,22 @@ class _StyleSheetListImpl extends _DOMTypeBase implements StyleSheetList {
StyleSheet operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, StyleSheet value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<StyleSheet> mixins.
+ // StyleSheet is the element type.
+
+ // From Iterable<StyleSheet>:
+
+ Iterator<StyleSheet> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<StyleSheet>(this);
+ }
+
+ // From Collection<StyleSheet>:
void add(StyleSheet value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -18600,78 +18523,56 @@ class _StyleSheetListImpl extends _DOMTypeBase implements StyleSheetList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(StyleSheet a, StyleSheet b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(StyleSheet element)) => _Collections.map(this, [], f);
- int indexOf(StyleSheet element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<StyleSheet> filter(bool f(StyleSheet element)) =>
+ _Collections.filter(this, <StyleSheet>[], f);
- int lastIndexOf(StyleSheet element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(StyleSheet element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(StyleSheet element)) => _Collections.some(this, f);
- StyleSheet removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- StyleSheet last() {
- return this[length - 1];
- }
+ // From List<StyleSheet>:
- void forEach(void f(StyleSheet element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(StyleSheet a, StyleSheet b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(StyleSheet element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(StyleSheet element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<StyleSheet> filter(bool f(StyleSheet element)) {
- return _Collections.filter(this, new List<StyleSheet>(), f);
+ int lastIndexOf(StyleSheet element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(StyleSheet element)) {
- return _Collections.every(this, f);
- }
+ StyleSheet last() => this[length - 1];
- bool some(bool f(StyleSheet element)) {
- return _Collections.some(this, f);
+ StyleSheet removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<StyleSheet> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [StyleSheet initialValue]) {
+ void insertRange(int start, int rangeLength, [StyleSheet initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<StyleSheet> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<StyleSheet> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <StyleSheet>[]);
- Iterator<StyleSheet> iterator() {
- return new _FixedSizeListIterator<StyleSheet>(this);
- }
+ // -- end List<StyleSheet> mixins.
StyleSheet item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -19341,10 +19242,22 @@ class _TouchListImpl extends _DOMTypeBase implements TouchList {
Touch operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Touch value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Touch> mixins.
+ // Touch is the element type.
+
+ // From Iterable<Touch>:
+
+ Iterator<Touch> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<Touch>(this);
+ }
+
+ // From Collection<Touch>:
void add(Touch value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -19358,78 +19271,56 @@ class _TouchListImpl extends _DOMTypeBase implements TouchList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(Touch a, Touch b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(Touch element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(Touch element)) => _Collections.map(this, [], f);
- int indexOf(Touch element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<Touch> filter(bool f(Touch element)) =>
+ _Collections.filter(this, <Touch>[], f);
- int lastIndexOf(Touch element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(Touch element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(Touch element)) => _Collections.some(this, f);
- Touch removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- Touch last() {
- return this[length - 1];
- }
+ // From List<Touch>:
- void forEach(void f(Touch element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(Touch a, Touch b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(Touch element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(Touch element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<Touch> filter(bool f(Touch element)) {
- return _Collections.filter(this, new List<Touch>(), f);
+ int lastIndexOf(Touch element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(Touch element)) {
- return _Collections.every(this, f);
- }
+ Touch last() => this[length - 1];
- bool some(bool f(Touch element)) {
- return _Collections.some(this, f);
+ Touch removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<Touch> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Touch initialValue]) {
+ void insertRange(int start, int rangeLength, [Touch initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Touch> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Touch> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Touch>[]);
- Iterator<Touch> iterator() {
- return new _FixedSizeListIterator<Touch>(this);
- }
+ // -- end List<Touch> mixins.
Touch item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -19568,11 +19459,23 @@ class _Uint16ArrayImpl extends _ArrayBufferViewImpl implements Uint16Array, List
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19585,78 +19488,56 @@ class _Uint16ArrayImpl extends _ArrayBufferViewImpl implements Uint16Array, List
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -19684,11 +19565,23 @@ class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19701,78 +19594,56 @@ class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -19800,11 +19671,23 @@ class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new _FixedSizeListIterator<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19817,78 +19700,56 @@ class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -22339,10 +22200,13 @@ interface AbstractWorker extends EventTarget {
AbstractWorkerEvents get on();
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
@@ -25854,10 +25718,13 @@ interface DOMApplicationCache extends EventTarget {
void abort();
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
void swapCache();
@@ -26501,6 +26368,7 @@ interface Document extends HtmlElement {
String cookie;
+ /** @domName defaultView */
final Window window;
final Element documentElement;
@@ -26543,18 +26411,23 @@ interface Document extends HtmlElement {
DocumentFragment createDocumentFragment();
+ /** @domName createElement */
Element $dom_createElement(String tagName);
+ /** @domName createElementNS */
Element $dom_createElementNS(String namespaceURI, String qualifiedName);
+ /** @domName createEvent */
Event $dom_createEvent(String eventType);
Range createRange();
+ /** @domName createTextNode */
Text $dom_createTextNode(String data);
Touch createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce);
+ /** @domName createTouchList */
TouchList $dom_createTouchList();
Element elementFromPoint(int x, int y);
@@ -26563,12 +26436,16 @@ interface Document extends HtmlElement {
CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int width, int height);
+ /** @domName getElementById */
Element $dom_getElementById(String elementId);
+ /** @domName getElementsByClassName */
NodeList $dom_getElementsByClassName(String tagname);
+ /** @domName getElementsByName */
NodeList $dom_getElementsByName(String elementName);
+ /** @domName getElementsByTagName */
NodeList $dom_getElementsByTagName(String tagname);
bool queryCommandEnabled(String command);
@@ -26581,8 +26458,10 @@ interface Document extends HtmlElement {
String queryCommandValue(String command);
+ /** @domName querySelector */
Element query(String selectors);
+ /** @domName querySelectorAll */
NodeList $dom_querySelectorAll(String selectors);
void webkitCancelFullScreen();
@@ -26710,8 +26589,10 @@ interface DocumentFragment extends Element default _DocumentFragmentFactoryProvi
ElementEvents get on();
+ /** @domName querySelector */
Element query(String selectors);
+ /** @domName querySelectorAll */
NodeList $dom_querySelectorAll(String selectors);
}
@@ -26855,18 +26736,25 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
static final int ALLOW_KEYBOARD_INPUT = 1;
+ /** @domName childElementCount */
final int $dom_childElementCount;
+ /** @domName children */
final HTMLCollection $dom_children;
+ /** @domName className */
String $dom_className;
+ /** @domName clientHeight */
final int $dom_clientHeight;
+ /** @domName clientLeft */
final int $dom_clientLeft;
+ /** @domName clientTop */
final int $dom_clientTop;
+ /** @domName clientWidth */
final int $dom_clientWidth;
String contentEditable;
@@ -26875,6 +26763,7 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
bool draggable;
+ /** @domName firstElementChild */
final Element $dom_firstElementChild;
bool hidden;
@@ -26887,30 +26776,39 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
String lang;
+ /** @domName lastElementChild */
final Element $dom_lastElementChild;
final Element nextElementSibling;
+ /** @domName offsetHeight */
final int $dom_offsetHeight;
+ /** @domName offsetLeft */
final int $dom_offsetLeft;
final Element offsetParent;
+ /** @domName offsetTop */
final int $dom_offsetTop;
+ /** @domName offsetWidth */
final int $dom_offsetWidth;
final String outerHTML;
final Element previousElementSibling;
+ /** @domName scrollHeight */
final int $dom_scrollHeight;
+ /** @domName scrollLeft */
int $dom_scrollLeft;
+ /** @domName scrollTop */
int $dom_scrollTop;
+ /** @domName scrollWidth */
final int $dom_scrollWidth;
bool spellcheck;
@@ -26935,16 +26833,22 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
void focus();
+ /** @domName getAttribute */
String $dom_getAttribute(String name);
+ /** @domName getBoundingClientRect */
ClientRect $dom_getBoundingClientRect();
+ /** @domName getClientRects */
ClientRectList $dom_getClientRects();
+ /** @domName getElementsByClassName */
NodeList $dom_getElementsByClassName(String name);
+ /** @domName getElementsByTagName */
NodeList $dom_getElementsByTagName(String name);
+ /** @domName hasAttribute */
bool $dom_hasAttribute(String name);
Element insertAdjacentElement(String where, Element element);
@@ -26953,20 +26857,26 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
void insertAdjacentText(String where, String text);
+ /** @domName querySelector */
Element query(String selectors);
+ /** @domName querySelectorAll */
NodeList $dom_querySelectorAll(String selectors);
+ /** @domName removeAttribute */
void $dom_removeAttribute(String name);
void scrollByLines(int lines);
void scrollByPages(int pages);
+ /** @domName scrollIntoViewIfNeeded */
void scrollIntoView([bool centerIfNeeded]);
+ /** @domName setAttribute */
void $dom_setAttribute(String name, String value);
+ /** @domName webkitMatchesSelector */
bool matchesSelector(String selectors);
void webkitRequestFullScreen(int flags);
@@ -27344,6 +27254,7 @@ interface Event default _EventFactoryProvider {
final String type;
+ /** @domName initEvent */
void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg);
void preventDefault();
@@ -27396,12 +27307,15 @@ interface EventSource extends EventTarget default _EventSourceFactoryProvider {
final String url;
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
void close();
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
@@ -27435,10 +27349,13 @@ interface EventTarget {
final Events on;
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event event);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
@@ -29368,14 +29285,17 @@ interface MessagePort extends EventTarget {
MessagePortEvents get on();
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
void close();
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
void postMessage(String message, [List messagePorts]);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
void start();
@@ -29504,6 +29424,7 @@ interface MouseEvent extends UIEvent default _MouseEventFactoryProvider {
final int y;
+ /** @domName initMouseEvent */
void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -29680,28 +29601,40 @@ interface Node extends EventTarget {
static final int TEXT_NODE = 3;
+ /** @domName attributes */
final NamedNodeMap $dom_attributes;
+ /** @domName childNodes */
final NodeList $dom_childNodes;
+ /** @domName firstChild */
final Node $dom_firstChild;
+ /** @domName lastChild */
final Node $dom_lastChild;
+ /** @domName nextSibling */
final Node nextNode;
+ /** @domName nodeType */
final int $dom_nodeType;
+ /** @domName ownerDocument */
final Document document;
+ /** @domName parentNode */
final Node parent;
+ /** @domName previousSibling */
final Node previousNode;
+ /** @domName textContent */
String text;
+ /** @domName appendChild */
Node $dom_appendChild(Node newChild);
+ /** @domName cloneNode */
Node clone(bool deep);
bool contains(Node other);
@@ -29710,8 +29643,10 @@ interface Node extends EventTarget {
Node insertBefore(Node newChild, Node refChild);
+ /** @domName removeChild */
Node $dom_removeChild(Node oldChild);
+ /** @domName replaceChild */
Node $dom_replaceChild(Node newChild, Node oldChild);
}
@@ -29813,8 +29748,10 @@ interface NodeSelector {
// ElementList queryAll(String selectors);
+ /** @domName querySelector */
Element query(String selectors);
+ /** @domName querySelectorAll */
NodeList $dom_querySelectorAll(String selectors);
}
@@ -31105,6 +31042,7 @@ interface SVGDocument extends Document {
final SVGSVGElement rootElement;
+ /** @domName createEvent */
Event $dom_createEvent(String eventType);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -31154,10 +31092,13 @@ interface SVGElementInstance extends EventTarget {
final SVGElementInstance previousSibling;
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event event);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
@@ -33011,6 +32952,7 @@ interface SVGStringList {
interface SVGStylable {
+ /** @domName className */
final SVGAnimatedString $dom_svgClassName;
final CSSStyleDeclaration style;
@@ -33812,16 +33754,22 @@ interface SpeechRecognitionResultList {
interface Storage extends Map<String, String> {
+ /** @domName length */
final int $dom_length;
+ /** @domName clear */
void $dom_clear();
+ /** @domName getItem */
String $dom_getItem(String key);
+ /** @domName key */
String $dom_key(int index);
+ /** @domName removeItem */
void $dom_removeItem(String key);
+ /** @domName setItem */
void $dom_setItem(String key, String data);
}
@@ -35810,12 +35758,15 @@ interface WebSocket extends EventTarget default _WebSocketFactoryProvider {
final String url;
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
void close([int code, String reason]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
bool send(String data);
@@ -35995,6 +35946,7 @@ interface Window extends EventTarget {
final Window window;
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
void alert(String message);
@@ -36015,12 +35967,14 @@ interface Window extends EventTarget {
bool confirm(String message);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog);
void focus();
+ /** @domName getComputedStyle */
CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement);
CSSRuleList getMatchedCSSRules(Element element, String pseudoElement);
@@ -36045,6 +35999,7 @@ interface Window extends EventTarget {
void releaseEvents();
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
void resizeBy(num x, num y);
@@ -36403,8 +36358,10 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void abort();
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
String getAllResponseHeaders();
@@ -36415,6 +36372,7 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void overrideMimeType(String override);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
void send([var data]);
@@ -36480,10 +36438,13 @@ interface XMLHttpRequestUpload extends EventTarget {
XMLHttpRequestUploadEvents get on();
+ /** @domName addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
+ /** @domName dispatchEvent */
bool $dom_dispatchEvent(Event evt);
+ /** @domName removeEventListener */
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
« lib/html/dartium/html_dartium.dart ('K') | « lib/html/frog/html_frog.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698