| Index: lib/dom/frog/dom_frog.dart
|
| diff --git a/lib/dom/frog/dom_frog.dart b/lib/dom/frog/dom_frog.dart
|
| index a0565fb20e5c7cc05b984a1ef5096aa7786941ff..2a6bfcde633dc34f12dc5c36743aa9fb30b575b6 100644
|
| --- a/lib/dom/frog/dom_frog.dart
|
| +++ b/lib/dom/frog/dom_frog.dart
|
| @@ -1208,6 +1208,97 @@ class _DOMSettableTokenListJs extends _DOMTokenListJs implements DOMSettableToke
|
| String value;
|
| }
|
|
|
| +class _DOMStringListJs extends _DOMTypeJs implements DOMStringList native "*DOMStringList" {
|
| +
|
| + final int length;
|
| +
|
| + 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 new UnsupportedOperationException("Cannot add to immutable List.");
|
| + }
|
| +
|
| + void addLast(String value) {
|
| + throw new UnsupportedOperationException("Cannot add to immutable List.");
|
| + }
|
| +
|
| + void addAll(Collection<String> collection) {
|
| + throw new 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 new 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 new UnsupportedOperationException("Cannot removeLast on immutable List.");
|
| + }
|
| +
|
| + // FIXME: implement these.
|
| + void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
|
| + throw new UnsupportedOperationException("Cannot setRange on immutable List.");
|
| + }
|
| +
|
| + void removeRange(int start, int rangeLength) {
|
| + throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
|
| + }
|
| +
|
| + void insertRange(int start, int rangeLength, [String initialValue]) {
|
| + throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
|
| + }
|
| +
|
| + List<String> getRange(int start, int rangeLength) =>
|
| + _Lists.getRange(this, start, rangeLength, <String>[]);
|
| +
|
| + // -- end List<String> mixins.
|
| +
|
| + bool contains(String string) native;
|
| +
|
| + String item(int index) native;
|
| +}
|
| +
|
| class _DOMTokenListJs extends _DOMTypeJs implements DOMTokenList native "*DOMTokenList" {
|
|
|
| final int length;
|
| @@ -13653,6 +13744,20 @@ interface DOMSettableTokenList extends DOMTokenList {
|
|
|
| // WARNING: Do not edit - generated code.
|
|
|
| +interface DOMStringList extends List<String> {
|
| +
|
| + final int length;
|
| +
|
| + bool contains(String string);
|
| +
|
| + String item(int index);
|
| +}
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +// WARNING: Do not edit - generated code.
|
| +
|
| interface DOMTokenList {
|
|
|
| final int length;
|
|
|