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

Unified Diff: lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10952008: Take two of making FooList List<Foo>. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
===================================================================
--- lib/html/dart2js/html_dart2js.dart (revision 12507)
+++ lib/html/dart2js/html_dart2js.dart (working copy)
@@ -2316,7 +2316,7 @@
// WARNING: Do not edit - generated code.
/// @domName CSSRuleList
-interface CSSRuleList {
+interface CSSRuleList extends List<CSSRule> {
/** @domName CSSRuleList.length */
final int length;
@@ -2325,10 +2325,92 @@
CSSRule item(int index);
}
-class _CSSRuleListImpl implements CSSRuleList native "*CSSRuleList" {
+class _CSSRuleListImpl implements CSSRuleList, JavaScriptIndexingBehavior native "*CSSRuleList" {
final int length;
+ _CSSRuleImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _CSSRuleImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<CSSRule> mixins.
+ // CSSRule is the element type.
+
+ // From Iterable<CSSRule>:
+
+ Iterator<CSSRule> 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<CSSRule>(this);
+ }
+
+ // From Collection<CSSRule>:
+
+ void add(CSSRule value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(CSSRule value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<CSSRule> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(CSSRule element)) => _Collections.forEach(this, f);
+
+ Collection map(f(CSSRule element)) => _Collections.map(this, [], f);
+
+ Collection<CSSRule> filter(bool f(CSSRule element)) =>
+ _Collections.filter(this, <CSSRule>[], f);
+
+ bool every(bool f(CSSRule element)) => _Collections.every(this, f);
+
+ bool some(bool f(CSSRule element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<CSSRule>:
+
+ void sort(int compare(CSSRule a, CSSRule b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(CSSRule element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(CSSRule element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ CSSRule last() => this[length - 1];
+
+ CSSRule removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<CSSRule> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [CSSRule initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<CSSRule> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <CSSRule>[]);
+
+ // -- end List<CSSRule> mixins.
+
_CSSRuleImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7263,7 +7345,7 @@
// WARNING: Do not edit - generated code.
/// @domName CSSValueList
-interface CSSValueList extends CSSValue {
+interface CSSValueList extends CSSValue, List<CSSValue> {
/** @domName CSSValueList.length */
final int length;
@@ -7272,10 +7354,92 @@
CSSValue item(int index);
}
-class _CSSValueListImpl extends _CSSValueImpl implements CSSValueList native "*CSSValueList" {
+class _CSSValueListImpl extends _CSSValueImpl implements CSSValueList, JavaScriptIndexingBehavior native "*CSSValueList" {
final int length;
+ _CSSValueImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _CSSValueImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<CSSValue> mixins.
+ // CSSValue is the element type.
+
+ // From Iterable<CSSValue>:
+
+ Iterator<CSSValue> 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<CSSValue>(this);
+ }
+
+ // From Collection<CSSValue>:
+
+ void add(CSSValue value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(CSSValue value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<CSSValue> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(CSSValue element)) => _Collections.forEach(this, f);
+
+ Collection map(f(CSSValue element)) => _Collections.map(this, [], f);
+
+ Collection<CSSValue> filter(bool f(CSSValue element)) =>
+ _Collections.filter(this, <CSSValue>[], f);
+
+ bool every(bool f(CSSValue element)) => _Collections.every(this, f);
+
+ bool some(bool f(CSSValue element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<CSSValue>:
+
+ void sort(int compare(CSSValue a, CSSValue b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(CSSValue element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(CSSValue element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ CSSValue last() => this[length - 1];
+
+ CSSValue removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<CSSValue> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [CSSValue initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<CSSValue> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <CSSValue>[]);
+
+ // -- end List<CSSValue> mixins.
+
_CSSValueImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7858,7 +8022,7 @@
// WARNING: Do not edit - generated code.
/// @domName ClientRectList
-interface ClientRectList {
+interface ClientRectList extends List<ClientRect> {
/** @domName ClientRectList.length */
final int length;
@@ -7867,10 +8031,92 @@
ClientRect item(int index);
}
-class _ClientRectListImpl implements ClientRectList native "*ClientRectList" {
+class _ClientRectListImpl implements ClientRectList, JavaScriptIndexingBehavior native "*ClientRectList" {
final int length;
+ _ClientRectImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _ClientRectImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<ClientRect> mixins.
+ // ClientRect is the element type.
+
+ // From Iterable<ClientRect>:
+
+ Iterator<ClientRect> 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<ClientRect>(this);
+ }
+
+ // From Collection<ClientRect>:
+
+ void add(ClientRect value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(ClientRect value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<ClientRect> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(ClientRect element)) => _Collections.forEach(this, f);
+
+ Collection map(f(ClientRect element)) => _Collections.map(this, [], f);
+
+ Collection<ClientRect> filter(bool f(ClientRect element)) =>
+ _Collections.filter(this, <ClientRect>[], f);
+
+ bool every(bool f(ClientRect element)) => _Collections.every(this, f);
+
+ bool some(bool f(ClientRect element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<ClientRect>:
+
+ void sort(int compare(ClientRect a, ClientRect b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(ClientRect element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(ClientRect element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ ClientRect last() => this[length - 1];
+
+ ClientRect removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<ClientRect> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [ClientRect initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<ClientRect> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <ClientRect>[]);
+
+ // -- end List<ClientRect> mixins.
+
_ClientRectImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -8662,7 +8908,7 @@
// WARNING: Do not edit - generated code.
/// @domName DOMMimeTypeArray
-interface DOMMimeTypeArray {
+interface DOMMimeTypeArray extends List<DOMMimeType> {
/** @domName DOMMimeTypeArray.length */
final int length;
@@ -8674,10 +8920,92 @@
DOMMimeType namedItem(String name);
}
-class _DOMMimeTypeArrayImpl implements DOMMimeTypeArray native "*DOMMimeTypeArray" {
+class _DOMMimeTypeArrayImpl implements DOMMimeTypeArray, JavaScriptIndexingBehavior native "*DOMMimeTypeArray" {
final int length;
+ _DOMMimeTypeImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _DOMMimeTypeImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<DOMMimeType> mixins.
+ // DOMMimeType is the element type.
+
+ // From Iterable<DOMMimeType>:
+
+ Iterator<DOMMimeType> 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<DOMMimeType>(this);
+ }
+
+ // From Collection<DOMMimeType>:
+
+ void add(DOMMimeType value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(DOMMimeType value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<DOMMimeType> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(DOMMimeType element)) => _Collections.forEach(this, f);
+
+ Collection map(f(DOMMimeType element)) => _Collections.map(this, [], f);
+
+ Collection<DOMMimeType> filter(bool f(DOMMimeType element)) =>
+ _Collections.filter(this, <DOMMimeType>[], f);
+
+ bool every(bool f(DOMMimeType element)) => _Collections.every(this, f);
+
+ bool some(bool f(DOMMimeType element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<DOMMimeType>:
+
+ void sort(int compare(DOMMimeType a, DOMMimeType b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(DOMMimeType element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(DOMMimeType element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ DOMMimeType last() => this[length - 1];
+
+ DOMMimeType removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<DOMMimeType> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [DOMMimeType initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<DOMMimeType> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <DOMMimeType>[]);
+
+ // -- end List<DOMMimeType> mixins.
+
_DOMMimeTypeImpl item(int index) native;
_DOMMimeTypeImpl namedItem(String name) native;
@@ -8746,7 +9074,7 @@
// WARNING: Do not edit - generated code.
/// @domName DOMPluginArray
-interface DOMPluginArray {
+interface DOMPluginArray extends List<DOMPlugin> {
/** @domName DOMPluginArray.length */
final int length;
@@ -8761,10 +9089,92 @@
void refresh(bool reload);
}
-class _DOMPluginArrayImpl implements DOMPluginArray native "*DOMPluginArray" {
+class _DOMPluginArrayImpl implements DOMPluginArray, JavaScriptIndexingBehavior native "*DOMPluginArray" {
final int length;
+ _DOMPluginImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _DOMPluginImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<DOMPlugin> mixins.
+ // DOMPlugin is the element type.
+
+ // From Iterable<DOMPlugin>:
+
+ Iterator<DOMPlugin> 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<DOMPlugin>(this);
+ }
+
+ // From Collection<DOMPlugin>:
+
+ void add(DOMPlugin value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(DOMPlugin value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<DOMPlugin> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(DOMPlugin element)) => _Collections.forEach(this, f);
+
+ Collection map(f(DOMPlugin element)) => _Collections.map(this, [], f);
+
+ Collection<DOMPlugin> filter(bool f(DOMPlugin element)) =>
+ _Collections.filter(this, <DOMPlugin>[], f);
+
+ bool every(bool f(DOMPlugin element)) => _Collections.every(this, f);
+
+ bool some(bool f(DOMPlugin element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<DOMPlugin>:
+
+ void sort(int compare(DOMPlugin a, DOMPlugin b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(DOMPlugin element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(DOMPlugin element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ DOMPlugin last() => this[length - 1];
+
+ DOMPlugin removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<DOMPlugin> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [DOMPlugin initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<DOMPlugin> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <DOMPlugin>[]);
+
+ // -- end List<DOMPlugin> mixins.
+
_DOMPluginImpl item(int index) native;
_DOMPluginImpl namedItem(String name) native;
@@ -12398,7 +12808,7 @@
// WARNING: Do not edit - generated code.
/// @domName EntryArray
-interface EntryArray {
+interface EntryArray extends List<Entry> {
/** @domName EntryArray.length */
final int length;
@@ -12407,10 +12817,92 @@
Entry item(int index);
}
-class _EntryArrayImpl implements EntryArray native "*EntryArray" {
+class _EntryArrayImpl implements EntryArray, JavaScriptIndexingBehavior native "*EntryArray" {
final int length;
+ _EntryImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _EntryImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<Entry> mixins.
+ // Entry is the element type.
+
+ // From Iterable<Entry>:
+
+ Iterator<Entry> 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<Entry>(this);
+ }
+
+ // From Collection<Entry>:
+
+ void add(Entry value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(Entry value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<Entry> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(Entry element)) => _Collections.forEach(this, f);
+
+ Collection map(f(Entry element)) => _Collections.map(this, [], f);
+
+ Collection<Entry> filter(bool f(Entry element)) =>
+ _Collections.filter(this, <Entry>[], f);
+
+ bool every(bool f(Entry element)) => _Collections.every(this, f);
+
+ bool some(bool f(Entry element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<Entry>:
+
+ void sort(int compare(Entry a, Entry b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(Entry element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Entry element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ Entry last() => this[length - 1];
+
+ Entry removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Entry> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [Entry initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<Entry> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Entry>[]);
+
+ // -- end List<Entry> mixins.
+
_EntryImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -12420,7 +12912,7 @@
// WARNING: Do not edit - generated code.
/// @domName EntryArraySync
-interface EntryArraySync {
+interface EntryArraySync extends List<EntrySync> {
/** @domName EntryArraySync.length */
final int length;
@@ -12429,10 +12921,92 @@
EntrySync item(int index);
}
-class _EntryArraySyncImpl implements EntryArraySync native "*EntryArraySync" {
+class _EntryArraySyncImpl implements EntryArraySync, JavaScriptIndexingBehavior native "*EntryArraySync" {
final int length;
+ _EntrySyncImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _EntrySyncImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<EntrySync> mixins.
+ // EntrySync is the element type.
+
+ // From Iterable<EntrySync>:
+
+ Iterator<EntrySync> 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<EntrySync>(this);
+ }
+
+ // From Collection<EntrySync>:
+
+ void add(EntrySync value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(EntrySync value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<EntrySync> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(EntrySync element)) => _Collections.forEach(this, f);
+
+ Collection map(f(EntrySync element)) => _Collections.map(this, [], f);
+
+ Collection<EntrySync> filter(bool f(EntrySync element)) =>
+ _Collections.filter(this, <EntrySync>[], f);
+
+ bool every(bool f(EntrySync element)) => _Collections.every(this, f);
+
+ bool some(bool f(EntrySync element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<EntrySync>:
+
+ void sort(int compare(EntrySync a, EntrySync b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(EntrySync element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(EntrySync element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ EntrySync last() => this[length - 1];
+
+ EntrySync removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<EntrySync> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [EntrySync initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<EntrySync> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <EntrySync>[]);
+
+ // -- end List<EntrySync> mixins.
+
_EntrySyncImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14265,7 +14839,7 @@
// WARNING: Do not edit - generated code.
/// @domName GamepadList
-interface GamepadList {
+interface GamepadList extends List<Gamepad> {
/** @domName GamepadList.length */
final int length;
@@ -14274,10 +14848,92 @@
Gamepad item(int index);
}
-class _GamepadListImpl implements GamepadList native "*GamepadList" {
+class _GamepadListImpl implements GamepadList, JavaScriptIndexingBehavior native "*GamepadList" {
final int length;
+ _GamepadImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _GamepadImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<Gamepad> mixins.
+ // Gamepad is the element type.
+
+ // From Iterable<Gamepad>:
+
+ Iterator<Gamepad> 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<Gamepad>(this);
+ }
+
+ // From Collection<Gamepad>:
+
+ void add(Gamepad value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(Gamepad value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<Gamepad> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(Gamepad element)) => _Collections.forEach(this, f);
+
+ Collection map(f(Gamepad element)) => _Collections.map(this, [], f);
+
+ Collection<Gamepad> filter(bool f(Gamepad element)) =>
+ _Collections.filter(this, <Gamepad>[], f);
+
+ bool every(bool f(Gamepad element)) => _Collections.every(this, f);
+
+ bool some(bool f(Gamepad element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<Gamepad>:
+
+ void sort(int compare(Gamepad a, Gamepad b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(Gamepad element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Gamepad element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ Gamepad last() => this[length - 1];
+
+ Gamepad removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Gamepad> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [Gamepad initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<Gamepad> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Gamepad>[]);
+
+ // -- end List<Gamepad> mixins.
+
_GamepadImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14370,7 +15026,7 @@
// WARNING: Do not edit - generated code.
/// @domName HTMLAllCollection
-interface HTMLAllCollection {
+interface HTMLAllCollection extends List<Node> {
/** @domName HTMLAllCollection.length */
final int length;
@@ -14385,10 +15041,92 @@
NodeList tags(String name);
}
-class _HTMLAllCollectionImpl implements HTMLAllCollection native "*HTMLAllCollection" {
+class _HTMLAllCollectionImpl implements HTMLAllCollection, JavaScriptIndexingBehavior native "*HTMLAllCollection" {
final int length;
+ _NodeImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _NodeImpl 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 const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(Node value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<Node> collection) {
+ throw const 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 const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Node element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ Node last() => this[length - 1];
+
+ Node removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
+
+ // -- end List<Node> mixins.
+
_NodeImpl item(int index) native;
_NodeImpl namedItem(String name) native;
@@ -14511,7 +15249,7 @@
// WARNING: Do not edit - generated code.
/// @domName HTMLOptionsCollection
-interface HTMLOptionsCollection extends HTMLCollection {
+interface HTMLOptionsCollection extends HTMLCollection, List<Node> {
/** @domName HTMLOptionsCollection.length */
int length;
@@ -14523,7 +15261,7 @@
void remove(int index);
}
-class _HTMLOptionsCollectionImpl extends _HTMLCollectionImpl implements HTMLOptionsCollection native "*HTMLOptionsCollection" {
+class _HTMLOptionsCollectionImpl extends _HTMLCollectionImpl implements HTMLOptionsCollection, JavaScriptIndexingBehavior native "*HTMLOptionsCollection" {
// Shadowing definition.
int get length() native "return this.length;";
@@ -14532,6 +15270,86 @@
int selectedIndex;
+ _NodeImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _NodeImpl value) native "this[index] = value";
+ // -- 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 const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(Node value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<Node> collection) {
+ throw const 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 const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Node element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ Node last() => this[length - 1];
+
+ Node removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
+
+ // -- end List<Node> mixins.
+
void remove(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18614,7 +19432,7 @@
// WARNING: Do not edit - generated code.
/// @domName MediaStreamList
-interface MediaStreamList {
+interface MediaStreamList extends List<MediaStream> {
/** @domName MediaStreamList.length */
final int length;
@@ -18623,10 +19441,92 @@
MediaStream item(int index);
}
-class _MediaStreamListImpl implements MediaStreamList native "*MediaStreamList" {
+class _MediaStreamListImpl implements MediaStreamList, JavaScriptIndexingBehavior native "*MediaStreamList" {
final int length;
+ _MediaStreamImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _MediaStreamImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<MediaStream> mixins.
+ // MediaStream is the element type.
+
+ // From Iterable<MediaStream>:
+
+ Iterator<MediaStream> 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<MediaStream>(this);
+ }
+
+ // From Collection<MediaStream>:
+
+ void add(MediaStream value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(MediaStream value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<MediaStream> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(MediaStream element)) => _Collections.forEach(this, f);
+
+ Collection map(f(MediaStream element)) => _Collections.map(this, [], f);
+
+ Collection<MediaStream> filter(bool f(MediaStream element)) =>
+ _Collections.filter(this, <MediaStream>[], f);
+
+ bool every(bool f(MediaStream element)) => _Collections.every(this, f);
+
+ bool some(bool f(MediaStream element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<MediaStream>:
+
+ void sort(int compare(MediaStream a, MediaStream b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(MediaStream element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(MediaStream element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ MediaStream last() => this[length - 1];
+
+ MediaStream removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<MediaStream> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [MediaStream initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<MediaStream> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <MediaStream>[]);
+
+ // -- end List<MediaStream> mixins.
+
_MediaStreamImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22142,15 +23042,97 @@
// WARNING: Do not edit - generated code.
/// @domName RadioNodeList
-interface RadioNodeList extends NodeList {
+interface RadioNodeList extends NodeList, List<Node> {
/** @domName RadioNodeList.value */
String value;
}
-class _RadioNodeListImpl extends _NodeListImpl implements RadioNodeList native "*RadioNodeList" {
+class _RadioNodeListImpl extends _NodeListImpl implements RadioNodeList, JavaScriptIndexingBehavior native "*RadioNodeList" {
String value;
+
+ _NodeImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _NodeImpl 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 const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(Node value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<Node> collection) {
+ throw const 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 const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Node element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ Node last() => this[length - 1];
+
+ Node removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
+
+ // -- end List<Node> mixins.
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -23056,7 +24038,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGAnimatedLengthList
-interface SVGAnimatedLengthList {
+interface SVGAnimatedLengthList extends List<SVGAnimatedLength> {
/** @domName SVGAnimatedLengthList.animVal */
final SVGLengthList animVal;
@@ -23065,11 +24047,93 @@
final SVGLengthList baseVal;
}
-class _SVGAnimatedLengthListImpl implements SVGAnimatedLengthList native "*SVGAnimatedLengthList" {
+class _SVGAnimatedLengthListImpl implements SVGAnimatedLengthList, JavaScriptIndexingBehavior native "*SVGAnimatedLengthList" {
final _SVGLengthListImpl animVal;
final _SVGLengthListImpl baseVal;
+
+ _SVGAnimatedLengthImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGAnimatedLengthImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGAnimatedLength> mixins.
+ // SVGAnimatedLength is the element type.
+
+ // From Iterable<SVGAnimatedLength>:
+
+ Iterator<SVGAnimatedLength> 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<SVGAnimatedLength>(this);
+ }
+
+ // From Collection<SVGAnimatedLength>:
+
+ void add(SVGAnimatedLength value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGAnimatedLength value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGAnimatedLength> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f);
+
+ Collection<SVGAnimatedLength> filter(bool f(SVGAnimatedLength element)) =>
+ _Collections.filter(this, <SVGAnimatedLength>[], f);
+
+ bool every(bool f(SVGAnimatedLength element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGAnimatedLength element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGAnimatedLength>:
+
+ void sort(int compare(SVGAnimatedLength a, SVGAnimatedLength b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGAnimatedLength element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGAnimatedLength element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGAnimatedLength last() => this[length - 1];
+
+ SVGAnimatedLength removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGAnimatedLength initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGAnimatedLength> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGAnimatedLength>[]);
+
+ // -- end List<SVGAnimatedLength> mixins.
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -23100,7 +24164,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGAnimatedNumberList
-interface SVGAnimatedNumberList {
+interface SVGAnimatedNumberList extends List<SVGAnimatedNumber> {
/** @domName SVGAnimatedNumberList.animVal */
final SVGNumberList animVal;
@@ -23109,11 +24173,93 @@
final SVGNumberList baseVal;
}
-class _SVGAnimatedNumberListImpl implements SVGAnimatedNumberList native "*SVGAnimatedNumberList" {
+class _SVGAnimatedNumberListImpl implements SVGAnimatedNumberList, JavaScriptIndexingBehavior native "*SVGAnimatedNumberList" {
final _SVGNumberListImpl animVal;
final _SVGNumberListImpl baseVal;
+
+ _SVGAnimatedNumberImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGAnimatedNumberImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGAnimatedNumber> mixins.
+ // SVGAnimatedNumber is the element type.
+
+ // From Iterable<SVGAnimatedNumber>:
+
+ Iterator<SVGAnimatedNumber> 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<SVGAnimatedNumber>(this);
+ }
+
+ // From Collection<SVGAnimatedNumber>:
+
+ void add(SVGAnimatedNumber value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGAnimatedNumber value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGAnimatedNumber> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f);
+
+ Collection<SVGAnimatedNumber> filter(bool f(SVGAnimatedNumber element)) =>
+ _Collections.filter(this, <SVGAnimatedNumber>[], f);
+
+ bool every(bool f(SVGAnimatedNumber element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGAnimatedNumber element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGAnimatedNumber>:
+
+ void sort(int compare(SVGAnimatedNumber a, SVGAnimatedNumber b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGAnimatedNumber element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGAnimatedNumber element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGAnimatedNumber last() => this[length - 1];
+
+ SVGAnimatedNumber removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGAnimatedNumber initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGAnimatedNumber> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGAnimatedNumber>[]);
+
+ // -- end List<SVGAnimatedNumber> mixins.
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -23188,7 +24334,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGAnimatedTransformList
-interface SVGAnimatedTransformList {
+interface SVGAnimatedTransformList extends List<SVGAnimateTransformElement> {
/** @domName SVGAnimatedTransformList.animVal */
final SVGTransformList animVal;
@@ -23197,11 +24343,93 @@
final SVGTransformList baseVal;
}
-class _SVGAnimatedTransformListImpl implements SVGAnimatedTransformList native "*SVGAnimatedTransformList" {
+class _SVGAnimatedTransformListImpl implements SVGAnimatedTransformList, JavaScriptIndexingBehavior native "*SVGAnimatedTransformList" {
final _SVGTransformListImpl animVal;
final _SVGTransformListImpl baseVal;
+
+ _SVGAnimateTransformElementImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGAnimateTransformElementImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGAnimateTransformElement> mixins.
+ // SVGAnimateTransformElement is the element type.
+
+ // From Iterable<SVGAnimateTransformElement>:
+
+ Iterator<SVGAnimateTransformElement> 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<SVGAnimateTransformElement>(this);
+ }
+
+ // From Collection<SVGAnimateTransformElement>:
+
+ void add(SVGAnimateTransformElement value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGAnimateTransformElement value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGAnimateTransformElement> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f);
+
+ Collection<SVGAnimateTransformElement> filter(bool f(SVGAnimateTransformElement element)) =>
+ _Collections.filter(this, <SVGAnimateTransformElement>[], f);
+
+ bool every(bool f(SVGAnimateTransformElement element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGAnimateTransformElement element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGAnimateTransformElement>:
+
+ void sort(int compare(SVGAnimateTransformElement a, SVGAnimateTransformElement b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGAnimateTransformElement element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGAnimateTransformElement element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGAnimateTransformElement last() => this[length - 1];
+
+ SVGAnimateTransformElement removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGAnimateTransformElement initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGAnimateTransformElement> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGAnimateTransformElement>[]);
+
+ // -- end List<SVGAnimateTransformElement> mixins.
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -23994,7 +25222,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGElementInstanceList
-interface SVGElementInstanceList {
+interface SVGElementInstanceList extends List<SVGElementInstance> {
/** @domName SVGElementInstanceList.length */
final int length;
@@ -24003,10 +25231,92 @@
SVGElementInstance item(int index);
}
-class _SVGElementInstanceListImpl implements SVGElementInstanceList native "*SVGElementInstanceList" {
+class _SVGElementInstanceListImpl implements SVGElementInstanceList, JavaScriptIndexingBehavior native "*SVGElementInstanceList" {
final int length;
+ _SVGElementInstanceImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGElementInstanceImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGElementInstance> mixins.
+ // SVGElementInstance is the element type.
+
+ // From Iterable<SVGElementInstance>:
+
+ Iterator<SVGElementInstance> 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<SVGElementInstance>(this);
+ }
+
+ // From Collection<SVGElementInstance>:
+
+ void add(SVGElementInstance value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGElementInstance value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGElementInstance> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f);
+
+ Collection<SVGElementInstance> filter(bool f(SVGElementInstance element)) =>
+ _Collections.filter(this, <SVGElementInstance>[], f);
+
+ bool every(bool f(SVGElementInstance element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGElementInstance element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGElementInstance>:
+
+ void sort(int compare(SVGElementInstance a, SVGElementInstance b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGElementInstance element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGElementInstance element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGElementInstance last() => this[length - 1];
+
+ SVGElementInstance removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGElementInstance initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGElementInstance> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
+
+ // -- end List<SVGElementInstance> mixins.
+
_SVGElementInstanceImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -26023,7 +27333,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGLengthList
-interface SVGLengthList {
+interface SVGLengthList extends List<SVGLength> {
/** @domName SVGLengthList.numberOfItems */
final int numberOfItems;
@@ -26050,10 +27360,92 @@
SVGLength replaceItem(SVGLength item, int index);
}
-class _SVGLengthListImpl implements SVGLengthList native "*SVGLengthList" {
+class _SVGLengthListImpl implements SVGLengthList, JavaScriptIndexingBehavior native "*SVGLengthList" {
final int numberOfItems;
+ _SVGLengthImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGLengthImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGLength> mixins.
+ // SVGLength is the element type.
+
+ // From Iterable<SVGLength>:
+
+ Iterator<SVGLength> 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<SVGLength>(this);
+ }
+
+ // From Collection<SVGLength>:
+
+ void add(SVGLength value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGLength value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGLength> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGLength element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGLength element)) => _Collections.map(this, [], f);
+
+ Collection<SVGLength> filter(bool f(SVGLength element)) =>
+ _Collections.filter(this, <SVGLength>[], f);
+
+ bool every(bool f(SVGLength element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGLength element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGLength>:
+
+ void sort(int compare(SVGLength a, SVGLength b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGLength element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGLength element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGLength last() => this[length - 1];
+
+ SVGLength removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGLength initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGLength> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGLength>[]);
+
+ // -- end List<SVGLength> mixins.
+
_SVGLengthImpl appendItem(_SVGLengthImpl item) native;
void clear() native;
@@ -26548,7 +27940,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGNumberList
-interface SVGNumberList {
+interface SVGNumberList extends List<SVGNumber> {
/** @domName SVGNumberList.numberOfItems */
final int numberOfItems;
@@ -26575,10 +27967,92 @@
SVGNumber replaceItem(SVGNumber item, int index);
}
-class _SVGNumberListImpl implements SVGNumberList native "*SVGNumberList" {
+class _SVGNumberListImpl implements SVGNumberList, JavaScriptIndexingBehavior native "*SVGNumberList" {
final int numberOfItems;
+ _SVGNumberImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGNumberImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGNumber> mixins.
+ // SVGNumber is the element type.
+
+ // From Iterable<SVGNumber>:
+
+ Iterator<SVGNumber> 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<SVGNumber>(this);
+ }
+
+ // From Collection<SVGNumber>:
+
+ void add(SVGNumber value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGNumber value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGNumber> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGNumber element)) => _Collections.map(this, [], f);
+
+ Collection<SVGNumber> filter(bool f(SVGNumber element)) =>
+ _Collections.filter(this, <SVGNumber>[], f);
+
+ bool every(bool f(SVGNumber element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGNumber element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGNumber>:
+
+ void sort(int compare(SVGNumber a, SVGNumber b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGNumber element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGNumber element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGNumber last() => this[length - 1];
+
+ SVGNumber removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGNumber initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGNumber> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGNumber>[]);
+
+ // -- end List<SVGNumber> mixins.
+
_SVGNumberImpl appendItem(_SVGNumberImpl item) native;
void clear() native;
@@ -27442,7 +28916,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGPathSegList
-interface SVGPathSegList {
+interface SVGPathSegList extends List<SVGPathSeg> {
/** @domName SVGPathSegList.numberOfItems */
final int numberOfItems;
@@ -27469,10 +28943,92 @@
SVGPathSeg replaceItem(SVGPathSeg newItem, int index);
}
-class _SVGPathSegListImpl implements SVGPathSegList native "*SVGPathSegList" {
+class _SVGPathSegListImpl implements SVGPathSegList, JavaScriptIndexingBehavior native "*SVGPathSegList" {
final int numberOfItems;
+ _SVGPathSegImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGPathSegImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGPathSeg> mixins.
+ // SVGPathSeg is the element type.
+
+ // From Iterable<SVGPathSeg>:
+
+ Iterator<SVGPathSeg> 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<SVGPathSeg>(this);
+ }
+
+ // From Collection<SVGPathSeg>:
+
+ void add(SVGPathSeg value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGPathSeg value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGPathSeg> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f);
+
+ Collection<SVGPathSeg> filter(bool f(SVGPathSeg element)) =>
+ _Collections.filter(this, <SVGPathSeg>[], f);
+
+ bool every(bool f(SVGPathSeg element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGPathSeg element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGPathSeg>:
+
+ void sort(int compare(SVGPathSeg a, SVGPathSeg b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGPathSeg element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGPathSeg element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGPathSeg last() => this[length - 1];
+
+ SVGPathSeg removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGPathSeg initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGPathSeg> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGPathSeg>[]);
+
+ // -- end List<SVGPathSeg> mixins.
+
_SVGPathSegImpl appendItem(_SVGPathSegImpl newItem) native;
void clear() native;
@@ -28433,7 +29989,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGStringList
-interface SVGStringList {
+interface SVGStringList extends List<String> {
/** @domName SVGStringList.numberOfItems */
final int numberOfItems;
@@ -28460,10 +30016,92 @@
String replaceItem(String item, int index);
}
-class _SVGStringListImpl implements SVGStringList native "*SVGStringList" {
+class _SVGStringListImpl implements SVGStringList, JavaScriptIndexingBehavior native "*SVGStringList" {
final int numberOfItems;
+ String operator[](int index) native "return this[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 const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(String value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<String> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(String element)) => _Collections.forEach(this, f);
+
+ Collection map(f(String element)) => _Collections.map(this, [], f);
+
+ Collection<String> filter(bool f(String element)) =>
+ _Collections.filter(this, <String>[], f);
+
+ bool every(bool f(String element)) => _Collections.every(this, f);
+
+ bool some(bool f(String element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<String>:
+
+ void sort(int compare(String a, String b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(String element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(String element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ String last() => this[length - 1];
+
+ String removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [String initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<String> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <String>[]);
+
+ // -- end List<String> mixins.
+
String appendItem(String item) native;
void clear() native;
@@ -29031,7 +30669,7 @@
// WARNING: Do not edit - generated code.
/// @domName SVGTransformList
-interface SVGTransformList {
+interface SVGTransformList extends List<SVGTransform> {
/** @domName SVGTransformList.numberOfItems */
final int numberOfItems;
@@ -29064,10 +30702,92 @@
SVGTransform replaceItem(SVGTransform item, int index);
}
-class _SVGTransformListImpl implements SVGTransformList native "*SVGTransformList" {
+class _SVGTransformListImpl implements SVGTransformList, JavaScriptIndexingBehavior native "*SVGTransformList" {
final int numberOfItems;
+ _SVGTransformImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SVGTransformImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SVGTransform> mixins.
+ // SVGTransform is the element type.
+
+ // From Iterable<SVGTransform>:
+
+ Iterator<SVGTransform> 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<SVGTransform>(this);
+ }
+
+ // From Collection<SVGTransform>:
+
+ void add(SVGTransform value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SVGTransform value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SVGTransform> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SVGTransform element)) => _Collections.map(this, [], f);
+
+ Collection<SVGTransform> filter(bool f(SVGTransform element)) =>
+ _Collections.filter(this, <SVGTransform>[], f);
+
+ bool every(bool f(SVGTransform element)) => _Collections.every(this, f);
+
+ bool some(bool f(SVGTransform element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SVGTransform>:
+
+ void sort(int compare(SVGTransform a, SVGTransform b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SVGTransform element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SVGTransform element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SVGTransform last() => this[length - 1];
+
+ SVGTransform removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SVGTransform initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SVGTransform> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SVGTransform>[]);
+
+ // -- end List<SVGTransform> mixins.
+
_SVGTransformImpl appendItem(_SVGTransformImpl item) native;
void clear() native;
@@ -29885,7 +31605,7 @@
// WARNING: Do not edit - generated code.
/// @domName SourceBufferList
-interface SourceBufferList extends EventTarget {
+interface SourceBufferList extends List<SourceBuffer>, EventTarget {
/** @domName SourceBufferList.length */
final int length;
@@ -29903,10 +31623,92 @@
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
}
-class _SourceBufferListImpl extends _EventTargetImpl implements SourceBufferList native "*SourceBufferList" {
+class _SourceBufferListImpl implements SourceBufferList, JavaScriptIndexingBehavior native "*SourceBufferList" {
final int length;
+ _SourceBufferImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SourceBufferImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SourceBuffer> mixins.
+ // SourceBuffer is the element type.
+
+ // From Iterable<SourceBuffer>:
+
+ Iterator<SourceBuffer> 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<SourceBuffer>(this);
+ }
+
+ // From Collection<SourceBuffer>:
+
+ void add(SourceBuffer value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SourceBuffer value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SourceBuffer> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SourceBuffer element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SourceBuffer element)) => _Collections.map(this, [], f);
+
+ Collection<SourceBuffer> filter(bool f(SourceBuffer element)) =>
+ _Collections.filter(this, <SourceBuffer>[], f);
+
+ bool every(bool f(SourceBuffer element)) => _Collections.every(this, f);
+
+ bool some(bool f(SourceBuffer element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SourceBuffer>:
+
+ void sort(int compare(SourceBuffer a, SourceBuffer b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SourceBuffer element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SourceBuffer element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SourceBuffer last() => this[length - 1];
+
+ SourceBuffer removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SourceBuffer> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SourceBuffer initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SourceBuffer> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SourceBuffer>[]);
+
+ // -- end List<SourceBuffer> mixins.
+
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "addEventListener";
bool $dom_dispatchEvent(_EventImpl event) native "dispatchEvent";
@@ -29989,7 +31791,7 @@
// WARNING: Do not edit - generated code.
/// @domName SpeechGrammarList
-interface SpeechGrammarList default _SpeechGrammarListFactoryProvider {
+interface SpeechGrammarList extends List<SpeechGrammar> default _SpeechGrammarListFactoryProvider {
SpeechGrammarList();
@@ -30006,10 +31808,92 @@
SpeechGrammar item(int index);
}
-class _SpeechGrammarListImpl implements SpeechGrammarList native "*SpeechGrammarList" {
+class _SpeechGrammarListImpl implements SpeechGrammarList, JavaScriptIndexingBehavior native "*SpeechGrammarList" {
final int length;
+ _SpeechGrammarImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SpeechGrammarImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SpeechGrammar> mixins.
+ // SpeechGrammar is the element type.
+
+ // From Iterable<SpeechGrammar>:
+
+ Iterator<SpeechGrammar> 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<SpeechGrammar>(this);
+ }
+
+ // From Collection<SpeechGrammar>:
+
+ void add(SpeechGrammar value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SpeechGrammar value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SpeechGrammar> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SpeechGrammar element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SpeechGrammar element)) => _Collections.map(this, [], f);
+
+ Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) =>
+ _Collections.filter(this, <SpeechGrammar>[], f);
+
+ bool every(bool f(SpeechGrammar element)) => _Collections.every(this, f);
+
+ bool some(bool f(SpeechGrammar element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SpeechGrammar>:
+
+ void sort(int compare(SpeechGrammar a, SpeechGrammar b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SpeechGrammar element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SpeechGrammar element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SpeechGrammar last() => this[length - 1];
+
+ SpeechGrammar removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SpeechGrammar> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SpeechGrammar initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SpeechGrammar> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SpeechGrammar>[]);
+
+ // -- end List<SpeechGrammar> mixins.
+
void addFromString(String string, [num weight]) native;
void addFromUri(String src, [num weight]) native;
@@ -30062,7 +31946,7 @@
// WARNING: Do not edit - generated code.
/// @domName SpeechInputResultList
-interface SpeechInputResultList {
+interface SpeechInputResultList extends List<SpeechInputResult> {
/** @domName SpeechInputResultList.length */
final int length;
@@ -30071,10 +31955,92 @@
SpeechInputResult item(int index);
}
-class _SpeechInputResultListImpl implements SpeechInputResultList native "*SpeechInputResultList" {
+class _SpeechInputResultListImpl implements SpeechInputResultList, JavaScriptIndexingBehavior native "*SpeechInputResultList" {
final int length;
+ _SpeechInputResultImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SpeechInputResultImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SpeechInputResult> mixins.
+ // SpeechInputResult is the element type.
+
+ // From Iterable<SpeechInputResult>:
+
+ Iterator<SpeechInputResult> 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<SpeechInputResult>(this);
+ }
+
+ // From Collection<SpeechInputResult>:
+
+ void add(SpeechInputResult value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SpeechInputResult value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SpeechInputResult> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SpeechInputResult element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SpeechInputResult element)) => _Collections.map(this, [], f);
+
+ Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) =>
+ _Collections.filter(this, <SpeechInputResult>[], f);
+
+ bool every(bool f(SpeechInputResult element)) => _Collections.every(this, f);
+
+ bool some(bool f(SpeechInputResult element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SpeechInputResult>:
+
+ void sort(int compare(SpeechInputResult a, SpeechInputResult b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SpeechInputResult element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SpeechInputResult element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SpeechInputResult last() => this[length - 1];
+
+ SpeechInputResult removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SpeechInputResult> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SpeechInputResult initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SpeechInputResult> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SpeechInputResult>[]);
+
+ // -- end List<SpeechInputResult> mixins.
+
_SpeechInputResultImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -30350,7 +32316,7 @@
// WARNING: Do not edit - generated code.
/// @domName SpeechRecognitionResultList
-interface SpeechRecognitionResultList {
+interface SpeechRecognitionResultList extends List<SpeechRecognitionResult> {
/** @domName SpeechRecognitionResultList.length */
final int length;
@@ -30359,10 +32325,92 @@
SpeechRecognitionResult item(int index);
}
-class _SpeechRecognitionResultListImpl implements SpeechRecognitionResultList native "*SpeechRecognitionResultList" {
+class _SpeechRecognitionResultListImpl implements SpeechRecognitionResultList, JavaScriptIndexingBehavior native "*SpeechRecognitionResultList" {
final int length;
+ _SpeechRecognitionResultImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _SpeechRecognitionResultImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<SpeechRecognitionResult> mixins.
+ // SpeechRecognitionResult is the element type.
+
+ // From Iterable<SpeechRecognitionResult>:
+
+ Iterator<SpeechRecognitionResult> 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<SpeechRecognitionResult>(this);
+ }
+
+ // From Collection<SpeechRecognitionResult>:
+
+ void add(SpeechRecognitionResult value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(SpeechRecognitionResult value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<SpeechRecognitionResult> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(SpeechRecognitionResult element)) => _Collections.forEach(this, f);
+
+ Collection map(f(SpeechRecognitionResult element)) => _Collections.map(this, [], f);
+
+ Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult element)) =>
+ _Collections.filter(this, <SpeechRecognitionResult>[], f);
+
+ bool every(bool f(SpeechRecognitionResult element)) => _Collections.every(this, f);
+
+ bool some(bool f(SpeechRecognitionResult element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<SpeechRecognitionResult>:
+
+ void sort(int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(SpeechRecognitionResult element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(SpeechRecognitionResult element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ SpeechRecognitionResult last() => this[length - 1];
+
+ SpeechRecognitionResult removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<SpeechRecognitionResult> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [SpeechRecognitionResult initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<SpeechRecognitionResult> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <SpeechRecognitionResult>[]);
+
+ // -- end List<SpeechRecognitionResult> mixins.
+
_SpeechRecognitionResultImpl item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -31549,7 +33597,7 @@
// WARNING: Do not edit - generated code.
/// @domName TextTrackCueList
-interface TextTrackCueList {
+interface TextTrackCueList extends List<TextTrackCue> {
/** @domName TextTrackCueList.length */
final int length;
@@ -31561,10 +33609,92 @@
TextTrackCue item(int index);
}
-class _TextTrackCueListImpl implements TextTrackCueList native "*TextTrackCueList" {
+class _TextTrackCueListImpl implements TextTrackCueList, JavaScriptIndexingBehavior native "*TextTrackCueList" {
final int length;
+ _TextTrackCueImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _TextTrackCueImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<TextTrackCue> mixins.
+ // TextTrackCue is the element type.
+
+ // From Iterable<TextTrackCue>:
+
+ Iterator<TextTrackCue> 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<TextTrackCue>(this);
+ }
+
+ // From Collection<TextTrackCue>:
+
+ void add(TextTrackCue value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(TextTrackCue value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<TextTrackCue> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(TextTrackCue element)) => _Collections.forEach(this, f);
+
+ Collection map(f(TextTrackCue element)) => _Collections.map(this, [], f);
+
+ Collection<TextTrackCue> filter(bool f(TextTrackCue element)) =>
+ _Collections.filter(this, <TextTrackCue>[], f);
+
+ bool every(bool f(TextTrackCue element)) => _Collections.every(this, f);
+
+ bool some(bool f(TextTrackCue element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<TextTrackCue>:
+
+ void sort(int compare(TextTrackCue a, TextTrackCue b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(TextTrackCue element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(TextTrackCue element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ TextTrackCue last() => this[length - 1];
+
+ TextTrackCue removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<TextTrackCue> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [TextTrackCue initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<TextTrackCue> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <TextTrackCue>[]);
+
+ // -- end List<TextTrackCue> mixins.
+
_TextTrackCueImpl getCueById(String id) native;
_TextTrackCueImpl item(int index) native;
@@ -31610,7 +33740,7 @@
// WARNING: Do not edit - generated code.
/// @domName TextTrackList
-interface TextTrackList extends EventTarget {
+interface TextTrackList extends List<TextTrack>, EventTarget {
/**
* @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
@@ -31638,13 +33768,95 @@
EventListenerList get addTrack;
}
-class _TextTrackListImpl extends _EventTargetImpl implements TextTrackList native "*TextTrackList" {
+class _TextTrackListImpl implements TextTrackList, JavaScriptIndexingBehavior native "*TextTrackList" {
_TextTrackListEventsImpl get on =>
new _TextTrackListEventsImpl(this);
final int length;
+ _TextTrackImpl operator[](int index) native "return this[index];";
+
+ void operator[]=(int index, _TextTrackImpl value) {
+ throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ }
+ // -- start List<TextTrack> mixins.
+ // TextTrack is the element type.
+
+ // From Iterable<TextTrack>:
+
+ Iterator<TextTrack> 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<TextTrack>(this);
+ }
+
+ // From Collection<TextTrack>:
+
+ void add(TextTrack value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addLast(TextTrack value) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<TextTrack> collection) {
+ throw const UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(TextTrack element)) => _Collections.forEach(this, f);
+
+ Collection map(f(TextTrack element)) => _Collections.map(this, [], f);
+
+ Collection<TextTrack> filter(bool f(TextTrack element)) =>
+ _Collections.filter(this, <TextTrack>[], f);
+
+ bool every(bool f(TextTrack element)) => _Collections.every(this, f);
+
+ bool some(bool f(TextTrack element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<TextTrack>:
+
+ void sort(int compare(TextTrack a, TextTrack b)) {
+ throw const UnsupportedOperationException("Cannot sort immutable List.");
+ }
+
+ int indexOf(TextTrack element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(TextTrack element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ TextTrack last() => this[length - 1];
+
+ TextTrack removeLast() {
+ throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<TextTrack> from, [int startFrom]) {
+ throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [TextTrack initialValue]) {
+ throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ }
+
+ List<TextTrack> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <TextTrack>[]);
+
+ // -- end List<TextTrack> mixins.
+
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "addEventListener";
bool $dom_dispatchEvent(_EventImpl evt) native "dispatchEvent";
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698