| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 917f711df006e5cb83a7c5c75dcb12b45279670f..95ead95763d7c49d51744d51736c5f11b377a9ec 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -6760,7 +6760,7 @@ class DomMimeType native "MimeType" {
|
|
|
| @DocsEditable
|
| @DomName('MimeTypeArray')
|
| -class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType> native "MimeTypeArray" {
|
| +class DomMimeTypeArray extends Object with ImmutableListMixin<DomMimeType>, ListMixin<DomMimeType> implements JavaScriptIndexingBehavior, List<DomMimeType> native "MimeTypeArray" {
|
|
|
| @DomName('DOMMimeTypeArray.length')
|
| @DocsEditable
|
| @@ -6774,196 +6774,11 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| // -- start List<DomMimeType> mixins.
|
| // DomMimeType is the element type.
|
|
|
| - // From Iterable<DomMimeType>:
|
|
|
| - Iterator<DomMimeType> get 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);
|
| - }
|
| -
|
| - DomMimeType reduce(DomMimeType combine(DomMimeType value, DomMimeType element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, DomMimeType element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(DomMimeType element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(DomMimeType element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<DomMimeType> where(bool f(DomMimeType element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(DomMimeType element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(DomMimeType element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<DomMimeType> toList({ bool growable: true }) =>
|
| - new List<DomMimeType>.from(this, growable: growable);
|
| -
|
| - Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<DomMimeType> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<DomMimeType> takeWhile(bool test(DomMimeType value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<DomMimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<DomMimeType> skipWhile(bool test(DomMimeType value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - DomMimeType firstWhere(bool test(DomMimeType value), { DomMimeType orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - DomMimeType lastWhere(bool test(DomMimeType value), {DomMimeType orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - DomMimeType singleWhere(bool test(DomMimeType value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - DomMimeType elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<DomMimeType>:
|
| -
|
| - void add(DomMimeType value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<DomMimeType> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<DomMimeType>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<DomMimeType> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(DomMimeType a, DomMimeType b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomMimeType get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomMimeType get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, DomMimeType element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<DomMimeType> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<DomMimeType> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - DomMimeType removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - DomMimeType removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(DomMimeType element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(DomMimeType element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<DomMimeType> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<DomMimeType> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [DomMimeType fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<DomMimeType> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<DomMimeType> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <DomMimeType>[]);
|
| - }
|
| -
|
| - Map<int, DomMimeType> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<DomMimeType> mixins.
|
|
|
| @DomName('DOMMimeTypeArray.item')
|
| @@ -7114,7 +6929,7 @@ class DomPlugin native "Plugin" {
|
|
|
| @DocsEditable
|
| @DomName('PluginArray')
|
| -class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> native "PluginArray" {
|
| +class DomPluginArray extends Object with ListMixin<DomPlugin>, ImmutableListMixin<DomPlugin> implements JavaScriptIndexingBehavior, List<DomPlugin> native "PluginArray" {
|
|
|
| @DomName('DOMPluginArray.length')
|
| @DocsEditable
|
| @@ -7128,196 +6943,11 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
|
| // -- start List<DomPlugin> mixins.
|
| // DomPlugin is the element type.
|
|
|
| - // From Iterable<DomPlugin>:
|
| -
|
| - Iterator<DomPlugin> get 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);
|
| - }
|
| -
|
| - DomPlugin reduce(DomPlugin combine(DomPlugin value, DomPlugin element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, DomPlugin element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(DomPlugin element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<DomPlugin> where(bool f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(DomPlugin element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<DomPlugin> toList({ bool growable: true }) =>
|
| - new List<DomPlugin>.from(this, growable: growable);
|
| -
|
| - Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<DomPlugin> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<DomPlugin> takeWhile(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<DomPlugin> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<DomPlugin> skipWhile(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - DomPlugin firstWhere(bool test(DomPlugin value), { DomPlugin orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - DomPlugin lastWhere(bool test(DomPlugin value), {DomPlugin orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - DomPlugin singleWhere(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - DomPlugin elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<DomPlugin>:
|
| -
|
| - void add(DomPlugin value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<DomPlugin>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<DomPlugin> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(DomPlugin a, DomPlugin b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomPlugin get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomPlugin get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, DomPlugin element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - DomPlugin removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - DomPlugin removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(DomPlugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(DomPlugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<DomPlugin> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [DomPlugin fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<DomPlugin> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<DomPlugin> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <DomPlugin>[]);
|
| - }
|
| -
|
| - Map<int, DomPlugin> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<DomPlugin> mixins.
|
|
|
| @DomName('DOMPluginArray.item')
|
| @@ -7536,7 +7166,7 @@ class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" {
|
|
|
| @DocsEditable
|
| @DomName('DOMStringList')
|
| -class DomStringList implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
| +class DomStringList extends Object with ImmutableListMixin<String>, ListMixin<String> implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
|
|
| @DomName('DOMStringList.length')
|
| @DocsEditable
|
| @@ -7550,222 +7180,37 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
|
| // -- start List<String> mixins.
|
| // String is the element type.
|
|
|
| - // From Iterable<String>:
|
| -
|
| - Iterator<String> get 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);
|
| - }
|
|
|
| - String reduce(String combine(String value, String element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, String element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + // -- end List<String> mixins.
|
|
|
| - // contains() defined by IDL.
|
| + @DomName('DOMStringList.contains')
|
| + @DocsEditable
|
| + bool contains(String string) native;
|
|
|
| - void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('DOMStringList.item')
|
| + @DocsEditable
|
| + String item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
|
|
| - Iterable map(f(String element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| +@DomName('DOMStringMap')
|
| +abstract class DomStringMap {
|
| +}
|
| +// 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.
|
|
|
| - Iterable<String> where(bool f(String element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(String element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<String> toList({ bool growable: true }) =>
|
| - new List<String>.from(this, growable: growable);
|
| -
|
| - Set<String> toSet() => new Set<String>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<String> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<String> takeWhile(bool test(String value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<String> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<String> skipWhile(bool test(String value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - String firstWhere(bool test(String value), { String orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - String lastWhere(bool test(String value), {String orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - String singleWhere(bool test(String value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - String elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<String>:
|
| -
|
| - void add(String value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<String> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<String>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<String> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(String a, String b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - String get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - String get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, String element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<String> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<String> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - String removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - String removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(String element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(String element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<String> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<String> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [String fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<String> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<String> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <String>[]);
|
| - }
|
| -
|
| - Map<int, String> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<String> mixins.
|
| -
|
| - @DomName('DOMStringList.contains')
|
| - @DocsEditable
|
| - bool contains(String string) native;
|
| -
|
| - @DomName('DOMStringList.item')
|
| - @DocsEditable
|
| - String item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DomName('DOMStringMap')
|
| -abstract class DomStringMap {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DOMTokenList')
|
| -class DomTokenList native "DOMTokenList" {
|
| +@DocsEditable
|
| +@DomName('DOMTokenList')
|
| +class DomTokenList native "DOMTokenList" {
|
|
|
| @DomName('DOMTokenList.length')
|
| @DocsEditable
|
| @@ -10298,7 +9743,7 @@ class FileException native "FileException" {
|
|
|
| @DocsEditable
|
| @DomName('FileList')
|
| -class FileList implements JavaScriptIndexingBehavior, List<File> native "FileList" {
|
| +class FileList extends Object with ListMixin<File>, ImmutableListMixin<File> implements JavaScriptIndexingBehavior, List<File> native "FileList" {
|
|
|
| @DomName('FileList.length')
|
| @DocsEditable
|
| @@ -10312,196 +9757,11 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "FileLis
|
| // -- start List<File> mixins.
|
| // File is the element type.
|
|
|
| - // From Iterable<File>:
|
| -
|
| - Iterator<File> get 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<File>(this);
|
| - }
|
| -
|
| - File reduce(File combine(File value, File element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, File element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(File element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(File element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(File element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<File> where(bool f(File element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(File element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(File element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(File element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<File> toList({ bool growable: true }) =>
|
| - new List<File>.from(this, growable: growable);
|
| -
|
| - Set<File> toSet() => new Set<File>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<File> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<File> takeWhile(bool test(File value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<File> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<File> skipWhile(bool test(File value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - File firstWhere(bool test(File value), { File orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - File lastWhere(bool test(File value), {File orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - File singleWhere(bool test(File value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - File elementAt(int index) {
|
| - return this[index];
|
| - }
|
|
|
| - // From Collection<File>:
|
| -
|
| - void add(File value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<File> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<File>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<File> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(File a, File b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(File element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(File element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - File get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - File get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - File get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, File element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<File> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<File> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - File removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - File removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(File element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(File element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<File> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<File> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [File fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<File> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<File> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <File>[]);
|
| - }
|
| -
|
| - Map<int, File> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<File> mixins.
|
|
|
| @DomName('FileList.item')
|
| @@ -11280,7 +10540,7 @@ class History implements HistoryBase native "History" {
|
|
|
| @DocsEditable
|
| @DomName('HTMLAllCollection')
|
| -class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollection" {
|
| +class HtmlAllCollection extends Object with ImmutableListMixin<Node>, ListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollection" {
|
|
|
| @DomName('HTMLAllCollection.length')
|
| @DocsEditable
|
| @@ -11294,201 +10554,16 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
| // -- start List<Node> mixins.
|
| // Node is the element type.
|
|
|
| - // From Iterable<Node>:
|
|
|
| - Iterator<Node> get 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);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - Node reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + // -- end List<Node> mixins.
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Node element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(Node element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Node element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| -
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Node> skipWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Node firstWhere(bool test(Node value), { Node orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Node lastWhere(bool test(Node value), {Node orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Node singleWhere(bool test(Node value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Node elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Node>:
|
| -
|
| - void add(Node value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Node removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Node> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Node fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Node> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Node>[]);
|
| - }
|
| -
|
| - Map<int, Node> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Node> mixins.
|
| -
|
| - @DomName('HTMLAllCollection.item')
|
| - @DocsEditable
|
| - Node item(int index) native;
|
| + @DomName('HTMLAllCollection.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| @DomName('HTMLAllCollection.namedItem')
|
| @DocsEditable
|
| @@ -11507,7 +10582,7 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
|
|
| @DocsEditable
|
| @DomName('HTMLCollection')
|
| -class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" {
|
| +class HtmlCollection extends Object with ImmutableListMixin<Node>, ListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" {
|
|
|
| @DomName('HTMLCollection.length')
|
| @DocsEditable
|
| @@ -11521,325 +10596,140 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "H
|
| // -- start List<Node> mixins.
|
| // Node is the element type.
|
|
|
| - // From Iterable<Node>:
|
| -
|
| - Iterator<Node> get 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);
|
| - }
|
|
|
| - Node reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Node element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + // -- end List<Node> mixins.
|
|
|
| - bool contains(Node element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('HTMLCollection.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| - void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('HTMLCollection.namedItem')
|
| + @DocsEditable
|
| + Node namedItem(String name) native;
|
| +}
|
| +// 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.
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| +// WARNING: Do not edit - generated code.
|
|
|
| - Iterable map(f(Node element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
|
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| +@DomName('HTMLDocument')
|
| +class HtmlDocument extends Document native "HTMLDocument" {
|
|
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('HTMLDocument.activeElement')
|
| + @DocsEditable
|
| + final Element activeElement;
|
|
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
|
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('Document.body')
|
| + BodyElement body;
|
|
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| + @DomName('Document.caretRangeFromPoint')
|
| + Range caretRangeFromPoint(int x, int y) {
|
| + return $dom_caretRangeFromPoint(x, y);
|
| + }
|
|
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| + @DomName('Document.elementFromPoint')
|
| + Element elementFromPoint(int x, int y) {
|
| + return $dom_elementFromPoint(x, y);
|
| + }
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + /**
|
| + * Checks if the getCssCanvasContext API is supported on the current platform.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [getCssCanvasContext]
|
| + */
|
| + static bool get supportsCssCanvasContext =>
|
| + JS('bool', '!!(document.getCSSCanvasContext)');
|
|
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
|
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| + /**
|
| + * Gets a CanvasRenderingContext which can be used as the CSS background of an
|
| + * element.
|
| + *
|
| + * CSS:
|
| + *
|
| + * background: -webkit-canvas(backgroundCanvas)
|
| + *
|
| + * Generate the canvas:
|
| + *
|
| + * var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
|
| + * 100, 100);
|
| + * context.fillStyle = 'red';
|
| + * context.fillRect(0, 0, 100, 100);
|
| + *
|
| + * See also:
|
| + *
|
| + * * [supportsCssCanvasContext]
|
| + * * [CanvasElement.getContext]
|
| + */
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + @DomName('Document.getCSSCanvasContext')
|
| + CanvasRenderingContext getCssCanvasContext(String contextId, String name,
|
| + int width, int height) {
|
| + return $dom_getCssCanvasContext(contextId, name, width, height);
|
| }
|
|
|
| - Iterable<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('Document.head')
|
| + HeadElement get head => $dom_head;
|
|
|
| - Iterable<Node> skipWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('Document.lastModified')
|
| + String get lastModified => $dom_lastModified;
|
|
|
| - Node firstWhere(bool test(Node value), { Node orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @DomName('Document.preferredStylesheetSet')
|
| + String get preferredStylesheetSet => $dom_preferredStylesheetSet;
|
|
|
| - Node lastWhere(bool test(Node value), {Node orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('Document.referrer')
|
| + String get referrer => $dom_referrer;
|
|
|
| - Node singleWhere(bool test(Node value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| + @DomName('Document.selectedStylesheetSet')
|
| + String get selectedStylesheetSet => $dom_selectedStylesheetSet;
|
| + void set selectedStylesheetSet(String value) {
|
| + $dom_selectedStylesheetSet = value;
|
| }
|
|
|
| - Node elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('Document.styleSheets')
|
| + List<StyleSheet> get styleSheets => $dom_styleSheets;
|
|
|
| - // From Collection<Node>:
|
| + @DomName('Document.title')
|
| + String get title => $dom_title;
|
|
|
| - void add(Node value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + @DomName('Document.title')
|
| + void set title(String value) {
|
| + $dom_title = value;
|
| }
|
|
|
| - void addAll(Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + @DomName('Document.webkitCancelFullScreen')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void cancelFullScreen() {
|
| + $dom_webkitCancelFullScreen();
|
| }
|
|
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| + @DomName('Document.webkitExitFullscreen')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void exitFullscreen() {
|
| + $dom_webkitExitFullscreen();
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Node removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Node> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Node fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Node> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Node>[]);
|
| - }
|
| -
|
| - Map<int, Node> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Node> mixins.
|
| -
|
| - @DomName('HTMLCollection.item')
|
| - @DocsEditable
|
| - Node item(int index) native;
|
| -
|
| - @DomName('HTMLCollection.namedItem')
|
| - @DocsEditable
|
| - Node namedItem(String name) native;
|
| -}
|
| -// 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('HTMLDocument')
|
| -class HtmlDocument extends Document native "HTMLDocument" {
|
| -
|
| - @DomName('HTMLDocument.activeElement')
|
| - @DocsEditable
|
| - final Element activeElement;
|
| -
|
| -
|
| - @DomName('Document.body')
|
| - BodyElement body;
|
| -
|
| - @DomName('Document.caretRangeFromPoint')
|
| - Range caretRangeFromPoint(int x, int y) {
|
| - return $dom_caretRangeFromPoint(x, y);
|
| - }
|
| -
|
| - @DomName('Document.elementFromPoint')
|
| - Element elementFromPoint(int x, int y) {
|
| - return $dom_elementFromPoint(x, y);
|
| - }
|
| -
|
| - /**
|
| - * Checks if the getCssCanvasContext API is supported on the current platform.
|
| - *
|
| - * See also:
|
| - *
|
| - * * [getCssCanvasContext]
|
| - */
|
| - static bool get supportsCssCanvasContext =>
|
| - JS('bool', '!!(document.getCSSCanvasContext)');
|
| -
|
| -
|
| - /**
|
| - * Gets a CanvasRenderingContext which can be used as the CSS background of an
|
| - * element.
|
| - *
|
| - * CSS:
|
| - *
|
| - * background: -webkit-canvas(backgroundCanvas)
|
| - *
|
| - * Generate the canvas:
|
| - *
|
| - * var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
|
| - * 100, 100);
|
| - * context.fillStyle = 'red';
|
| - * context.fillRect(0, 0, 100, 100);
|
| - *
|
| - * See also:
|
| - *
|
| - * * [supportsCssCanvasContext]
|
| - * * [CanvasElement.getContext]
|
| - */
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - @DomName('Document.getCSSCanvasContext')
|
| - CanvasRenderingContext getCssCanvasContext(String contextId, String name,
|
| - int width, int height) {
|
| - return $dom_getCssCanvasContext(contextId, name, width, height);
|
| - }
|
| -
|
| - @DomName('Document.head')
|
| - HeadElement get head => $dom_head;
|
| -
|
| - @DomName('Document.lastModified')
|
| - String get lastModified => $dom_lastModified;
|
| -
|
| - @DomName('Document.preferredStylesheetSet')
|
| - String get preferredStylesheetSet => $dom_preferredStylesheetSet;
|
| -
|
| - @DomName('Document.referrer')
|
| - String get referrer => $dom_referrer;
|
| -
|
| - @DomName('Document.selectedStylesheetSet')
|
| - String get selectedStylesheetSet => $dom_selectedStylesheetSet;
|
| - void set selectedStylesheetSet(String value) {
|
| - $dom_selectedStylesheetSet = value;
|
| - }
|
| -
|
| - @DomName('Document.styleSheets')
|
| - List<StyleSheet> get styleSheets => $dom_styleSheets;
|
| -
|
| - @DomName('Document.title')
|
| - String get title => $dom_title;
|
| -
|
| - @DomName('Document.title')
|
| - void set title(String value) {
|
| - $dom_title = value;
|
| - }
|
| -
|
| - @DomName('Document.webkitCancelFullScreen')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - void cancelFullScreen() {
|
| - $dom_webkitCancelFullScreen();
|
| - }
|
| -
|
| - @DomName('Document.webkitExitFullscreen')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - void exitFullscreen() {
|
| - $dom_webkitExitFullscreen();
|
| - }
|
| -
|
| - @DomName('Document.webkitExitPointerLock')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - void exitPointerLock() {
|
| - $dom_webkitExitPointerLock();
|
| + @DomName('Document.webkitExitPointerLock')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void exitPointerLock() {
|
| + $dom_webkitExitPointerLock();
|
| }
|
|
|
| @DomName('Document.webkitFullscreenElement')
|
| @@ -16372,7 +15262,7 @@ class NodeIterator native "NodeIterator" {
|
|
|
| @DocsEditable
|
| @DomName('NodeList')
|
| -class NodeList implements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" {
|
| +class NodeList extends Object with ImmutableListMixin<Node>, ListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" {
|
|
|
| @DomName('NodeList.length')
|
| @DocsEditable
|
| @@ -16386,244 +15276,59 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "NodeLis
|
| // -- start List<Node> mixins.
|
| // Node is the element type.
|
|
|
| - // From Iterable<Node>:
|
|
|
| - Iterator<Node> get 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);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - Node reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + // -- end List<Node> mixins.
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Node element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + @JSName('item')
|
| + @DomName('NodeList.item')
|
| + @DocsEditable
|
| + Node _item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - bool contains(Node element) => IterableMixinWorkaround.contains(this, element);
|
|
|
| - void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
|
| +@DocsEditable
|
| +@DomName('Notation')
|
| +class Notation extends Node native "Notation" {
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('Notation.publicId')
|
| + @DocsEditable
|
| + final String publicId;
|
|
|
| - Iterable map(f(Node element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('Notation.systemId')
|
| + @DocsEditable
|
| + final String systemId;
|
| +}
|
| +// Copyright (c) 2013, 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.
|
|
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| +@DomName('Notification')
|
| +class Notification extends EventTarget native "Notification" {
|
|
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
| + factory Notification(String title, {String titleDir: null, String body: null,
|
| + String bodyDir: null, String tag: null, String iconUrl: null}) {
|
|
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
| + var parsedOptions = {};
|
| + if (titleDir != null) parsedOptions['titleDir'] = titleDir;
|
| + if (body != null) parsedOptions['body'] = body;
|
| + if (bodyDir != null) parsedOptions['bodyDir'] = bodyDir;
|
| + if (tag != null) parsedOptions['tag'] = tag;
|
| + if (iconUrl != null) parsedOptions['iconUrl'] = iconUrl;
|
|
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| + return Notification._factoryNotification(title, parsedOptions);
|
| + }
|
|
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Node> skipWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Node firstWhere(bool test(Node value), { Node orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Node lastWhere(bool test(Node value), {Node orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Node singleWhere(bool test(Node value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Node elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Node>:
|
| -
|
| - void add(Node value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Node get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Node removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Node> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Node fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Node> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Node> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Node>[]);
|
| - }
|
| -
|
| - Map<int, Node> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Node> mixins.
|
| -
|
| - @JSName('item')
|
| - @DomName('NodeList.item')
|
| - @DocsEditable
|
| - Node _item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('Notation')
|
| -class Notation extends Node native "Notation" {
|
| -
|
| - @DomName('Notation.publicId')
|
| - @DocsEditable
|
| - final String publicId;
|
| -
|
| - @DomName('Notation.systemId')
|
| - @DocsEditable
|
| - final String systemId;
|
| -}
|
| -// Copyright (c) 2013, 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.
|
| -
|
| -
|
| -@DomName('Notification')
|
| -class Notification extends EventTarget native "Notification" {
|
| -
|
| - factory Notification(String title, {String titleDir: null, String body: null,
|
| - String bodyDir: null, String tag: null, String iconUrl: null}) {
|
| -
|
| - var parsedOptions = {};
|
| - if (titleDir != null) parsedOptions['titleDir'] = titleDir;
|
| - if (body != null) parsedOptions['body'] = body;
|
| - if (bodyDir != null) parsedOptions['bodyDir'] = bodyDir;
|
| - if (tag != null) parsedOptions['tag'] = tag;
|
| - if (iconUrl != null) parsedOptions['iconUrl'] = iconUrl;
|
| -
|
| - return Notification._factoryNotification(title, parsedOptions);
|
| - }
|
| -
|
| - @DomName('Notification.clickEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> clickEvent = const EventStreamProvider<Event>('click');
|
| + @DomName('Notification.clickEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> clickEvent = const EventStreamProvider<Event>('click');
|
|
|
| @DomName('Notification.closeEvent')
|
| @DocsEditable
|
| @@ -18904,7 +17609,7 @@ class SourceBuffer native "SourceBuffer" {
|
|
|
| @DocsEditable
|
| @DomName('SourceBufferList')
|
| -class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior, List<SourceBuffer> native "SourceBufferList" {
|
| +class SourceBufferList extends EventTarget with ListMixin<SourceBuffer>, ImmutableListMixin<SourceBuffer> implements JavaScriptIndexingBehavior, List<SourceBuffer> native "SourceBufferList" {
|
|
|
| @DomName('SourceBufferList.length')
|
| @DocsEditable
|
| @@ -18918,215 +17623,139 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
|
| // -- start List<SourceBuffer> mixins.
|
| // SourceBuffer is the element type.
|
|
|
| - // From Iterable<SourceBuffer>:
|
|
|
| - Iterator<SourceBuffer> get 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);
|
| - }
|
| -
|
| - SourceBuffer reduce(SourceBuffer combine(SourceBuffer value, SourceBuffer element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, SourceBuffer element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + // -- end List<SourceBuffer> mixins.
|
|
|
| - bool contains(SourceBuffer element) => IterableMixinWorkaround.contains(this, element);
|
| + @JSName('addEventListener')
|
| + @DomName('SourceBufferList.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - void forEach(void f(SourceBuffer element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('SourceBufferList.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event event) native;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('SourceBufferList.item')
|
| + @DocsEditable
|
| + SourceBuffer item(int index) native;
|
|
|
| - Iterable map(f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @JSName('removeEventListener')
|
| + @DomName('SourceBufferList.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| +}
|
| +// 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.
|
|
|
| - Iterable<SourceBuffer> where(bool f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| +@DocsEditable
|
| +@DomName('HTMLSourceElement')
|
| +class SourceElement extends Element native "HTMLSourceElement" {
|
|
|
| - bool every(bool f(SourceBuffer element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('HTMLSourceElement.HTMLSourceElement')
|
| + @DocsEditable
|
| + factory SourceElement() => document.$dom_createElement("source");
|
|
|
| - bool any(bool f(SourceBuffer element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('HTMLSourceElement.media')
|
| + @DocsEditable
|
| + String media;
|
|
|
| - List<SourceBuffer> toList({ bool growable: true }) =>
|
| - new List<SourceBuffer>.from(this, growable: growable);
|
| + @DomName('HTMLSourceElement.src')
|
| + @DocsEditable
|
| + String src;
|
|
|
| - Set<SourceBuffer> toSet() => new Set<SourceBuffer>.from(this);
|
| + @DomName('HTMLSourceElement.type')
|
| + @DocsEditable
|
| + String type;
|
| +}
|
| +// 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.
|
|
|
| - bool get isEmpty => this.length == 0;
|
|
|
| - Iterable<SourceBuffer> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| +@DocsEditable
|
| +@DomName('HTMLSpanElement')
|
| +class SpanElement extends Element native "HTMLSpanElement" {
|
|
|
| - Iterable<SourceBuffer> takeWhile(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('HTMLSpanElement.HTMLSpanElement')
|
| + @DocsEditable
|
| + factory SpanElement() => document.$dom_createElement("span");
|
| +}
|
| +// 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.
|
|
|
| - Iterable<SourceBuffer> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
|
|
| - Iterable<SourceBuffer> skipWhile(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| +@DocsEditable
|
| +@DomName('SpeechGrammar')
|
| +class SpeechGrammar native "SpeechGrammar" {
|
|
|
| - SourceBuffer firstWhere(bool test(SourceBuffer value), { SourceBuffer orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| + @DomName('SpeechGrammar.SpeechGrammar')
|
| + @DocsEditable
|
| + factory SpeechGrammar() {
|
| + return SpeechGrammar._create_1();
|
| }
|
| + static SpeechGrammar _create_1() => JS('SpeechGrammar', 'new SpeechGrammar()');
|
|
|
| - SourceBuffer lastWhere(bool test(SourceBuffer value), {SourceBuffer orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('SpeechGrammar.src')
|
| + @DocsEditable
|
| + String src;
|
|
|
| - SourceBuffer singleWhere(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + @DomName('SpeechGrammar.weight')
|
| + @DocsEditable
|
| + num weight;
|
| +}
|
| +// 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.
|
|
|
| - SourceBuffer elementAt(int index) {
|
| - return this[index];
|
| - }
|
|
|
| - // From Collection<SourceBuffer>:
|
| +@DocsEditable
|
| +@DomName('SpeechGrammarList')
|
| +class SpeechGrammarList extends Object with ImmutableListMixin<SpeechGrammar>, ListMixin<SpeechGrammar> implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "SpeechGrammarList" {
|
|
|
| - void add(SourceBuffer value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + @DomName('SpeechGrammarList.SpeechGrammarList')
|
| + @DocsEditable
|
| + factory SpeechGrammarList() {
|
| + return SpeechGrammarList._create_1();
|
| }
|
| + static SpeechGrammarList _create_1() => JS('SpeechGrammarList', 'new SpeechGrammarList()');
|
|
|
| - void addAll(Iterable<SourceBuffer> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('SpeechGrammarList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - // From List<SourceBuffer>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<SourceBuffer> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(SourceBuffer a, SourceBuffer b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SourceBuffer get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SourceBuffer get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, SourceBuffer element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<SourceBuffer> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<SourceBuffer> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - SourceBuffer removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - SourceBuffer removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(SourceBuffer element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(SourceBuffer element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<SourceBuffer> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<SourceBuffer> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [SourceBuffer fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<SourceBuffer> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + SpeechGrammar operator[](int index) => JS("SpeechGrammar", "#[#]", this, index);
|
|
|
| - List<SourceBuffer> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SourceBuffer>[]);
|
| + void operator[]=(int index, SpeechGrammar value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<SpeechGrammar> mixins.
|
| + // SpeechGrammar is the element type.
|
|
|
| - Map<int, SourceBuffer> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - // -- end List<SourceBuffer> mixins.
|
| -
|
| - @JSName('addEventListener')
|
| - @DomName('SourceBufferList.addEventListener')
|
| - @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + // -- end List<SpeechGrammar> mixins.
|
|
|
| - @DomName('SourceBufferList.dispatchEvent')
|
| + @DomName('SpeechGrammarList.addFromString')
|
| @DocsEditable
|
| - bool dispatchEvent(Event event) native;
|
| + void addFromString(String string, [num weight]) native;
|
|
|
| - @DomName('SourceBufferList.item')
|
| + @DomName('SpeechGrammarList.addFromUri')
|
| @DocsEditable
|
| - SourceBuffer item(int index) native;
|
| + void addFromUri(String src, [num weight]) native;
|
|
|
| - @JSName('removeEventListener')
|
| - @DomName('SourceBufferList.removeEventListener')
|
| + @DomName('SpeechGrammarList.item')
|
| @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + SpeechGrammar item(int index) native;
|
| }
|
| // 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
|
| @@ -19134,24 +17763,14 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLSourceElement')
|
| -class SourceElement extends Element native "HTMLSourceElement" {
|
| -
|
| - @DomName('HTMLSourceElement.HTMLSourceElement')
|
| - @DocsEditable
|
| - factory SourceElement() => document.$dom_createElement("source");
|
| -
|
| - @DomName('HTMLSourceElement.media')
|
| - @DocsEditable
|
| - String media;
|
| -
|
| - @DomName('HTMLSourceElement.src')
|
| - @DocsEditable
|
| - String src;
|
| +@DomName('SpeechInputEvent')
|
| +class SpeechInputEvent extends Event native "SpeechInputEvent" {
|
|
|
| - @DomName('HTMLSourceElement.type')
|
| + @DomName('SpeechInputEvent.results')
|
| @DocsEditable
|
| - String type;
|
| + @Returns('_SpeechInputResultList')
|
| + @Creates('_SpeechInputResultList')
|
| + final List<SpeechInputResult> results;
|
| }
|
| // 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
|
| @@ -19159,423 +17778,139 @@ class SourceElement extends Element native "HTMLSourceElement" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLSpanElement')
|
| -class SpanElement extends Element native "HTMLSpanElement" {
|
| +@DomName('SpeechInputResult')
|
| +class SpeechInputResult native "SpeechInputResult" {
|
|
|
| - @DomName('HTMLSpanElement.HTMLSpanElement')
|
| + @DomName('SpeechInputResult.confidence')
|
| @DocsEditable
|
| - factory SpanElement() => document.$dom_createElement("span");
|
| + final num confidence;
|
| +
|
| + @DomName('SpeechInputResult.utterance')
|
| + @DocsEditable
|
| + final String utterance;
|
| }
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2013, 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.
|
|
|
|
|
| -@DocsEditable
|
| -@DomName('SpeechGrammar')
|
| -class SpeechGrammar native "SpeechGrammar" {
|
| +@DomName('SpeechRecognition')
|
| +@SupportedBrowser(SupportedBrowser.CHROME, '25')
|
| +@Experimental
|
| +class SpeechRecognition extends EventTarget native "SpeechRecognition" {
|
|
|
| - @DomName('SpeechGrammar.SpeechGrammar')
|
| + @DomName('SpeechRecognition.audioendEvent')
|
| @DocsEditable
|
| - factory SpeechGrammar() {
|
| - return SpeechGrammar._create_1();
|
| - }
|
| - static SpeechGrammar _create_1() => JS('SpeechGrammar', 'new SpeechGrammar()');
|
| + static const EventStreamProvider<Event> audioEndEvent = const EventStreamProvider<Event>('audioend');
|
|
|
| - @DomName('SpeechGrammar.src')
|
| + @DomName('SpeechRecognition.audiostartEvent')
|
| @DocsEditable
|
| - String src;
|
| + static const EventStreamProvider<Event> audioStartEvent = const EventStreamProvider<Event>('audiostart');
|
|
|
| - @DomName('SpeechGrammar.weight')
|
| + @DomName('SpeechRecognition.endEvent')
|
| @DocsEditable
|
| - num weight;
|
| -}
|
| -// 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.
|
| -
|
| + static const EventStreamProvider<Event> endEvent = const EventStreamProvider<Event>('end');
|
|
|
| -@DocsEditable
|
| -@DomName('SpeechGrammarList')
|
| -class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "SpeechGrammarList" {
|
| + @DomName('SpeechRecognition.errorEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<SpeechRecognitionError> errorEvent = const EventStreamProvider<SpeechRecognitionError>('error');
|
|
|
| - @DomName('SpeechGrammarList.SpeechGrammarList')
|
| + @DomName('SpeechRecognition.nomatchEvent')
|
| @DocsEditable
|
| - factory SpeechGrammarList() {
|
| - return SpeechGrammarList._create_1();
|
| - }
|
| - static SpeechGrammarList _create_1() => JS('SpeechGrammarList', 'new SpeechGrammarList()');
|
| + static const EventStreamProvider<SpeechRecognitionEvent> noMatchEvent = const EventStreamProvider<SpeechRecognitionEvent>('nomatch');
|
|
|
| - @DomName('SpeechGrammarList.length')
|
| + @DomName('SpeechRecognition.resultEvent')
|
| @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| + static const EventStreamProvider<SpeechRecognitionEvent> resultEvent = const EventStreamProvider<SpeechRecognitionEvent>('result');
|
|
|
| - SpeechGrammar operator[](int index) => JS("SpeechGrammar", "#[#]", this, index);
|
| + @DomName('SpeechRecognition.soundendEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> soundEndEvent = const EventStreamProvider<Event>('soundend');
|
|
|
| - void operator[]=(int index, SpeechGrammar value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<SpeechGrammar> mixins.
|
| - // SpeechGrammar is the element type.
|
| + @DomName('SpeechRecognition.soundstartEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> soundStartEvent = const EventStreamProvider<Event>('soundstart');
|
|
|
| - // From Iterable<SpeechGrammar>:
|
| + @DomName('SpeechRecognition.speechendEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> speechEndEvent = const EventStreamProvider<Event>('speechend');
|
|
|
| - Iterator<SpeechGrammar> get 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);
|
| - }
|
| + @DomName('SpeechRecognition.speechstartEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> speechStartEvent = const EventStreamProvider<Event>('speechstart');
|
|
|
| - SpeechGrammar reduce(SpeechGrammar combine(SpeechGrammar value, SpeechGrammar element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + @DomName('SpeechRecognition.startEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> startEvent = const EventStreamProvider<Event>('start');
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, SpeechGrammar element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '!!(window.SpeechRecognition || window.webkitSpeechRecognition)');
|
|
|
| - bool contains(SpeechGrammar element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('SpeechRecognition.continuous')
|
| + @DocsEditable
|
| + bool continuous;
|
|
|
| - void forEach(void f(SpeechGrammar element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('SpeechRecognition.grammars')
|
| + @DocsEditable
|
| + SpeechGrammarList grammars;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('SpeechRecognition.interimResults')
|
| + @DocsEditable
|
| + bool interimResults;
|
|
|
| - Iterable map(f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('SpeechRecognition.lang')
|
| + @DocsEditable
|
| + String lang;
|
|
|
| - Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('SpeechRecognition.maxAlternatives')
|
| + @DocsEditable
|
| + int maxAlternatives;
|
|
|
| - Iterable expand(Iterable f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('SpeechRecognition.abort')
|
| + @DocsEditable
|
| + void abort() native;
|
|
|
| - bool every(bool f(SpeechGrammar element)) => IterableMixinWorkaround.every(this, f);
|
| + @JSName('addEventListener')
|
| + @DomName('SpeechRecognition.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - bool any(bool f(SpeechGrammar element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('SpeechRecognition.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event evt) native;
|
|
|
| - List<SpeechGrammar> toList({ bool growable: true }) =>
|
| - new List<SpeechGrammar>.from(this, growable: growable);
|
| + @JSName('removeEventListener')
|
| + @DomName('SpeechRecognition.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - Set<SpeechGrammar> toSet() => new Set<SpeechGrammar>.from(this);
|
| + @DomName('SpeechRecognition.start')
|
| + @DocsEditable
|
| + void start() native;
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('SpeechRecognition.stop')
|
| + @DocsEditable
|
| + void stop() native;
|
|
|
| - Iterable<SpeechGrammar> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @DomName('SpeechRecognition.onaudioend')
|
| + @DocsEditable
|
| + Stream<Event> get onAudioEnd => audioEndEvent.forTarget(this);
|
|
|
| - Iterable<SpeechGrammar> takeWhile(bool test(SpeechGrammar value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('SpeechRecognition.onaudiostart')
|
| + @DocsEditable
|
| + Stream<Event> get onAudioStart => audioStartEvent.forTarget(this);
|
|
|
| - Iterable<SpeechGrammar> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('SpeechRecognition.onend')
|
| + @DocsEditable
|
| + Stream<Event> get onEnd => endEvent.forTarget(this);
|
|
|
| - Iterable<SpeechGrammar> skipWhile(bool test(SpeechGrammar value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('SpeechRecognition.onerror')
|
| + @DocsEditable
|
| + Stream<SpeechRecognitionError> get onError => errorEvent.forTarget(this);
|
|
|
| - SpeechGrammar firstWhere(bool test(SpeechGrammar value), { SpeechGrammar orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - SpeechGrammar lastWhere(bool test(SpeechGrammar value), {SpeechGrammar orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - SpeechGrammar singleWhere(bool test(SpeechGrammar value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - SpeechGrammar elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<SpeechGrammar>:
|
| -
|
| - void add(SpeechGrammar value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<SpeechGrammar> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<SpeechGrammar>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<SpeechGrammar> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SpeechGrammar get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SpeechGrammar get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, SpeechGrammar element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<SpeechGrammar> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<SpeechGrammar> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - SpeechGrammar removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - SpeechGrammar removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(SpeechGrammar element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(SpeechGrammar element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<SpeechGrammar> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<SpeechGrammar> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [SpeechGrammar fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<SpeechGrammar> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<SpeechGrammar> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SpeechGrammar>[]);
|
| - }
|
| -
|
| - Map<int, SpeechGrammar> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<SpeechGrammar> mixins.
|
| -
|
| - @DomName('SpeechGrammarList.addFromString')
|
| - @DocsEditable
|
| - void addFromString(String string, [num weight]) native;
|
| -
|
| - @DomName('SpeechGrammarList.addFromUri')
|
| - @DocsEditable
|
| - void addFromUri(String src, [num weight]) native;
|
| -
|
| - @DomName('SpeechGrammarList.item')
|
| - @DocsEditable
|
| - SpeechGrammar item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('SpeechInputEvent')
|
| -class SpeechInputEvent extends Event native "SpeechInputEvent" {
|
| -
|
| - @DomName('SpeechInputEvent.results')
|
| - @DocsEditable
|
| - @Returns('_SpeechInputResultList')
|
| - @Creates('_SpeechInputResultList')
|
| - final List<SpeechInputResult> results;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('SpeechInputResult')
|
| -class SpeechInputResult native "SpeechInputResult" {
|
| -
|
| - @DomName('SpeechInputResult.confidence')
|
| - @DocsEditable
|
| - final num confidence;
|
| -
|
| - @DomName('SpeechInputResult.utterance')
|
| - @DocsEditable
|
| - final String utterance;
|
| -}
|
| -// Copyright (c) 2013, 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.
|
| -
|
| -
|
| -@DomName('SpeechRecognition')
|
| -@SupportedBrowser(SupportedBrowser.CHROME, '25')
|
| -@Experimental
|
| -class SpeechRecognition extends EventTarget native "SpeechRecognition" {
|
| -
|
| - @DomName('SpeechRecognition.audioendEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> audioEndEvent = const EventStreamProvider<Event>('audioend');
|
| -
|
| - @DomName('SpeechRecognition.audiostartEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> audioStartEvent = const EventStreamProvider<Event>('audiostart');
|
| -
|
| - @DomName('SpeechRecognition.endEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> endEvent = const EventStreamProvider<Event>('end');
|
| -
|
| - @DomName('SpeechRecognition.errorEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<SpeechRecognitionError> errorEvent = const EventStreamProvider<SpeechRecognitionError>('error');
|
| -
|
| - @DomName('SpeechRecognition.nomatchEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<SpeechRecognitionEvent> noMatchEvent = const EventStreamProvider<SpeechRecognitionEvent>('nomatch');
|
| -
|
| - @DomName('SpeechRecognition.resultEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<SpeechRecognitionEvent> resultEvent = const EventStreamProvider<SpeechRecognitionEvent>('result');
|
| -
|
| - @DomName('SpeechRecognition.soundendEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> soundEndEvent = const EventStreamProvider<Event>('soundend');
|
| -
|
| - @DomName('SpeechRecognition.soundstartEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> soundStartEvent = const EventStreamProvider<Event>('soundstart');
|
| -
|
| - @DomName('SpeechRecognition.speechendEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> speechEndEvent = const EventStreamProvider<Event>('speechend');
|
| -
|
| - @DomName('SpeechRecognition.speechstartEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> speechStartEvent = const EventStreamProvider<Event>('speechstart');
|
| -
|
| - @DomName('SpeechRecognition.startEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> startEvent = const EventStreamProvider<Event>('start');
|
| -
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => JS('bool', '!!(window.SpeechRecognition || window.webkitSpeechRecognition)');
|
| -
|
| - @DomName('SpeechRecognition.continuous')
|
| - @DocsEditable
|
| - bool continuous;
|
| -
|
| - @DomName('SpeechRecognition.grammars')
|
| - @DocsEditable
|
| - SpeechGrammarList grammars;
|
| -
|
| - @DomName('SpeechRecognition.interimResults')
|
| - @DocsEditable
|
| - bool interimResults;
|
| -
|
| - @DomName('SpeechRecognition.lang')
|
| - @DocsEditable
|
| - String lang;
|
| -
|
| - @DomName('SpeechRecognition.maxAlternatives')
|
| - @DocsEditable
|
| - int maxAlternatives;
|
| -
|
| - @DomName('SpeechRecognition.abort')
|
| - @DocsEditable
|
| - void abort() native;
|
| -
|
| - @JSName('addEventListener')
|
| - @DomName('SpeechRecognition.addEventListener')
|
| - @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| -
|
| - @DomName('SpeechRecognition.dispatchEvent')
|
| - @DocsEditable
|
| - bool dispatchEvent(Event evt) native;
|
| -
|
| - @JSName('removeEventListener')
|
| - @DomName('SpeechRecognition.removeEventListener')
|
| - @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| -
|
| - @DomName('SpeechRecognition.start')
|
| - @DocsEditable
|
| - void start() native;
|
| -
|
| - @DomName('SpeechRecognition.stop')
|
| - @DocsEditable
|
| - void stop() native;
|
| -
|
| - @DomName('SpeechRecognition.onaudioend')
|
| - @DocsEditable
|
| - Stream<Event> get onAudioEnd => audioEndEvent.forTarget(this);
|
| -
|
| - @DomName('SpeechRecognition.onaudiostart')
|
| - @DocsEditable
|
| - Stream<Event> get onAudioStart => audioStartEvent.forTarget(this);
|
| -
|
| - @DomName('SpeechRecognition.onend')
|
| - @DocsEditable
|
| - Stream<Event> get onEnd => endEvent.forTarget(this);
|
| -
|
| - @DomName('SpeechRecognition.onerror')
|
| - @DocsEditable
|
| - Stream<SpeechRecognitionError> get onError => errorEvent.forTarget(this);
|
| -
|
| - @DomName('SpeechRecognition.onnomatch')
|
| - @DocsEditable
|
| - Stream<SpeechRecognitionEvent> get onNoMatch => noMatchEvent.forTarget(this);
|
| + @DomName('SpeechRecognition.onnomatch')
|
| + @DocsEditable
|
| + Stream<SpeechRecognitionEvent> get onNoMatch => noMatchEvent.forTarget(this);
|
|
|
| @DomName('SpeechRecognition.onresult')
|
| @DocsEditable
|
| @@ -20671,7 +19006,7 @@ class TextTrackCue extends EventTarget native "TextTrackCue" {
|
|
|
| @DocsEditable
|
| @DomName('TextTrackCueList')
|
| -class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior native "TextTrackCueList" {
|
| +class TextTrackCueList extends Object with ImmutableListMixin<TextTrackCue>, ListMixin<TextTrackCue> implements List<TextTrackCue>, JavaScriptIndexingBehavior native "TextTrackCueList" {
|
|
|
| @DomName('TextTrackCueList.length')
|
| @DocsEditable
|
| @@ -20685,196 +19020,11 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
|
| // -- start List<TextTrackCue> mixins.
|
| // TextTrackCue is the element type.
|
|
|
| - // From Iterable<TextTrackCue>:
|
|
|
| - Iterator<TextTrackCue> get 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);
|
| - }
|
| -
|
| - TextTrackCue reduce(TextTrackCue combine(TextTrackCue value, TextTrackCue element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, TextTrackCue element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(TextTrackCue element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(TextTrackCue element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(TextTrackCue element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<TextTrackCue> where(bool f(TextTrackCue element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(TextTrackCue element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(TextTrackCue element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(TextTrackCue element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<TextTrackCue> toList({ bool growable: true }) =>
|
| - new List<TextTrackCue>.from(this, growable: growable);
|
| -
|
| - Set<TextTrackCue> toSet() => new Set<TextTrackCue>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<TextTrackCue> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<TextTrackCue> takeWhile(bool test(TextTrackCue value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<TextTrackCue> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<TextTrackCue> skipWhile(bool test(TextTrackCue value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - TextTrackCue firstWhere(bool test(TextTrackCue value), { TextTrackCue orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - TextTrackCue lastWhere(bool test(TextTrackCue value), {TextTrackCue orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - TextTrackCue singleWhere(bool test(TextTrackCue value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - TextTrackCue elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<TextTrackCue>:
|
| -
|
| - void add(TextTrackCue value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<TextTrackCue> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<TextTrackCue>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<TextTrackCue> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(TextTrackCue a, TextTrackCue b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - TextTrackCue get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - TextTrackCue get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, TextTrackCue element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<TextTrackCue> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<TextTrackCue> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - TextTrackCue removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - TextTrackCue removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(TextTrackCue element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(TextTrackCue element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<TextTrackCue> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<TextTrackCue> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [TextTrackCue fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<TextTrackCue> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<TextTrackCue> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <TextTrackCue>[]);
|
| - }
|
| -
|
| - Map<int, TextTrackCue> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<TextTrackCue> mixins.
|
|
|
| @DomName('TextTrackCueList.getCueById')
|
| @@ -20892,7 +19042,7 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
|
|
|
| @DocsEditable
|
| @DomName('TextTrackList')
|
| -class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, List<TextTrack> native "TextTrackList" {
|
| +class TextTrackList extends EventTarget with ImmutableListMixin<TextTrack>, ListMixin<TextTrack> implements JavaScriptIndexingBehavior, List<TextTrack> native "TextTrackList" {
|
|
|
| @DomName('TextTrackList.addtrackEvent')
|
| @DocsEditable
|
| @@ -20910,196 +19060,11 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
|
| // -- start List<TextTrack> mixins.
|
| // TextTrack is the element type.
|
|
|
| - // From Iterable<TextTrack>:
|
| -
|
| - Iterator<TextTrack> get 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);
|
| - }
|
| -
|
| - TextTrack reduce(TextTrack combine(TextTrack value, TextTrack element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, TextTrack element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(TextTrack element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(TextTrack element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(TextTrack element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<TextTrack> where(bool f(TextTrack element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(TextTrack element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(TextTrack element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(TextTrack element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<TextTrack> toList({ bool growable: true }) =>
|
| - new List<TextTrack>.from(this, growable: growable);
|
| -
|
| - Set<TextTrack> toSet() => new Set<TextTrack>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<TextTrack> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<TextTrack> takeWhile(bool test(TextTrack value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<TextTrack> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<TextTrack> skipWhile(bool test(TextTrack value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - TextTrack firstWhere(bool test(TextTrack value), { TextTrack orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - TextTrack lastWhere(bool test(TextTrack value), {TextTrack orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - TextTrack singleWhere(bool test(TextTrack value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - TextTrack elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<TextTrack>:
|
| -
|
| - void add(TextTrack value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<TextTrack> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<TextTrack>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<TextTrack> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(TextTrack a, TextTrack b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - TextTrack get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - TextTrack get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, TextTrack element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<TextTrack> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<TextTrack> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - TextTrack removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - TextTrack removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(TextTrack element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(TextTrack element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<TextTrack> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<TextTrack> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [TextTrack fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<TextTrack> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<TextTrack> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <TextTrack>[]);
|
| - }
|
| -
|
| - Map<int, TextTrack> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<TextTrack> mixins.
|
|
|
| @JSName('addEventListener')
|
| @@ -21340,7 +19305,7 @@ class TouchEvent extends UIEvent native "TouchEvent" {
|
|
|
|
|
| @DomName('TouchList')
|
| -class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "TouchList" {
|
| +class TouchList extends Object with ListMixin<Touch>, ImmutableListMixin<Touch> implements JavaScriptIndexingBehavior, List<Touch> native "TouchList" {
|
| /// NB: This constructor likely does not work as you might expect it to! This
|
| /// constructor will simply fail (returning null) if you are not on a device
|
| /// with touch enabled. See dartbug.com/8314.
|
| @@ -21361,227 +19326,42 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "Touch
|
| // -- start List<Touch> mixins.
|
| // Touch is the element type.
|
|
|
| - // From Iterable<Touch>:
|
|
|
| - Iterator<Touch> get iterator {
|
| - // Note: NodeLists are not fixed size. And most probably length shouldn't
|
| - // be cached in both iterator _and_ forEach method. For now caching it
|
| - // for consistency.
|
| - return new FixedSizeListIterator<Touch>(this);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - Touch reduce(Touch combine(Touch value, Touch element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + // -- end List<Touch> mixins.
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Touch element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + @DomName('TouchList.item')
|
| + @DocsEditable
|
| + Touch item(int index) native;
|
|
|
| - bool contains(Touch element) => IterableMixinWorkaround.contains(this, element);
|
| +}
|
| +// 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.
|
|
|
| - void forEach(void f(Touch element)) => IterableMixinWorkaround.forEach(this, f);
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| +@DocsEditable
|
| +@DomName('HTMLTrackElement')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +class TrackElement extends Element native "HTMLTrackElement" {
|
|
|
| - Iterable map(f(Touch element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('HTMLTrackElement.HTMLTrackElement')
|
| + @DocsEditable
|
| + factory TrackElement() => document.$dom_createElement("track");
|
|
|
| - Iterable<Touch> where(bool f(Touch element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => Element.isTagSupported('track');
|
|
|
| - Iterable expand(Iterable f(Touch element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + static const int ERROR = 3;
|
|
|
| - bool every(bool f(Touch element)) => IterableMixinWorkaround.every(this, f);
|
| + static const int LOADED = 2;
|
|
|
| - bool any(bool f(Touch element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<Touch> toList({ bool growable: true }) =>
|
| - new List<Touch>.from(this, growable: growable);
|
| -
|
| - Set<Touch> toSet() => new Set<Touch>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Touch> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Touch> takeWhile(bool test(Touch value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Touch> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Touch> skipWhile(bool test(Touch value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Touch firstWhere(bool test(Touch value), { Touch orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Touch lastWhere(bool test(Touch value), {Touch orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Touch singleWhere(bool test(Touch value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Touch elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Touch>:
|
| -
|
| - void add(Touch value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Touch> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Touch>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Touch> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Touch a, Touch b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(Touch element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(Touch element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - Touch get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Touch get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Touch get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Touch element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Touch> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Touch> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Touch removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Touch removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Touch element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Touch element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Touch> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Touch> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Touch fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Touch> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Touch> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Touch>[]);
|
| - }
|
| -
|
| - Map<int, Touch> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Touch> mixins.
|
| -
|
| - @DomName('TouchList.item')
|
| - @DocsEditable
|
| - Touch item(int index) native;
|
| -
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('HTMLTrackElement')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.IE, '10')
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -class TrackElement extends Element native "HTMLTrackElement" {
|
| -
|
| - @DomName('HTMLTrackElement.HTMLTrackElement')
|
| - @DocsEditable
|
| - factory TrackElement() => document.$dom_createElement("track");
|
| -
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => Element.isTagSupported('track');
|
| -
|
| - static const int ERROR = 3;
|
| -
|
| - static const int LOADED = 2;
|
| -
|
| - static const int LOADING = 1;
|
| + static const int LOADING = 1;
|
|
|
| static const int NONE = 0;
|
|
|
| @@ -22611,7 +20391,7 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| @SupportedBrowser(SupportedBrowser.IE, '10.0')
|
| @Experimental
|
| IdbFactory get indexedDB =>
|
| - JS('IdbFactory|Null',
|
| + JS('IdbFactory|Null', // If not supported, returns `null`.
|
| '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
|
| this, this, this);
|
|
|
| @@ -23304,1977 +21084,205 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| @DocsEditable
|
| Stream<Event> get onPageShow => pageShowEvent.forTarget(this);
|
|
|
| - @DomName('DOMWindow.onpopstate')
|
| - @DocsEditable
|
| - Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onreset')
|
| - @DocsEditable
|
| - Stream<Event> get onReset => Element.resetEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onresize')
|
| - @DocsEditable
|
| - Stream<Event> get onResize => resizeEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onscroll')
|
| - @DocsEditable
|
| - Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onsearch')
|
| - @DocsEditable
|
| - Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onselect')
|
| - @DocsEditable
|
| - Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onstorage')
|
| - @DocsEditable
|
| - Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onsubmit')
|
| - @DocsEditable
|
| - Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ontouchcancel')
|
| - @DocsEditable
|
| - Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ontouchend')
|
| - @DocsEditable
|
| - Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ontouchmove')
|
| - @DocsEditable
|
| - Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ontouchstart')
|
| - @DocsEditable
|
| - Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onunload')
|
| - @DocsEditable
|
| - Stream<Event> get onUnload => unloadEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onwebkitAnimationEnd')
|
| - @DocsEditable
|
| - Stream<AnimationEvent> get onAnimationEnd => animationEndEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onwebkitAnimationIteration')
|
| - @DocsEditable
|
| - Stream<AnimationEvent> get onAnimationIteration => animationIterationEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onwebkitAnimationStart')
|
| - @DocsEditable
|
| - Stream<AnimationEvent> get onAnimationStart => animationStartEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onwebkitTransitionEnd')
|
| - @DocsEditable
|
| - Stream<TransitionEvent> get onTransitionEnd => Element.transitionEndEvent.forTarget(this);
|
| -
|
| -
|
| - @DomName('DOMWindow.beforeunloadEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<BeforeUnloadEvent> beforeUnloadEvent =
|
| - const _BeforeUnloadEventStreamProvider('beforeunload');
|
| -
|
| - @DomName('DOMWindow.onbeforeunload')
|
| - @DocsEditable
|
| - Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
|
| -}
|
| -
|
| -/**
|
| - * Event object that is fired before the window is closed.
|
| - *
|
| - * The standard window close behavior can be prevented by setting the
|
| - * [returnValue]. This will display a dialog to the user confirming that they
|
| - * want to close the page.
|
| - */
|
| -abstract class BeforeUnloadEvent implements Event {
|
| - /**
|
| - * If set to a non-null value, a dialog will be presented to the user
|
| - * confirming that they want to close the page.
|
| - */
|
| - String returnValue;
|
| -}
|
| -
|
| -class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent {
|
| - String _returnValue;
|
| -
|
| - _BeforeUnloadEvent(Event base): super(base);
|
| -
|
| - String get returnValue => _returnValue;
|
| -
|
| - void set returnValue(String value) {
|
| - _returnValue = value;
|
| - // FF and IE use the value as the return value, Chrome will return this from
|
| - // the event callback function.
|
| - if (JS('bool', '("returnValue" in #)', _base)) {
|
| - JS('void', '#.returnValue = #', _base, value);
|
| - }
|
| - }
|
| -}
|
| -
|
| -class _BeforeUnloadEventStreamProvider implements
|
| - EventStreamProvider<BeforeUnloadEvent> {
|
| - final String _eventType;
|
| -
|
| - const _BeforeUnloadEventStreamProvider(this._eventType);
|
| -
|
| - Stream<BeforeUnloadEvent> forTarget(EventTarget e, {bool useCapture: false}) {
|
| - var controller = new StreamController();
|
| - var stream = new _EventStream(e, _eventType, useCapture);
|
| - stream.listen((event) {
|
| - var wrapped = new _BeforeUnloadEvent(event);
|
| - controller.add(wrapped);
|
| - return wrapped.returnValue;
|
| - });
|
| -
|
| - return controller.stream;
|
| - }
|
| -
|
| - String getEventType(EventTarget target) {
|
| - return _eventType;
|
| - }
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('Worker')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| -@SupportedBrowser(SupportedBrowser.IE, '10')
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -class Worker extends AbstractWorker native "Worker" {
|
| -
|
| - @DomName('Worker.messageEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
|
| -
|
| - @DomName('Worker.Worker')
|
| - @DocsEditable
|
| - factory Worker(String scriptUrl) {
|
| - return Worker._create_1(scriptUrl);
|
| - }
|
| - static Worker _create_1(scriptUrl) => JS('Worker', 'new Worker(#)', scriptUrl);
|
| -
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => JS('bool', '(typeof window.Worker != "undefined")');
|
| -
|
| - @DomName('Worker.postMessage')
|
| - @DocsEditable
|
| - void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) native;
|
| -
|
| - @DomName('Worker.terminate')
|
| - @DocsEditable
|
| - void terminate() native;
|
| -
|
| - @DomName('Worker.onmessage')
|
| - @DocsEditable
|
| - Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XPathEvaluator')
|
| -class XPathEvaluator native "XPathEvaluator" {
|
| -
|
| - @DomName('XPathEvaluator.XPathEvaluator')
|
| - @DocsEditable
|
| - factory XPathEvaluator() {
|
| - return XPathEvaluator._create_1();
|
| - }
|
| - static XPathEvaluator _create_1() => JS('XPathEvaluator', 'new XPathEvaluator()');
|
| -
|
| - @DomName('XPathEvaluator.createExpression')
|
| - @DocsEditable
|
| - XPathExpression createExpression(String expression, XPathNSResolver resolver) native;
|
| -
|
| - @DomName('XPathEvaluator.createNSResolver')
|
| - @DocsEditable
|
| - XPathNSResolver createNSResolver(Node nodeResolver) native;
|
| -
|
| - @DomName('XPathEvaluator.evaluate')
|
| - @DocsEditable
|
| - XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XPathException')
|
| -class XPathException native "XPathException" {
|
| -
|
| - static const int INVALID_EXPRESSION_ERR = 51;
|
| -
|
| - static const int TYPE_ERR = 52;
|
| -
|
| - @DomName('XPathException.code')
|
| - @DocsEditable
|
| - final int code;
|
| -
|
| - @DomName('XPathException.message')
|
| - @DocsEditable
|
| - final String message;
|
| -
|
| - @DomName('XPathException.name')
|
| - @DocsEditable
|
| - final String name;
|
| -
|
| - @DomName('XPathException.toString')
|
| - @DocsEditable
|
| - String toString() native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XPathExpression')
|
| -class XPathExpression native "XPathExpression" {
|
| -
|
| - @DomName('XPathExpression.evaluate')
|
| - @DocsEditable
|
| - XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XPathNSResolver')
|
| -class XPathNSResolver native "XPathNSResolver" {
|
| -
|
| - @JSName('lookupNamespaceURI')
|
| - @DomName('XPathNSResolver.lookupNamespaceURI')
|
| - @DocsEditable
|
| - String lookupNamespaceUri(String prefix) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XPathResult')
|
| -class XPathResult native "XPathResult" {
|
| -
|
| - static const int ANY_TYPE = 0;
|
| -
|
| - static const int ANY_UNORDERED_NODE_TYPE = 8;
|
| -
|
| - static const int BOOLEAN_TYPE = 3;
|
| -
|
| - static const int FIRST_ORDERED_NODE_TYPE = 9;
|
| -
|
| - static const int NUMBER_TYPE = 1;
|
| -
|
| - static const int ORDERED_NODE_ITERATOR_TYPE = 5;
|
| -
|
| - static const int ORDERED_NODE_SNAPSHOT_TYPE = 7;
|
| -
|
| - static const int STRING_TYPE = 2;
|
| -
|
| - static const int UNORDERED_NODE_ITERATOR_TYPE = 4;
|
| -
|
| - static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;
|
| -
|
| - @DomName('XPathResult.booleanValue')
|
| - @DocsEditable
|
| - final bool booleanValue;
|
| -
|
| - @DomName('XPathResult.invalidIteratorState')
|
| - @DocsEditable
|
| - final bool invalidIteratorState;
|
| -
|
| - @DomName('XPathResult.numberValue')
|
| - @DocsEditable
|
| - final num numberValue;
|
| -
|
| - @DomName('XPathResult.resultType')
|
| - @DocsEditable
|
| - final int resultType;
|
| -
|
| - @DomName('XPathResult.singleNodeValue')
|
| - @DocsEditable
|
| - final Node singleNodeValue;
|
| -
|
| - @DomName('XPathResult.snapshotLength')
|
| - @DocsEditable
|
| - final int snapshotLength;
|
| -
|
| - @DomName('XPathResult.stringValue')
|
| - @DocsEditable
|
| - final String stringValue;
|
| -
|
| - @DomName('XPathResult.iterateNext')
|
| - @DocsEditable
|
| - Node iterateNext() native;
|
| -
|
| - @DomName('XPathResult.snapshotItem')
|
| - @DocsEditable
|
| - Node snapshotItem(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XMLSerializer')
|
| -class XmlSerializer native "XMLSerializer" {
|
| -
|
| - @DomName('XMLSerializer.XMLSerializer')
|
| - @DocsEditable
|
| - factory XmlSerializer() {
|
| - return XmlSerializer._create_1();
|
| - }
|
| - static XmlSerializer _create_1() => JS('XmlSerializer', 'new XMLSerializer()');
|
| -
|
| - @DomName('XMLSerializer.serializeToString')
|
| - @DocsEditable
|
| - String serializeToString(Node node) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('XSLTProcessor')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -class XsltProcessor native "XSLTProcessor" {
|
| -
|
| - @DomName('XSLTProcessor.XSLTProcessor')
|
| - @DocsEditable
|
| - factory XsltProcessor() {
|
| - return XsltProcessor._create_1();
|
| - }
|
| - static XsltProcessor _create_1() => JS('XsltProcessor', 'new XSLTProcessor()');
|
| -
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => JS('bool', '!!(window.XSLTProcessor)');
|
| -
|
| - @DomName('XSLTProcessor.clearParameters')
|
| - @DocsEditable
|
| - void clearParameters() native;
|
| -
|
| - @DomName('XSLTProcessor.getParameter')
|
| - @DocsEditable
|
| - String getParameter(String namespaceURI, String localName) native;
|
| -
|
| - @DomName('XSLTProcessor.importStylesheet')
|
| - @DocsEditable
|
| - void importStylesheet(Node stylesheet) native;
|
| -
|
| - @DomName('XSLTProcessor.removeParameter')
|
| - @DocsEditable
|
| - void removeParameter(String namespaceURI, String localName) native;
|
| -
|
| - @DomName('XSLTProcessor.reset')
|
| - @DocsEditable
|
| - void reset() native;
|
| -
|
| - @DomName('XSLTProcessor.setParameter')
|
| - @DocsEditable
|
| - void setParameter(String namespaceURI, String localName, String value) native;
|
| -
|
| - @DomName('XSLTProcessor.transformToDocument')
|
| - @DocsEditable
|
| - Document transformToDocument(Node source) native;
|
| -
|
| - @DomName('XSLTProcessor.transformToFragment')
|
| - @DocsEditable
|
| - DocumentFragment transformToFragment(Node source, Document docVal) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('CSSPrimitiveValue')
|
| -abstract class _CSSPrimitiveValue extends _CSSValue native "CSSPrimitiveValue" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('CSSValue')
|
| -abstract class _CSSValue native "CSSValue" {
|
| -}
|
| -// Copyright (c) 2013, 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('ClientRect')
|
| -class _ClientRect implements Rect native "ClientRect" {
|
| -
|
| - // NOTE! All code below should be common with Rect.
|
| - // TODO(blois): implement with mixins when available.
|
| -
|
| - String toString() {
|
| - return '($left, $top, $width, $height)';
|
| - }
|
| -
|
| - bool operator ==(other) {
|
| - if (other is !Rect) return false;
|
| - return left == other.left && top == other.top && width == other.width &&
|
| - height == other.height;
|
| - }
|
| -
|
| - /**
|
| - * Computes the intersection of this rectangle and the rectangle parameter.
|
| - * Returns null if there is no intersection.
|
| - */
|
| - Rect intersection(Rect rect) {
|
| - var x0 = max(left, rect.left);
|
| - var x1 = min(left + width, rect.left + rect.width);
|
| -
|
| - if (x0 <= x1) {
|
| - var y0 = max(top, rect.top);
|
| - var y1 = min(top + height, rect.top + rect.height);
|
| -
|
| - if (y0 <= y1) {
|
| - return new Rect(x0, y0, x1 - x0, y1 - y0);
|
| - }
|
| - }
|
| - return null;
|
| - }
|
| -
|
| -
|
| - /**
|
| - * Returns whether a rectangle intersects this rectangle.
|
| - */
|
| - bool intersects(Rect other) {
|
| - return (left <= other.left + other.width && other.left <= left + width &&
|
| - top <= other.top + other.height && other.top <= top + height);
|
| - }
|
| -
|
| - /**
|
| - * Returns a new rectangle which completely contains this rectangle and the
|
| - * input rectangle.
|
| - */
|
| - Rect union(Rect rect) {
|
| - var right = max(this.left + this.width, rect.left + rect.width);
|
| - var bottom = max(this.top + this.height, rect.top + rect.height);
|
| -
|
| - var left = min(this.left, rect.left);
|
| - var top = min(this.top, rect.top);
|
| -
|
| - return new Rect(left, top, right - left, bottom - top);
|
| - }
|
| -
|
| - /**
|
| - * Tests whether this rectangle entirely contains another rectangle.
|
| - */
|
| - bool containsRect(Rect another) {
|
| - return left <= another.left &&
|
| - left + width >= another.left + another.width &&
|
| - top <= another.top &&
|
| - top + height >= another.top + another.height;
|
| - }
|
| -
|
| - /**
|
| - * Tests whether this rectangle entirely contains a point.
|
| - */
|
| - bool containsPoint(Point another) {
|
| - return another.x >= left &&
|
| - another.x <= left + width &&
|
| - another.y >= top &&
|
| - another.y <= top + height;
|
| - }
|
| -
|
| - Rect ceil() => new Rect(left.ceil(), top.ceil(), width.ceil(), height.ceil());
|
| - Rect floor() => new Rect(left.floor(), top.floor(), width.floor(),
|
| - height.floor());
|
| - Rect round() => new Rect(left.round(), top.round(), width.round(),
|
| - height.round());
|
| -
|
| - /**
|
| - * Truncates coordinates to integers and returns the result as a new
|
| - * rectangle.
|
| - */
|
| - Rect toInt() => new Rect(left.toInt(), top.toInt(), width.toInt(),
|
| - height.toInt());
|
| -
|
| - Point get topLeft => new Point(this.left, this.top);
|
| - Point get bottomRight => new Point(this.left + this.width,
|
| - this.top + this.height);
|
| -
|
| - @DomName('ClientRect.bottom')
|
| - @DocsEditable
|
| - final num bottom;
|
| -
|
| - @DomName('ClientRect.height')
|
| - @DocsEditable
|
| - final num height;
|
| -
|
| - @DomName('ClientRect.left')
|
| - @DocsEditable
|
| - final num left;
|
| -
|
| - @DomName('ClientRect.right')
|
| - @DocsEditable
|
| - final num right;
|
| -
|
| - @DomName('ClientRect.top')
|
| - @DocsEditable
|
| - final num top;
|
| -
|
| - @DomName('ClientRect.width')
|
| - @DocsEditable
|
| - final num width;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('ClientRectList')
|
| -class _ClientRectList implements JavaScriptIndexingBehavior, List<Rect> native "ClientRectList" {
|
| -
|
| - @DomName('ClientRectList.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - Rect operator[](int index) => JS("Rect", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, Rect value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Rect> mixins.
|
| - // Rect is the element type.
|
| -
|
| - // From Iterable<Rect>:
|
| -
|
| - Iterator<Rect> get 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<Rect>(this);
|
| - }
|
| -
|
| - Rect reduce(Rect combine(Rect value, Rect element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Rect element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(Rect element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Rect element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Rect element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<Rect> where(bool f(Rect element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(Rect element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(Rect element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(Rect element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<Rect> toList({ bool growable: true }) =>
|
| - new List<Rect>.from(this, growable: growable);
|
| -
|
| - Set<Rect> toSet() => new Set<Rect>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Rect> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Rect> takeWhile(bool test(Rect value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Rect> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Rect> skipWhile(bool test(Rect value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Rect firstWhere(bool test(Rect value), { Rect orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Rect lastWhere(bool test(Rect value), {Rect orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Rect singleWhere(bool test(Rect value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Rect elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Rect>:
|
| -
|
| - void add(Rect value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Rect> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Rect>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Rect> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Rect a, Rect b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(Rect element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(Rect element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - Rect get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Rect get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Rect get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Rect element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Rect> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Rect> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Rect removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Rect removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Rect element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Rect element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Rect> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Rect> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Rect fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Rect> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Rect> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Rect>[]);
|
| - }
|
| -
|
| - Map<int, Rect> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Rect> mixins.
|
| -
|
| - @DomName('ClientRectList.item')
|
| - @DocsEditable
|
| - Rect item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('Counter')
|
| -abstract class _Counter native "Counter" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('CSSRuleList')
|
| -class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "CSSRuleList" {
|
| -
|
| - @DomName('CSSRuleList.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - CssRule operator[](int index) => JS("CssRule", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, CssRule value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<CssRule> mixins.
|
| - // CssRule is the element type.
|
| -
|
| - // From Iterable<CssRule>:
|
| -
|
| - Iterator<CssRule> get 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);
|
| - }
|
| -
|
| - CssRule reduce(CssRule combine(CssRule value, CssRule element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, CssRule element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(CssRule element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(CssRule element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(CssRule element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<CssRule> where(bool f(CssRule element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(CssRule element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(CssRule element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(CssRule element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<CssRule> toList({ bool growable: true }) =>
|
| - new List<CssRule>.from(this, growable: growable);
|
| -
|
| - Set<CssRule> toSet() => new Set<CssRule>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<CssRule> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<CssRule> takeWhile(bool test(CssRule value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<CssRule> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<CssRule> skipWhile(bool test(CssRule value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - CssRule firstWhere(bool test(CssRule value), { CssRule orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - CssRule lastWhere(bool test(CssRule value), {CssRule orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - CssRule singleWhere(bool test(CssRule value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - CssRule elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<CssRule>:
|
| -
|
| - void add(CssRule value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<CssRule> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<CssRule>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<CssRule> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(CssRule a, CssRule b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - CssRule get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - CssRule get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, CssRule element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<CssRule> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<CssRule> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - CssRule removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - CssRule removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(CssRule element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(CssRule element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<CssRule> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<CssRule> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [CssRule fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<CssRule> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<CssRule> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <CssRule>[]);
|
| - }
|
| -
|
| - Map<int, CssRule> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<CssRule> mixins.
|
| -
|
| - @DomName('CSSRuleList.item')
|
| - @DocsEditable
|
| - CssRule item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('CSSValueList')
|
| -class _CssValueList extends _CSSValue implements JavaScriptIndexingBehavior, List<_CSSValue> native "CSSValueList" {
|
| -
|
| - @DomName('CSSValueList.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - _CSSValue operator[](int index) => JS("_CSSValue", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, _CSSValue value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<_CSSValue> mixins.
|
| - // _CSSValue is the element type.
|
| -
|
| - // From Iterable<_CSSValue>:
|
| -
|
| - Iterator<_CSSValue> get 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);
|
| - }
|
| -
|
| - _CSSValue reduce(_CSSValue combine(_CSSValue value, _CSSValue element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, _CSSValue element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(_CSSValue element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(_CSSValue element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(_CSSValue element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<_CSSValue> where(bool f(_CSSValue element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(_CSSValue element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(_CSSValue element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(_CSSValue element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<_CSSValue> toList({ bool growable: true }) =>
|
| - new List<_CSSValue>.from(this, growable: growable);
|
| -
|
| - Set<_CSSValue> toSet() => new Set<_CSSValue>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<_CSSValue> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<_CSSValue> takeWhile(bool test(_CSSValue value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<_CSSValue> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<_CSSValue> skipWhile(bool test(_CSSValue value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - _CSSValue firstWhere(bool test(_CSSValue value), { _CSSValue orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - _CSSValue lastWhere(bool test(_CSSValue value), {_CSSValue orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - _CSSValue singleWhere(bool test(_CSSValue value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - _CSSValue elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<_CSSValue>:
|
| -
|
| - void add(_CSSValue value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<_CSSValue> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<_CSSValue>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<_CSSValue> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(_CSSValue a, _CSSValue b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - _CSSValue get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - _CSSValue get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, _CSSValue element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<_CSSValue> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<_CSSValue> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - _CSSValue removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - _CSSValue removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(_CSSValue element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(_CSSValue element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<_CSSValue> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<_CSSValue> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [_CSSValue fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<_CSSValue> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<_CSSValue> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <_CSSValue>[]);
|
| - }
|
| -
|
| - Map<int, _CSSValue> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<_CSSValue> mixins.
|
| -
|
| - @DomName('CSSValueList.item')
|
| - @DocsEditable
|
| - _CSSValue item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DOMFileSystemSync')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@Experimental
|
| -abstract class _DOMFileSystemSync native "DOMFileSystemSync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DatabaseSync')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -@Experimental
|
| -abstract class _DatabaseSync native "DatabaseSync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DedicatedWorkerContext')
|
| -abstract class _DedicatedWorkerContext extends _WorkerContext native "DedicatedWorkerContext" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DirectoryEntrySync')
|
| -abstract class _DirectoryEntrySync extends _EntrySync native "DirectoryEntrySync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DirectoryReaderSync')
|
| -abstract class _DirectoryReaderSync native "DirectoryReaderSync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('WebKitPoint')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -@Experimental
|
| -class _DomPoint native "WebKitPoint" {
|
| -
|
| - @DomName('DOMPoint.DOMPoint')
|
| - @DocsEditable
|
| - factory _DomPoint(num x, num y) {
|
| - return _DomPoint._create_1(x, y);
|
| - }
|
| - static _DomPoint _create_1(x, y) => JS('_DomPoint', 'new WebKitPoint(#,#)', x, y);
|
| -
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => JS('bool', '!!(window.WebKitPoint)');
|
| -
|
| - @DomName('DOMPoint.x')
|
| - @DocsEditable
|
| - num x;
|
| -
|
| - @DomName('DOMPoint.y')
|
| - @DocsEditable
|
| - num y;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('EntryArray')
|
| -class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "EntryArray" {
|
| -
|
| - @DomName('EntryArray.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - Entry operator[](int index) => JS("Entry", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, Entry value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Entry> mixins.
|
| - // Entry is the element type.
|
| -
|
| - // From Iterable<Entry>:
|
| -
|
| - Iterator<Entry> get 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);
|
| - }
|
| -
|
| - Entry reduce(Entry combine(Entry value, Entry element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Entry element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(Entry element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Entry element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Entry element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<Entry> where(bool f(Entry element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(Entry element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(Entry element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(Entry element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<Entry> toList({ bool growable: true }) =>
|
| - new List<Entry>.from(this, growable: growable);
|
| -
|
| - Set<Entry> toSet() => new Set<Entry>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Entry> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Entry> takeWhile(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Entry> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Entry> skipWhile(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Entry firstWhere(bool test(Entry value), { Entry orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Entry lastWhere(bool test(Entry value), {Entry orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Entry singleWhere(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Entry elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Entry>:
|
| -
|
| - void add(Entry value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Entry>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Entry> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Entry a, Entry b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Entry get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Entry get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, Entry element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Entry removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Entry removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(Entry element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Entry element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Entry> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Entry fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Entry> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Entry> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Entry>[]);
|
| - }
|
| -
|
| - Map<int, Entry> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Entry> mixins.
|
| -
|
| - @DomName('EntryArray.item')
|
| - @DocsEditable
|
| - Entry item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('EntryArraySync')
|
| -class _EntryArraySync implements JavaScriptIndexingBehavior, List<_EntrySync> native "EntryArraySync" {
|
| -
|
| - @DomName('EntryArraySync.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - _EntrySync operator[](int index) => JS("_EntrySync", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, _EntrySync value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<_EntrySync> mixins.
|
| - // _EntrySync is the element type.
|
| -
|
| - // From Iterable<_EntrySync>:
|
| -
|
| - Iterator<_EntrySync> get 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);
|
| - }
|
| -
|
| - _EntrySync reduce(_EntrySync combine(_EntrySync value, _EntrySync element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, _EntrySync element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(_EntrySync element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(_EntrySync element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<_EntrySync> where(bool f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(_EntrySync element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(_EntrySync element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<_EntrySync> toList({ bool growable: true }) =>
|
| - new List<_EntrySync>.from(this, growable: growable);
|
| -
|
| - Set<_EntrySync> toSet() => new Set<_EntrySync>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<_EntrySync> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<_EntrySync> takeWhile(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<_EntrySync> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<_EntrySync> skipWhile(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - _EntrySync firstWhere(bool test(_EntrySync value), { _EntrySync orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - _EntrySync lastWhere(bool test(_EntrySync value), {_EntrySync orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - _EntrySync singleWhere(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - _EntrySync elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<_EntrySync>:
|
| -
|
| - void add(_EntrySync value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<_EntrySync>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<_EntrySync> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(_EntrySync a, _EntrySync b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - _EntrySync get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - _EntrySync get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, _EntrySync element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - _EntrySync removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - _EntrySync removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(_EntrySync element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(_EntrySync element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<_EntrySync> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [_EntrySync fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<_EntrySync> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<_EntrySync> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <_EntrySync>[]);
|
| - }
|
| -
|
| - Map<int, _EntrySync> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<_EntrySync> mixins.
|
| -
|
| - @DomName('EntryArraySync.item')
|
| - @DocsEditable
|
| - _EntrySync item(int index) native;
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('EntrySync')
|
| -abstract class _EntrySync native "EntrySync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('FileEntrySync')
|
| -abstract class _FileEntrySync extends _EntrySync native "FileEntrySync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('FileReaderSync')
|
| -abstract class _FileReaderSync native "FileReaderSync" {
|
| -
|
| - @DomName('FileReaderSync.FileReaderSync')
|
| - @DocsEditable
|
| - factory _FileReaderSync() {
|
| - return _FileReaderSync._create_1();
|
| - }
|
| - static _FileReaderSync _create_1() => JS('_FileReaderSync', 'new FileReaderSync()');
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('FileWriterSync')
|
| -abstract class _FileWriterSync native "FileWriterSync" {
|
| -}
|
| -// 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('GamepadList')
|
| -class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "GamepadList" {
|
| -
|
| - @DomName('GamepadList.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - Gamepad operator[](int index) => JS("Gamepad", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, Gamepad value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Gamepad> mixins.
|
| - // Gamepad is the element type.
|
| -
|
| - // From Iterable<Gamepad>:
|
| -
|
| - Iterator<Gamepad> get 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);
|
| - }
|
| -
|
| - Gamepad reduce(Gamepad combine(Gamepad value, Gamepad element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Gamepad element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(Gamepad element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Gamepad element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Gamepad element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<Gamepad> where(bool f(Gamepad element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('DOMWindow.onpopstate')
|
| + @DocsEditable
|
| + Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
|
|
|
| - Iterable expand(Iterable f(Gamepad element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMWindow.onreset')
|
| + @DocsEditable
|
| + Stream<Event> get onReset => Element.resetEvent.forTarget(this);
|
|
|
| - bool every(bool f(Gamepad element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMWindow.onresize')
|
| + @DocsEditable
|
| + Stream<Event> get onResize => resizeEvent.forTarget(this);
|
|
|
| - bool any(bool f(Gamepad element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('DOMWindow.onscroll')
|
| + @DocsEditable
|
| + Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
|
|
|
| - List<Gamepad> toList({ bool growable: true }) =>
|
| - new List<Gamepad>.from(this, growable: growable);
|
| + @DomName('DOMWindow.onsearch')
|
| + @DocsEditable
|
| + Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
|
|
|
| - Set<Gamepad> toSet() => new Set<Gamepad>.from(this);
|
| + @DomName('DOMWindow.onselect')
|
| + @DocsEditable
|
| + Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('DOMWindow.onstorage')
|
| + @DocsEditable
|
| + Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @DomName('DOMWindow.onsubmit')
|
| + @DocsEditable
|
| + Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> takeWhile(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.ontouchcancel')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('DOMWindow.ontouchend')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> skipWhile(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.ontouchmove')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
|
|
|
| - Gamepad firstWhere(bool test(Gamepad value), { Gamepad orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.ontouchstart')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
|
|
|
| - Gamepad lastWhere(bool test(Gamepad value), {Gamepad orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.onunload')
|
| + @DocsEditable
|
| + Stream<Event> get onUnload => unloadEvent.forTarget(this);
|
|
|
| - Gamepad singleWhere(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + @DomName('DOMWindow.onwebkitAnimationEnd')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationEnd => animationEndEvent.forTarget(this);
|
|
|
| - Gamepad elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('DOMWindow.onwebkitAnimationIteration')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationIteration => animationIterationEvent.forTarget(this);
|
|
|
| - // From Collection<Gamepad>:
|
| + @DomName('DOMWindow.onwebkitAnimationStart')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationStart => animationStartEvent.forTarget(this);
|
|
|
| - void add(Gamepad value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.onwebkitTransitionEnd')
|
| + @DocsEditable
|
| + Stream<TransitionEvent> get onTransitionEnd => Element.transitionEndEvent.forTarget(this);
|
|
|
| - void addAll(Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - // From List<Gamepad>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('DOMWindow.beforeunloadEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<BeforeUnloadEvent> beforeUnloadEvent =
|
| + const _BeforeUnloadEventStreamProvider('beforeunload');
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('DOMWindow.onbeforeunload')
|
| + @DocsEditable
|
| + Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
|
| +}
|
|
|
| - Iterable<Gamepad> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| +/**
|
| + * Event object that is fired before the window is closed.
|
| + *
|
| + * The standard window close behavior can be prevented by setting the
|
| + * [returnValue]. This will display a dialog to the user confirming that they
|
| + * want to close the page.
|
| + */
|
| +abstract class BeforeUnloadEvent implements Event {
|
| + /**
|
| + * If set to a non-null value, a dialog will be presented to the user
|
| + * confirming that they want to close the page.
|
| + */
|
| + String returnValue;
|
| +}
|
|
|
| - void sort([int compare(Gamepad a, Gamepad b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| +class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent {
|
| + String _returnValue;
|
|
|
| - int indexOf(Gamepad element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| + _BeforeUnloadEvent(Event base): super(base);
|
|
|
| - int lastIndexOf(Gamepad element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| + String get returnValue => _returnValue;
|
|
|
| - Gamepad get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| + void set returnValue(String value) {
|
| + _returnValue = value;
|
| + // FF and IE use the value as the return value, Chrome will return this from
|
| + // the event callback function.
|
| + if (JS('bool', '("returnValue" in #)', _base)) {
|
| + JS('void', '#.returnValue = #', _base, value);
|
| + }
|
| }
|
| +}
|
|
|
| - Gamepad get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| +class _BeforeUnloadEventStreamProvider implements
|
| + EventStreamProvider<BeforeUnloadEvent> {
|
| + final String _eventType;
|
|
|
| - Gamepad get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + const _BeforeUnloadEventStreamProvider(this._eventType);
|
|
|
| - void insert(int index, Gamepad element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + Stream<BeforeUnloadEvent> forTarget(EventTarget e, {bool useCapture: false}) {
|
| + var controller = new StreamController();
|
| + var stream = new _EventStream(e, _eventType, useCapture);
|
| + stream.listen((event) {
|
| + var wrapped = new _BeforeUnloadEvent(event);
|
| + controller.add(wrapped);
|
| + return wrapped.returnValue;
|
| + });
|
|
|
| - void insertAll(int index, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + return controller.stream;
|
| }
|
|
|
| - void setAll(int index, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + String getEventType(EventTarget target) {
|
| + return _eventType;
|
| }
|
| +}
|
| +// 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.
|
|
|
| - Gamepad removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - Gamepad removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('Worker')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +class Worker extends AbstractWorker native "Worker" {
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('Worker.messageEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
|
|
|
| - void removeWhere(bool test(Gamepad element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + @DomName('Worker.Worker')
|
| + @DocsEditable
|
| + factory Worker(String scriptUrl) {
|
| + return Worker._create_1(scriptUrl);
|
| }
|
| + static Worker _create_1(scriptUrl) => JS('Worker', 'new Worker(#)', scriptUrl);
|
|
|
| - void retainWhere(bool test(Gamepad element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '(typeof window.Worker != "undefined")');
|
|
|
| - void setRange(int start, int end, Iterable<Gamepad> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| + @DomName('Worker.postMessage')
|
| + @DocsEditable
|
| + void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) native;
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| + @DomName('Worker.terminate')
|
| + @DocsEditable
|
| + void terminate() native;
|
|
|
| - void replaceRange(int start, int end, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('Worker.onmessage')
|
| + @DocsEditable
|
| + Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
|
| +}
|
| +// 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.
|
|
|
| - void fillRange(int start, int end, [Gamepad fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
|
|
| - Iterable<Gamepad> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| +@DocsEditable
|
| +@DomName('XPathEvaluator')
|
| +class XPathEvaluator native "XPathEvaluator" {
|
|
|
| - List<Gamepad> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Gamepad>[]);
|
| + @DomName('XPathEvaluator.XPathEvaluator')
|
| + @DocsEditable
|
| + factory XPathEvaluator() {
|
| + return XPathEvaluator._create_1();
|
| }
|
| + static XPathEvaluator _create_1() => JS('XPathEvaluator', 'new XPathEvaluator()');
|
|
|
| - Map<int, Gamepad> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @DomName('XPathEvaluator.createExpression')
|
| + @DocsEditable
|
| + XPathExpression createExpression(String expression, XPathNSResolver resolver) native;
|
|
|
| - // -- end List<Gamepad> mixins.
|
| + @DomName('XPathEvaluator.createNSResolver')
|
| + @DocsEditable
|
| + XPathNSResolver createNSResolver(Node nodeResolver) native;
|
|
|
| - @DomName('GamepadList.item')
|
| + @DomName('XPathEvaluator.evaluate')
|
| @DocsEditable
|
| - Gamepad item(int index) native;
|
| + XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native;
|
| }
|
| // 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
|
| @@ -25282,35 +21290,28 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLAppletElement')
|
| -abstract class _HTMLAppletElement extends Element native "HTMLAppletElement" {
|
| -}
|
| -// 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.
|
| +@DomName('XPathException')
|
| +class XPathException native "XPathException" {
|
|
|
| + static const int INVALID_EXPRESSION_ERR = 51;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLBaseFontElement')
|
| -abstract class _HTMLBaseFontElement extends Element native "HTMLBaseFontElement" {
|
| -}
|
| -// 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.
|
| + static const int TYPE_ERR = 52;
|
|
|
| + @DomName('XPathException.code')
|
| + @DocsEditable
|
| + final int code;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLDirectoryElement')
|
| -abstract class _HTMLDirectoryElement extends Element native "HTMLDirectoryElement" {
|
| -}
|
| -// 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.
|
| + @DomName('XPathException.message')
|
| + @DocsEditable
|
| + final String message;
|
|
|
| + @DomName('XPathException.name')
|
| + @DocsEditable
|
| + final String name;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLFontElement')
|
| -abstract class _HTMLFontElement extends Element native "HTMLFontElement" {
|
| + @DomName('XPathException.toString')
|
| + @DocsEditable
|
| + String toString() native;
|
| }
|
| // 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
|
| @@ -25318,8 +21319,12 @@ abstract class _HTMLFontElement extends Element native "HTMLFontElement" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLFrameElement')
|
| -abstract class _HTMLFrameElement extends Element native "HTMLFrameElement" {
|
| +@DomName('XPathExpression')
|
| +class XPathExpression native "XPathExpression" {
|
| +
|
| + @DomName('XPathExpression.evaluate')
|
| + @DocsEditable
|
| + XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native;
|
| }
|
| // 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
|
| @@ -25327,8 +21332,13 @@ abstract class _HTMLFrameElement extends Element native "HTMLFrameElement" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLFrameSetElement')
|
| -abstract class _HTMLFrameSetElement extends Element native "HTMLFrameSetElement" {
|
| +@DomName('XPathNSResolver')
|
| +class XPathNSResolver native "XPathNSResolver" {
|
| +
|
| + @JSName('lookupNamespaceURI')
|
| + @DomName('XPathNSResolver.lookupNamespaceURI')
|
| + @DocsEditable
|
| + String lookupNamespaceUri(String prefix) native;
|
| }
|
| // 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
|
| @@ -25336,249 +21346,281 @@ abstract class _HTMLFrameSetElement extends Element native "HTMLFrameSetElement"
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLMarqueeElement')
|
| -abstract class _HTMLMarqueeElement extends Element native "HTMLMarqueeElement" {
|
| -}
|
| -// 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.
|
| +@DomName('XPathResult')
|
| +class XPathResult native "XPathResult" {
|
|
|
| + static const int ANY_TYPE = 0;
|
|
|
| -@DocsEditable
|
| -@DomName('NamedNodeMap')
|
| -class _NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap" {
|
| + static const int ANY_UNORDERED_NODE_TYPE = 8;
|
|
|
| - @DomName('NamedNodeMap.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| + static const int BOOLEAN_TYPE = 3;
|
|
|
| - Node operator[](int index) => JS("Node", "#[#]", this, index);
|
| + static const int FIRST_ORDERED_NODE_TYPE = 9;
|
|
|
| - void operator[]=(int index, Node value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Node> mixins.
|
| - // Node is the element type.
|
| + static const int NUMBER_TYPE = 1;
|
|
|
| - // From Iterable<Node>:
|
| + static const int ORDERED_NODE_ITERATOR_TYPE = 5;
|
|
|
| - Iterator<Node> get 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);
|
| - }
|
| + static const int ORDERED_NODE_SNAPSHOT_TYPE = 7;
|
|
|
| - Node reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + static const int STRING_TYPE = 2;
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Node element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + static const int UNORDERED_NODE_ITERATOR_TYPE = 4;
|
|
|
| - bool contains(Node element) => IterableMixinWorkaround.contains(this, element);
|
| + static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;
|
|
|
| - void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('XPathResult.booleanValue')
|
| + @DocsEditable
|
| + final bool booleanValue;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('XPathResult.invalidIteratorState')
|
| + @DocsEditable
|
| + final bool invalidIteratorState;
|
|
|
| - Iterable map(f(Node element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('XPathResult.numberValue')
|
| + @DocsEditable
|
| + final num numberValue;
|
|
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('XPathResult.resultType')
|
| + @DocsEditable
|
| + final int resultType;
|
|
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('XPathResult.singleNodeValue')
|
| + @DocsEditable
|
| + final Node singleNodeValue;
|
|
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('XPathResult.snapshotLength')
|
| + @DocsEditable
|
| + final int snapshotLength;
|
|
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('XPathResult.stringValue')
|
| + @DocsEditable
|
| + final String stringValue;
|
|
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| + @DomName('XPathResult.iterateNext')
|
| + @DocsEditable
|
| + Node iterateNext() native;
|
|
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| + @DomName('XPathResult.snapshotItem')
|
| + @DocsEditable
|
| + Node snapshotItem(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - bool get isEmpty => this.length == 0;
|
|
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| +@DocsEditable
|
| +@DomName('XMLSerializer')
|
| +class XmlSerializer native "XMLSerializer" {
|
|
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| + @DomName('XMLSerializer.XMLSerializer')
|
| + @DocsEditable
|
| + factory XmlSerializer() {
|
| + return XmlSerializer._create_1();
|
| }
|
| + static XmlSerializer _create_1() => JS('XmlSerializer', 'new XMLSerializer()');
|
|
|
| - Iterable<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('XMLSerializer.serializeToString')
|
| + @DocsEditable
|
| + String serializeToString(Node node) native;
|
| +}
|
| +// 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.
|
|
|
| - Iterable<Node> skipWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
|
|
| - Node firstWhere(bool test(Node value), { Node orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| +@DocsEditable
|
| +@DomName('XSLTProcessor')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +class XsltProcessor native "XSLTProcessor" {
|
|
|
| - Node lastWhere(bool test(Node value), {Node orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| + @DomName('XSLTProcessor.XSLTProcessor')
|
| + @DocsEditable
|
| + factory XsltProcessor() {
|
| + return XsltProcessor._create_1();
|
| }
|
| + static XsltProcessor _create_1() => JS('XsltProcessor', 'new XSLTProcessor()');
|
|
|
| - Node singleWhere(bool test(Node value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '!!(window.XSLTProcessor)');
|
|
|
| - Node elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('XSLTProcessor.clearParameters')
|
| + @DocsEditable
|
| + void clearParameters() native;
|
|
|
| - // From Collection<Node>:
|
| + @DomName('XSLTProcessor.getParameter')
|
| + @DocsEditable
|
| + String getParameter(String namespaceURI, String localName) native;
|
|
|
| - void add(Node value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('XSLTProcessor.importStylesheet')
|
| + @DocsEditable
|
| + void importStylesheet(Node stylesheet) native;
|
|
|
| - void addAll(Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('XSLTProcessor.removeParameter')
|
| + @DocsEditable
|
| + void removeParameter(String namespaceURI, String localName) native;
|
|
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('XSLTProcessor.reset')
|
| + @DocsEditable
|
| + void reset() native;
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('XSLTProcessor.setParameter')
|
| + @DocsEditable
|
| + void setParameter(String namespaceURI, String localName, String value) native;
|
|
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('XSLTProcessor.transformToDocument')
|
| + @DocsEditable
|
| + Document transformToDocument(Node source) native;
|
|
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| + @DomName('XSLTProcessor.transformToFragment')
|
| + @DocsEditable
|
| + DocumentFragment transformToFragment(Node source, Document docVal) native;
|
| +}
|
| +// 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.
|
|
|
| - 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);
|
| - }
|
| +@DocsEditable
|
| +@DomName('CSSPrimitiveValue')
|
| +abstract class _CSSPrimitiveValue extends _CSSValue native "CSSPrimitiveValue" {
|
| +}
|
| +// 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.
|
|
|
| - Node get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
|
|
| - Node get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| +@DocsEditable
|
| +@DomName('CSSValue')
|
| +abstract class _CSSValue native "CSSValue" {
|
| +}
|
| +// Copyright (c) 2013, 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.
|
|
|
| - Node get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
|
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('ClientRect')
|
| +class _ClientRect implements Rect native "ClientRect" {
|
|
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + // NOTE! All code below should be common with Rect.
|
| + // TODO(blois): implement with mixins when available.
|
|
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + String toString() {
|
| + return '($left, $top, $width, $height)';
|
| }
|
|
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + bool operator ==(other) {
|
| + if (other is !Rect) return false;
|
| + return left == other.left && top == other.top && width == other.width &&
|
| + height == other.height;
|
| }
|
|
|
| - Node removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + /**
|
| + * Computes the intersection of this rectangle and the rectangle parameter.
|
| + * Returns null if there is no intersection.
|
| + */
|
| + Rect intersection(Rect rect) {
|
| + var x0 = max(left, rect.left);
|
| + var x1 = min(left + width, rect.left + rect.width);
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + if (x0 <= x1) {
|
| + var y0 = max(top, rect.top);
|
| + var y1 = min(top + height, rect.top + rect.height);
|
|
|
| - void removeWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + if (y0 <= y1) {
|
| + return new Rect(x0, y0, x1 - x0, y1 - y0);
|
| + }
|
| + }
|
| + return null;
|
| }
|
|
|
| - void retainWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - void setRange(int start, int end, Iterable<Node> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| + /**
|
| + * Returns whether a rectangle intersects this rectangle.
|
| + */
|
| + bool intersects(Rect other) {
|
| + return (left <= other.left + other.width && other.left <= left + width &&
|
| + top <= other.top + other.height && other.top <= top + height);
|
| }
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| + /**
|
| + * Returns a new rectangle which completely contains this rectangle and the
|
| + * input rectangle.
|
| + */
|
| + Rect union(Rect rect) {
|
| + var right = max(this.left + this.width, rect.left + rect.width);
|
| + var bottom = max(this.top + this.height, rect.top + rect.height);
|
|
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + var left = min(this.left, rect.left);
|
| + var top = min(this.top, rect.top);
|
| +
|
| + return new Rect(left, top, right - left, bottom - top);
|
| }
|
|
|
| - void fillRange(int start, int end, [Node fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + /**
|
| + * Tests whether this rectangle entirely contains another rectangle.
|
| + */
|
| + bool containsRect(Rect another) {
|
| + return left <= another.left &&
|
| + left + width >= another.left + another.width &&
|
| + top <= another.top &&
|
| + top + height >= another.top + another.height;
|
| }
|
|
|
| - Iterable<Node> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Node> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Node>[]);
|
| + /**
|
| + * Tests whether this rectangle entirely contains a point.
|
| + */
|
| + bool containsPoint(Point another) {
|
| + return another.x >= left &&
|
| + another.x <= left + width &&
|
| + another.y >= top &&
|
| + another.y <= top + height;
|
| }
|
|
|
| - Map<int, Node> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + Rect ceil() => new Rect(left.ceil(), top.ceil(), width.ceil(), height.ceil());
|
| + Rect floor() => new Rect(left.floor(), top.floor(), width.floor(),
|
| + height.floor());
|
| + Rect round() => new Rect(left.round(), top.round(), width.round(),
|
| + height.round());
|
|
|
| - // -- end List<Node> mixins.
|
| + /**
|
| + * Truncates coordinates to integers and returns the result as a new
|
| + * rectangle.
|
| + */
|
| + Rect toInt() => new Rect(left.toInt(), top.toInt(), width.toInt(),
|
| + height.toInt());
|
|
|
| - @DomName('NamedNodeMap.getNamedItem')
|
| - @DocsEditable
|
| - Node getNamedItem(String name) native;
|
| + Point get topLeft => new Point(this.left, this.top);
|
| + Point get bottomRight => new Point(this.left + this.width,
|
| + this.top + this.height);
|
|
|
| - @DomName('NamedNodeMap.getNamedItemNS')
|
| + @DomName('ClientRect.bottom')
|
| @DocsEditable
|
| - Node getNamedItemNS(String namespaceURI, String localName) native;
|
| + final num bottom;
|
|
|
| - @DomName('NamedNodeMap.item')
|
| + @DomName('ClientRect.height')
|
| @DocsEditable
|
| - Node item(int index) native;
|
| + final num height;
|
|
|
| - @DomName('NamedNodeMap.removeNamedItem')
|
| + @DomName('ClientRect.left')
|
| @DocsEditable
|
| - Node removeNamedItem(String name) native;
|
| + final num left;
|
|
|
| - @DomName('NamedNodeMap.removeNamedItemNS')
|
| + @DomName('ClientRect.right')
|
| @DocsEditable
|
| - Node removeNamedItemNS(String namespaceURI, String localName) native;
|
| + final num right;
|
|
|
| - @DomName('NamedNodeMap.setNamedItem')
|
| + @DomName('ClientRect.top')
|
| @DocsEditable
|
| - Node setNamedItem(Node node) native;
|
| + final num top;
|
|
|
| - @DomName('NamedNodeMap.setNamedItemNS')
|
| + @DomName('ClientRect.width')
|
| @DocsEditable
|
| - Node setNamedItemNS(Node node) native;
|
| + final num width;
|
| }
|
| // 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
|
| @@ -25586,46 +21628,31 @@ class _NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "Na
|
|
|
|
|
| @DocsEditable
|
| -@DomName('RGBColor')
|
| -abstract class _RGBColor native "RGBColor" {
|
| -}
|
| -// Copyright (c) 2013, 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.
|
| +@DomName('ClientRectList')
|
| +class _ClientRectList extends Object with ListMixin<Rect>, ImmutableListMixin<Rect> implements JavaScriptIndexingBehavior, List<Rect> native "ClientRectList" {
|
|
|
| + @DomName('ClientRectList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| -// Omit RadioNodeList for dart2js. The Dart Form and FieldSet APIs don't
|
| -// currently expose an API the returns RadioNodeList. The only use of a
|
| -// RadioNodeList is to get the selected value and it will be cleaner to
|
| -// introduce a different API for that purpose.
|
| -// 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.
|
| + Rect operator[](int index) => JS("Rect", "#[#]", this, index);
|
|
|
| + void operator[]=(int index, Rect value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| + }
|
| + // -- start List<Rect> mixins.
|
| + // Rect is the element type.
|
|
|
| -@DocsEditable
|
| -@DomName('Rect')
|
| -abstract class _Rect native "Rect" {
|
| -}
|
| -// 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.
|
|
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| + }
|
|
|
| -@DocsEditable
|
| -@DomName('SharedWorker')
|
| -abstract class _SharedWorker extends AbstractWorker native "SharedWorker" {
|
| + // -- end List<Rect> mixins.
|
|
|
| - @DomName('SharedWorker.SharedWorker')
|
| + @DomName('ClientRectList.item')
|
| @DocsEditable
|
| - factory _SharedWorker(String scriptURL, [String name]) {
|
| - if (?name) {
|
| - return _SharedWorker._create_1(scriptURL, name);
|
| - }
|
| - return _SharedWorker._create_2(scriptURL);
|
| - }
|
| - static _SharedWorker _create_1(scriptURL, name) => JS('_SharedWorker', 'new SharedWorker(#,#)', scriptURL, name);
|
| - static _SharedWorker _create_2(scriptURL) => JS('_SharedWorker', 'new SharedWorker(#)', scriptURL);
|
| + Rect item(int index) native;
|
| }
|
| // 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
|
| @@ -25633,8 +21660,8 @@ abstract class _SharedWorker extends AbstractWorker native "SharedWorker" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('SharedWorkerContext')
|
| -abstract class _SharedWorkerContext extends _WorkerContext native "SharedWorkerContext" {
|
| +@DomName('Counter')
|
| +abstract class _Counter native "Counter" {
|
| }
|
| // 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
|
| @@ -25642,216 +21669,143 @@ abstract class _SharedWorkerContext extends _WorkerContext native "SharedWorkerC
|
|
|
|
|
| @DocsEditable
|
| -@DomName('SpeechInputResultList')
|
| -class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechInputResult> native "SpeechInputResultList" {
|
| +@DomName('CSSRuleList')
|
| +class _CssRuleList extends Object with ListMixin<CssRule>, ImmutableListMixin<CssRule> implements JavaScriptIndexingBehavior, List<CssRule> native "CSSRuleList" {
|
|
|
| - @DomName('SpeechInputResultList.length')
|
| + @DomName('CSSRuleList.length')
|
| @DocsEditable
|
| int get length => JS("int", "#.length", this);
|
|
|
| - SpeechInputResult operator[](int index) => JS("SpeechInputResult", "#[#]", this, index);
|
| + CssRule operator[](int index) => JS("CssRule", "#[#]", this, index);
|
|
|
| - void operator[]=(int index, SpeechInputResult value) {
|
| + void operator[]=(int index, CssRule value) {
|
| throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| - // -- start List<SpeechInputResult> mixins.
|
| - // SpeechInputResult is the element type.
|
| -
|
| - // From Iterable<SpeechInputResult>:
|
| -
|
| - Iterator<SpeechInputResult> get 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);
|
| - }
|
| -
|
| - SpeechInputResult reduce(SpeechInputResult combine(SpeechInputResult value, SpeechInputResult element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, SpeechInputResult element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(SpeechInputResult element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(SpeechInputResult element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(SpeechInputResult element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(SpeechInputResult element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(SpeechInputResult element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(SpeechInputResult element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<SpeechInputResult> toList({ bool growable: true }) =>
|
| - new List<SpeechInputResult>.from(this, growable: growable);
|
| -
|
| - Set<SpeechInputResult> toSet() => new Set<SpeechInputResult>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| + // -- start List<CssRule> mixins.
|
| + // CssRule is the element type.
|
|
|
| - Iterable<SpeechInputResult> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
|
|
| - Iterable<SpeechInputResult> takeWhile(bool test(SpeechInputResult value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - Iterable<SpeechInputResult> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<SpeechInputResult> skipWhile(bool test(SpeechInputResult value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + // -- end List<CssRule> mixins.
|
|
|
| - SpeechInputResult firstWhere(bool test(SpeechInputResult value), { SpeechInputResult orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @DomName('CSSRuleList.item')
|
| + @DocsEditable
|
| + CssRule item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - SpeechInputResult lastWhere(bool test(SpeechInputResult value), {SpeechInputResult orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
|
|
| - SpeechInputResult singleWhere(bool test(SpeechInputResult value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| +@DocsEditable
|
| +@DomName('CSSValueList')
|
| +class _CssValueList extends _CSSValue with ImmutableListMixin<_CSSValue>, ListMixin<_CSSValue> implements JavaScriptIndexingBehavior, List<_CSSValue> native "CSSValueList" {
|
|
|
| - SpeechInputResult elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('CSSValueList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - // From Collection<SpeechInputResult>:
|
| + _CSSValue operator[](int index) => JS("_CSSValue", "#[#]", this, index);
|
|
|
| - void add(SpeechInputResult value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + void operator[]=(int index, _CSSValue value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<_CSSValue> mixins.
|
| + // _CSSValue is the element type.
|
|
|
| - void addAll(Iterable<SpeechInputResult> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - // From List<SpeechInputResult>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<SpeechInputResult> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) {
|
| - throw new UnsupportedError("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 get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SpeechInputResult get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - SpeechInputResult get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + // -- end List<_CSSValue> mixins.
|
|
|
| - void insert(int index, SpeechInputResult element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('CSSValueList.item')
|
| + @DocsEditable
|
| + _CSSValue item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - void insertAll(int index, Iterable<SpeechInputResult> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - void setAll(int index, Iterable<SpeechInputResult> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('DOMFileSystemSync')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@Experimental
|
| +abstract class _DOMFileSystemSync native "DOMFileSystemSync" {
|
| +}
|
| +// 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.
|
|
|
| - SpeechInputResult removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - SpeechInputResult removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('DatabaseSync')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +abstract class _DatabaseSync native "DatabaseSync" {
|
| +}
|
| +// 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.
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - void removeWhere(bool test(SpeechInputResult element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('DedicatedWorkerContext')
|
| +abstract class _DedicatedWorkerContext extends _WorkerContext native "DedicatedWorkerContext" {
|
| +}
|
| +// 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.
|
|
|
| - void retainWhere(bool test(SpeechInputResult element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - void setRange(int start, int end, Iterable<SpeechInputResult> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('DirectoryEntrySync')
|
| +abstract class _DirectoryEntrySync extends _EntrySync native "DirectoryEntrySync" {
|
| +}
|
| +// 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.
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
|
|
| - void replaceRange(int start, int end, Iterable<SpeechInputResult> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('DirectoryReaderSync')
|
| +abstract class _DirectoryReaderSync native "DirectoryReaderSync" {
|
| +}
|
| +// 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.
|
|
|
| - void fillRange(int start, int end, [SpeechInputResult fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
|
|
| - Iterable<SpeechInputResult> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| +@DocsEditable
|
| +@DomName('WebKitPoint')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class _DomPoint native "WebKitPoint" {
|
|
|
| - List<SpeechInputResult> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SpeechInputResult>[]);
|
| + @DomName('DOMPoint.DOMPoint')
|
| + @DocsEditable
|
| + factory _DomPoint(num x, num y) {
|
| + return _DomPoint._create_1(x, y);
|
| }
|
| + static _DomPoint _create_1(x, y) => JS('_DomPoint', 'new WebKitPoint(#,#)', x, y);
|
|
|
| - Map<int, SpeechInputResult> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '!!(window.WebKitPoint)');
|
|
|
| - // -- end List<SpeechInputResult> mixins.
|
| + @DomName('DOMPoint.x')
|
| + @DocsEditable
|
| + num x;
|
|
|
| - @DomName('SpeechInputResultList.item')
|
| + @DomName('DOMPoint.y')
|
| @DocsEditable
|
| - SpeechInputResult item(int index) native;
|
| + num y;
|
| }
|
| // 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
|
| @@ -25859,216 +21813,201 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
|
|
|
|
|
| @DocsEditable
|
| -@DomName('SpeechRecognitionResultList')
|
| -class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<SpeechRecognitionResult> native "SpeechRecognitionResultList" {
|
| +@DomName('EntryArray')
|
| +class _EntryArray extends Object with ImmutableListMixin<Entry>, ListMixin<Entry> implements JavaScriptIndexingBehavior, List<Entry> native "EntryArray" {
|
|
|
| - @DomName('SpeechRecognitionResultList.length')
|
| + @DomName('EntryArray.length')
|
| @DocsEditable
|
| int get length => JS("int", "#.length", this);
|
|
|
| - SpeechRecognitionResult operator[](int index) => JS("SpeechRecognitionResult", "#[#]", this, index);
|
| + Entry operator[](int index) => JS("Entry", "#[#]", this, index);
|
|
|
| - void operator[]=(int index, SpeechRecognitionResult value) {
|
| + void operator[]=(int index, Entry value) {
|
| throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| - // -- start List<SpeechRecognitionResult> mixins.
|
| - // SpeechRecognitionResult is the element type.
|
| -
|
| - // From Iterable<SpeechRecognitionResult>:
|
| -
|
| - Iterator<SpeechRecognitionResult> get 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);
|
| - }
|
| + // -- start List<Entry> mixins.
|
| + // Entry is the element type.
|
|
|
| - SpeechRecognitionResult reduce(SpeechRecognitionResult combine(SpeechRecognitionResult value, SpeechRecognitionResult element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, SpeechRecognitionResult element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - bool contains(SpeechRecognitionResult element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(SpeechRecognitionResult element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(SpeechRecognitionResult element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(SpeechRecognitionResult element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.every(this, f);
|
| + // -- end List<Entry> mixins.
|
|
|
| - bool any(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('EntryArray.item')
|
| + @DocsEditable
|
| + Entry item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - List<SpeechRecognitionResult> toList({ bool growable: true }) =>
|
| - new List<SpeechRecognitionResult>.from(this, growable: growable);
|
|
|
| - Set<SpeechRecognitionResult> toSet() => new Set<SpeechRecognitionResult>.from(this);
|
| +@DocsEditable
|
| +@DomName('EntryArraySync')
|
| +class _EntryArraySync extends Object with ImmutableListMixin<_EntrySync>, ListMixin<_EntrySync> implements JavaScriptIndexingBehavior, List<_EntrySync> native "EntryArraySync" {
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('EntryArraySync.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - Iterable<SpeechRecognitionResult> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + _EntrySync operator[](int index) => JS("_EntrySync", "#[#]", this, index);
|
|
|
| - Iterable<SpeechRecognitionResult> takeWhile(bool test(SpeechRecognitionResult value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| + void operator[]=(int index, _EntrySync value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<_EntrySync> mixins.
|
| + // _EntrySync is the element type.
|
|
|
| - Iterable<SpeechRecognitionResult> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
|
|
| - Iterable<SpeechRecognitionResult> skipWhile(bool test(SpeechRecognitionResult value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - SpeechRecognitionResult firstWhere(bool test(SpeechRecognitionResult value), { SpeechRecognitionResult orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + // -- end List<_EntrySync> mixins.
|
|
|
| - SpeechRecognitionResult lastWhere(bool test(SpeechRecognitionResult value), {SpeechRecognitionResult orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('EntryArraySync.item')
|
| + @DocsEditable
|
| + _EntrySync item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - SpeechRecognitionResult singleWhere(bool test(SpeechRecognitionResult value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
|
|
| - SpeechRecognitionResult elementAt(int index) {
|
| - return this[index];
|
| - }
|
| +@DocsEditable
|
| +@DomName('EntrySync')
|
| +abstract class _EntrySync native "EntrySync" {
|
| +}
|
| +// 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.
|
|
|
| - // From Collection<SpeechRecognitionResult>:
|
|
|
| - void add(SpeechRecognitionResult value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('FileEntrySync')
|
| +abstract class _FileEntrySync extends _EntrySync native "FileEntrySync" {
|
| +}
|
| +// 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.
|
|
|
| - void addAll(Iterable<SpeechRecognitionResult> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - // From List<SpeechRecognitionResult>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('FileReaderSync')
|
| +abstract class _FileReaderSync native "FileReaderSync" {
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| + @DomName('FileReaderSync.FileReaderSync')
|
| + @DocsEditable
|
| + factory _FileReaderSync() {
|
| + return _FileReaderSync._create_1();
|
| }
|
| + static _FileReaderSync _create_1() => JS('_FileReaderSync', 'new FileReaderSync()');
|
| +}
|
| +// 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.
|
|
|
| - Iterable<SpeechRecognitionResult> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
|
|
| - void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('FileWriterSync')
|
| +abstract class _FileWriterSync native "FileWriterSync" {
|
| +}
|
| +// 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.
|
|
|
| - 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);
|
| - }
|
| +@DocsEditable
|
| +@DomName('GamepadList')
|
| +class _GamepadList extends Object with ImmutableListMixin<Gamepad>, ListMixin<Gamepad> implements JavaScriptIndexingBehavior, List<Gamepad> native "GamepadList" {
|
|
|
| - SpeechRecognitionResult get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('GamepadList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - SpeechRecognitionResult get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + Gamepad operator[](int index) => JS("Gamepad", "#[#]", this, index);
|
|
|
| - SpeechRecognitionResult get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| + void operator[]=(int index, Gamepad value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<Gamepad> mixins.
|
| + // Gamepad is the element type.
|
|
|
| - void insert(int index, SpeechRecognitionResult element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - void insertAll(int index, Iterable<SpeechRecognitionResult> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void setAll(int index, Iterable<SpeechRecognitionResult> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + // -- end List<Gamepad> mixins.
|
|
|
| - SpeechRecognitionResult removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('GamepadList.item')
|
| + @DocsEditable
|
| + Gamepad item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - SpeechRecognitionResult removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLAppletElement')
|
| +abstract class _HTMLAppletElement extends Element native "HTMLAppletElement" {
|
| +}
|
| +// 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.
|
|
|
| - void removeWhere(bool test(SpeechRecognitionResult element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - void retainWhere(bool test(SpeechRecognitionResult element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLBaseFontElement')
|
| +abstract class _HTMLBaseFontElement extends Element native "HTMLBaseFontElement" {
|
| +}
|
| +// 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.
|
|
|
| - void setRange(int start, int end, Iterable<SpeechRecognitionResult> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLDirectoryElement')
|
| +abstract class _HTMLDirectoryElement extends Element native "HTMLDirectoryElement" {
|
| +}
|
| +// 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.
|
|
|
| - void replaceRange(int start, int end, Iterable<SpeechRecognitionResult> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
|
|
| - void fillRange(int start, int end, [SpeechRecognitionResult fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLFontElement')
|
| +abstract class _HTMLFontElement extends Element native "HTMLFontElement" {
|
| +}
|
| +// 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.
|
|
|
| - Iterable<SpeechRecognitionResult> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
|
|
| - List<SpeechRecognitionResult> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SpeechRecognitionResult>[]);
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLFrameElement')
|
| +abstract class _HTMLFrameElement extends Element native "HTMLFrameElement" {
|
| +}
|
| +// 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.
|
|
|
| - Map<int, SpeechRecognitionResult> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLFrameSetElement')
|
| +abstract class _HTMLFrameSetElement extends Element native "HTMLFrameSetElement" {
|
| +}
|
| +// 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.
|
|
|
| - // -- end List<SpeechRecognitionResult> mixins.
|
|
|
| - @DomName('SpeechRecognitionResultList.item')
|
| - @DocsEditable
|
| - SpeechRecognitionResult item(int index) native;
|
| +@DocsEditable
|
| +@DomName('HTMLMarqueeElement')
|
| +abstract class _HTMLMarqueeElement extends Element native "HTMLMarqueeElement" {
|
| }
|
| // 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
|
| @@ -26076,209 +22015,200 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
|
|
|
|
|
| @DocsEditable
|
| -@DomName('StyleSheetList')
|
| -class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> native "StyleSheetList" {
|
| +@DomName('NamedNodeMap')
|
| +class _NamedNodeMap extends Object with ImmutableListMixin<Node>, ListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap" {
|
|
|
| - @DomName('StyleSheetList.length')
|
| + @DomName('NamedNodeMap.length')
|
| @DocsEditable
|
| int get length => JS("int", "#.length", this);
|
|
|
| - StyleSheet operator[](int index) => JS("StyleSheet", "#[#]", this, index);
|
| + Node operator[](int index) => JS("Node", "#[#]", this, index);
|
|
|
| - void operator[]=(int index, StyleSheet value) {
|
| + void operator[]=(int index, Node value) {
|
| throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| - // -- start List<StyleSheet> mixins.
|
| - // StyleSheet is the element type.
|
| + // -- start List<Node> mixins.
|
| + // Node is the element type.
|
|
|
| - // From Iterable<StyleSheet>:
|
|
|
| - Iterator<StyleSheet> get iterator {
|
| - // Note: NodeLists are not fixed size. And most probably length shouldn't
|
| - // be cached in both iterator _and_ forEach method. For now caching it
|
| - // for consistency.
|
| - return new FixedSizeListIterator<StyleSheet>(this);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - StyleSheet reduce(StyleSheet combine(StyleSheet value, StyleSheet element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + // -- end List<Node> mixins.
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, StyleSheet element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + @DomName('NamedNodeMap.getNamedItem')
|
| + @DocsEditable
|
| + Node getNamedItem(String name) native;
|
|
|
| - bool contains(StyleSheet element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('NamedNodeMap.getNamedItemNS')
|
| + @DocsEditable
|
| + Node getNamedItemNS(String namespaceURI, String localName) native;
|
|
|
| - void forEach(void f(StyleSheet element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('NamedNodeMap.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('NamedNodeMap.removeNamedItem')
|
| + @DocsEditable
|
| + Node removeNamedItem(String name) native;
|
|
|
| - Iterable map(f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('NamedNodeMap.removeNamedItemNS')
|
| + @DocsEditable
|
| + Node removeNamedItemNS(String namespaceURI, String localName) native;
|
|
|
| - Iterable<StyleSheet> where(bool f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('NamedNodeMap.setNamedItem')
|
| + @DocsEditable
|
| + Node setNamedItem(Node node) native;
|
|
|
| - Iterable expand(Iterable f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('NamedNodeMap.setNamedItemNS')
|
| + @DocsEditable
|
| + Node setNamedItemNS(Node node) native;
|
| +}
|
| +// 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.
|
|
|
| - bool every(bool f(StyleSheet element)) => IterableMixinWorkaround.every(this, f);
|
|
|
| - bool any(bool f(StyleSheet element)) => IterableMixinWorkaround.any(this, f);
|
| +@DocsEditable
|
| +@DomName('RGBColor')
|
| +abstract class _RGBColor native "RGBColor" {
|
| +}
|
| +// Copyright (c) 2013, 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.
|
|
|
| - List<StyleSheet> toList({ bool growable: true }) =>
|
| - new List<StyleSheet>.from(this, growable: growable);
|
|
|
| - Set<StyleSheet> toSet() => new Set<StyleSheet>.from(this);
|
| +// Omit RadioNodeList for dart2js. The Dart Form and FieldSet APIs don't
|
| +// currently expose an API the returns RadioNodeList. The only use of a
|
| +// RadioNodeList is to get the selected value and it will be cleaner to
|
| +// introduce a different API for that purpose.
|
| +// 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.
|
|
|
| - bool get isEmpty => this.length == 0;
|
|
|
| - Iterable<StyleSheet> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| +@DocsEditable
|
| +@DomName('Rect')
|
| +abstract class _Rect native "Rect" {
|
| +}
|
| +// 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.
|
|
|
| - Iterable<StyleSheet> takeWhile(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
|
|
| - Iterable<StyleSheet> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| +@DocsEditable
|
| +@DomName('SharedWorker')
|
| +abstract class _SharedWorker extends AbstractWorker native "SharedWorker" {
|
|
|
| - Iterable<StyleSheet> skipWhile(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| + @DomName('SharedWorker.SharedWorker')
|
| + @DocsEditable
|
| + factory _SharedWorker(String scriptURL, [String name]) {
|
| + if (?name) {
|
| + return _SharedWorker._create_1(scriptURL, name);
|
| + }
|
| + return _SharedWorker._create_2(scriptURL);
|
| }
|
| + static _SharedWorker _create_1(scriptURL, name) => JS('_SharedWorker', 'new SharedWorker(#,#)', scriptURL, name);
|
| + static _SharedWorker _create_2(scriptURL) => JS('_SharedWorker', 'new SharedWorker(#)', scriptURL);
|
| +}
|
| +// 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.
|
|
|
| - StyleSheet firstWhere(bool test(StyleSheet value), { StyleSheet orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
|
|
| - StyleSheet lastWhere(bool test(StyleSheet value), {StyleSheet orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| +@DocsEditable
|
| +@DomName('SharedWorkerContext')
|
| +abstract class _SharedWorkerContext extends _WorkerContext native "SharedWorkerContext" {
|
| +}
|
| +// 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.
|
|
|
| - StyleSheet singleWhere(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
|
|
| - StyleSheet elementAt(int index) {
|
| - return this[index];
|
| - }
|
| +@DocsEditable
|
| +@DomName('SpeechInputResultList')
|
| +class _SpeechInputResultList extends Object with ImmutableListMixin<SpeechInputResult>, ListMixin<SpeechInputResult> implements JavaScriptIndexingBehavior, List<SpeechInputResult> native "SpeechInputResultList" {
|
|
|
| - // From Collection<StyleSheet>:
|
| + @DomName('SpeechInputResultList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - void add(StyleSheet value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + SpeechInputResult operator[](int index) => JS("SpeechInputResult", "#[#]", this, index);
|
|
|
| - void addAll(Iterable<StyleSheet> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| + void operator[]=(int index, SpeechInputResult value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<SpeechInputResult> mixins.
|
| + // SpeechInputResult is the element type.
|
| +
|
|
|
| - // From List<StyleSheet>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<StyleSheet> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(StyleSheet a, StyleSheet b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(StyleSheet element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(StyleSheet element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - StyleSheet get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - StyleSheet get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + // -- end List<SpeechInputResult> mixins.
|
|
|
| - StyleSheet get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + @DomName('SpeechInputResultList.item')
|
| + @DocsEditable
|
| + SpeechInputResult item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - void insert(int index, StyleSheet element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - void insertAll(int index, Iterable<StyleSheet> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('SpeechRecognitionResultList')
|
| +class _SpeechRecognitionResultList extends Object with ListMixin<SpeechRecognitionResult>, ImmutableListMixin<SpeechRecognitionResult> implements JavaScriptIndexingBehavior, List<SpeechRecognitionResult> native "SpeechRecognitionResultList" {
|
|
|
| - void setAll(int index, Iterable<StyleSheet> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('SpeechRecognitionResultList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - StyleSheet removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + SpeechRecognitionResult operator[](int index) => JS("SpeechRecognitionResult", "#[#]", this, index);
|
|
|
| - StyleSheet removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + void operator[]=(int index, SpeechRecognitionResult value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<SpeechRecognitionResult> mixins.
|
| + // SpeechRecognitionResult is the element type.
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - void removeWhere(bool test(StyleSheet element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - void retainWhere(bool test(StyleSheet element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + // -- end List<SpeechRecognitionResult> mixins.
|
|
|
| - void setRange(int start, int end, Iterable<StyleSheet> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| + @DomName('SpeechRecognitionResultList.item')
|
| + @DocsEditable
|
| + SpeechRecognitionResult item(int index) native;
|
| +}
|
| +// 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.
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
|
|
| - void replaceRange(int start, int end, Iterable<StyleSheet> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('StyleSheetList')
|
| +class _StyleSheetList extends Object with ListMixin<StyleSheet>, ImmutableListMixin<StyleSheet> implements JavaScriptIndexingBehavior, List<StyleSheet> native "StyleSheetList" {
|
|
|
| - void fillRange(int start, int end, [StyleSheet fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('StyleSheetList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - Iterable<StyleSheet> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + StyleSheet operator[](int index) => JS("StyleSheet", "#[#]", this, index);
|
|
|
| - List<StyleSheet> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <StyleSheet>[]);
|
| + void operator[]=(int index, StyleSheet value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| + // -- start List<StyleSheet> mixins.
|
| + // StyleSheet is the element type.
|
|
|
| - Map<int, StyleSheet> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| // -- end List<StyleSheet> mixins.
|
| @@ -27138,6 +23068,82 @@ class _CustomEventStreamProvider<T extends Event>
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +abstract class ImmutableListMixin<E> implements List<E> {
|
| + // From Iterable<$E>:
|
| + Iterator<E> get 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<E>(this);
|
| + }
|
| +
|
| + // From Collection<E>:
|
| + void add(E value) {
|
| + throw new UnsupportedError("Cannot add to immutable List.");
|
| + }
|
| +
|
| + void addAll(Iterable<E> iterable) {
|
| + throw new UnsupportedError("Cannot add to immutable List.");
|
| + }
|
| +
|
| + // From List<E>:
|
| + void sort([int compare(E a, E b)]) {
|
| + throw new UnsupportedError("Cannot sort immutable List.");
|
| + }
|
| +
|
| + void insert(int index, E element) {
|
| + throw new UnsupportedError("Cannot add to immutable List.");
|
| + }
|
| +
|
| + void insertAll(int index, Iterable<E> iterable) {
|
| + throw new UnsupportedError("Cannot add to immutable List.");
|
| + }
|
| +
|
| + void setAll(int index, Iterable<E> iterable) {
|
| + throw new UnsupportedError("Cannot modify an immutable List.");
|
| + }
|
| +
|
| + E removeAt(int pos) {
|
| + throw new UnsupportedError("Cannot remove from immutable List.");
|
| + }
|
| +
|
| + E removeLast() {
|
| + throw new UnsupportedError("Cannot remove from immutable List.");
|
| + }
|
| +
|
| + void remove(Object object) {
|
| + throw new UnsupportedError("Cannot remove from immutable List.");
|
| + }
|
| +
|
| + void removeWhere(bool test(E element)) {
|
| + throw new UnsupportedError("Cannot remove from immutable List.");
|
| + }
|
| +
|
| + void retainWhere(bool test(E element)) {
|
| + throw new UnsupportedError("Cannot remove from immutable List.");
|
| + }
|
| +
|
| + void setRange(int start, int end, Iterable<E> iterable, [int skipCount]) {
|
| + throw new UnsupportedError("Cannot setRange on immutable List.");
|
| + }
|
| +
|
| + void removeRange(int start, int end) {
|
| + throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| + }
|
| +
|
| + void replaceRange(int start, int end, Iterable<E> iterable) {
|
| + throw new UnsupportedError("Cannot modify an immutable List.");
|
| + }
|
| +
|
| + void fillRange(int start, int end, [E fillValue]) {
|
| + throw new UnsupportedError("Cannot modify an immutable List.");
|
| + }
|
| +}
|
| +// 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.
|
| +
|
| +
|
| /**
|
| * Internal class that does the actual calculations to determine keyCode and
|
| * charCode for keydown, keypress, and keyup events for all browsers.
|
|
|