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

Unified Diff: lib/html/frog/html_frog.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10140030: Regenerate dart:dom & dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/frog/html_frog.dart
diff --git a/lib/html/frog/html_frog.dart b/lib/html/frog/html_frog.dart
index df773fdf40655d2767065fa87e3999327dbd7d7b..f0333bfd1d8e45f603f1d0055b73fd524ded2499 100644
--- a/lib/html/frog/html_frog.dart
+++ b/lib/html/frog/html_frog.dart
@@ -4470,6 +4470,97 @@ class _DOMSettableTokenListImpl extends _DOMTokenListImpl implements DOMSettable
String value;
}
+class _DOMStringListImpl 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 _DOMTokenListImpl implements DOMTokenList native "*DOMTokenList" {
final int length;
@@ -21673,6 +21764,24 @@ interface DOMSettableTokenList extends DOMTokenList {
// WARNING: Do not edit - generated code.
+/// @domName DOMStringList
+interface DOMStringList extends List<String> {
+
+ /** @domName DOMStringList.length */
+ final int length;
+
+ /** @domName DOMStringList.contains */
+ bool contains(String string);
+
+ /** @domName DOMStringList.item */
+ 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.
+
/// @domName DOMTokenList
interface DOMTokenList {
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698