| 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 bd7050c6cb21ffedd808679f86404afab9253c29..9729c5106bfca25850f2cc0b02a4a041e990e494 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -6821,7 +6821,7 @@ class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" {
|
|
|
| @DocsEditable
|
| @DomName('DOMStringList')
|
| -class DomStringList implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
| +class DomStringList extends Object with ListMixin<String>, ImmutableListMixin<String> implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
|
|
| @DomName('DOMStringList.length')
|
| @DocsEditable
|
| @@ -6835,196 +6835,11 @@ 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);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, String element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - // contains() defined by IDL.
|
| -
|
| - void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(String element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - 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')
|
| @@ -9372,7 +9187,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
|
| @@ -9386,196 +9201,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')
|
| @@ -10354,7 +9984,7 @@ class History implements HistoryBase native "History" {
|
|
|
| @DocsEditable
|
| @DomName('HTMLAllCollection')
|
| -class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollection" {
|
| +class HtmlAllCollection extends Object with ListMixin<Node>, ImmutableListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollection" {
|
|
|
| @DomName('HTMLAllCollection.length')
|
| @DocsEditable
|
| @@ -10368,211 +9998,233 @@ 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);
|
| - }
|
| + @DomName('HTMLAllCollection.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| - bool contains(Node element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('HTMLAllCollection.namedItem')
|
| + @DocsEditable
|
| + Node namedItem(String name) native;
|
|
|
| - void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('HTMLAllCollection.tags')
|
| + @DocsEditable
|
| + @Returns('NodeList')
|
| + @Creates('NodeList')
|
| + List<Node> tags(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);
|
|
|
| - Iterable map(f(Node element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| +@DocsEditable
|
| +@DomName('HTMLCollection')
|
| +class HtmlCollection extends Object with ListMixin<Node>, ImmutableListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" {
|
|
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('HTMLCollection.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + Node operator[](int index) => JS("Node", "#[#]", this, index);
|
|
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
| + void operator[]=(int index, Node value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| + }
|
| + // -- start List<Node> mixins.
|
| + // Node is the element type.
|
|
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
|
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| + }
|
|
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| + // -- end List<Node> mixins.
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('HTMLCollection.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @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.
|
|
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| +// WARNING: Do not edit - generated code.
|
|
|
| - 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.");
|
| - }
|
| +@DomName('HTMLDocument')
|
| +class HtmlDocument extends Document native "HTMLDocument" {
|
|
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('HTMLDocument.activeElement')
|
| + @DocsEditable
|
| + final Element activeElement;
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
|
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('Document.body')
|
| + BodyElement body;
|
|
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| + @DomName('Document.caretRangeFromPoint')
|
| + Range caretRangeFromPoint(int x, int y) {
|
| + return $dom_caretRangeFromPoint(x, y);
|
| }
|
|
|
| - 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);
|
| + @DomName('Document.elementFromPoint')
|
| + Element elementFromPoint(int x, int y) {
|
| + return $dom_elementFromPoint(x, y);
|
| }
|
|
|
| - Node get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| + /**
|
| + * Checks if the getCssCanvasContext API is supported on the current platform.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [getCssCanvasContext]
|
| + */
|
| + static bool get supportsCssCanvasContext =>
|
| + JS('bool', '!!(document.getCSSCanvasContext)');
|
|
|
| - 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");
|
| + /**
|
| + * 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);
|
| }
|
|
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('Document.head')
|
| + HeadElement get head => $dom_head;
|
|
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('Document.lastModified')
|
| + String get lastModified => $dom_lastModified;
|
|
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('Document.preferredStylesheetSet')
|
| + String get preferredStylesheetSet => $dom_preferredStylesheetSet;
|
|
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('Document.referrer')
|
| + String get referrer => $dom_referrer;
|
|
|
| - Node removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + @DomName('Document.selectedStylesheetSet')
|
| + String get selectedStylesheetSet => $dom_selectedStylesheetSet;
|
| + void set selectedStylesheetSet(String value) {
|
| + $dom_selectedStylesheetSet = value;
|
| }
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('Document.styleSheets')
|
| + List<StyleSheet> get styleSheets => $dom_styleSheets;
|
|
|
| - void removeWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('Document.title')
|
| + String get title => $dom_title;
|
|
|
| - void retainWhere(bool test(Node element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + @DomName('Document.title')
|
| + void set title(String value) {
|
| + $dom_title = value;
|
| }
|
|
|
| - void setRange(int start, int end, Iterable<Node> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| + @DomName('Document.webkitCancelFullScreen')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void cancelFullScreen() {
|
| + $dom_webkitCancelFullScreen();
|
| }
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| + @DomName('Document.webkitExitFullscreen')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void exitFullscreen() {
|
| + $dom_webkitExitFullscreen();
|
| }
|
|
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + @DomName('Document.webkitExitPointerLock')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + void exitPointerLock() {
|
| + $dom_webkitExitPointerLock();
|
| }
|
|
|
| - void fillRange(int start, int end, [Node fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('Document.webkitFullscreenElement')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + Element get fullscreenElement => $dom_webkitFullscreenElement;
|
|
|
| - Iterable<Node> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + @DomName('Document.webkitFullscreenEnabled')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool get fullscreenEnabled => $dom_webkitFullscreenEnabled;
|
|
|
| - List<Node> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Node>[]);
|
| - }
|
| + @DomName('Document.webkitHidden')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool get hidden => $dom_webkitHidden;
|
|
|
| - Map<int, Node> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| + @DomName('Document.webkitIsFullScreen')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool get isFullScreen => $dom_webkitIsFullScreen;
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @DomName('Document.webkitPointerLockElement')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + Element get pointerLockElement =>
|
| + $dom_webkitPointerLockElement;
|
|
|
| - // -- end List<Node> mixins.
|
| + @DomName('Document.webkitVisibilityState')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + String get visibilityState => $dom_webkitVisibilityState;
|
| +}
|
| +// 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('HTMLAllCollection.item')
|
| - @DocsEditable
|
| - Node item(int index) native;
|
|
|
| - @DomName('HTMLAllCollection.namedItem')
|
| - @DocsEditable
|
| - Node namedItem(String name) native;
|
| +@DocsEditable
|
| +@DomName('HTMLHtmlElement')
|
| +class HtmlElement extends Element native "HTMLHtmlElement" {
|
|
|
| - @DomName('HTMLAllCollection.tags')
|
| + @DomName('HTMLHtmlElement.HTMLHtmlElement')
|
| @DocsEditable
|
| - @Returns('NodeList')
|
| - @Creates('NodeList')
|
| - List<Node> tags(String name) native;
|
| + factory HtmlElement() => document.$dom_createElement("html");
|
| }
|
| // 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
|
| @@ -10580,378 +10232,511 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLCollection')
|
| -class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" {
|
| +@DomName('HTMLFormControlsCollection')
|
| +class HtmlFormControlsCollection extends HtmlCollection native "HTMLFormControlsCollection" {
|
|
|
| - @DomName('HTMLCollection.length')
|
| + @DomName('HTMLFormControlsCollection.namedItem')
|
| @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - Node operator[](int index) => JS("Node", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, Node value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Node> mixins.
|
| - // Node is the element type.
|
| + 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.
|
|
|
| - // 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);
|
| - }
|
| +@DocsEditable
|
| +@DomName('HTMLOptionsCollection')
|
| +class HtmlOptionsCollection extends HtmlCollection native "HTMLOptionsCollection" {
|
| +}
|
| +// 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 reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Node element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| +/**
|
| + * A utility for retrieving data from a URL.
|
| + *
|
| + * HttpRequest can be used to obtain data from http, ftp, and file
|
| + * protocols.
|
| + *
|
| + * For example, suppose we're developing these API docs, and we
|
| + * wish to retrieve the HTML of the top-level page and print it out.
|
| + * The easiest way to do that would be:
|
| + *
|
| + * HttpRequest.getString('http://api.dartlang.org').then((response) {
|
| + * print(response);
|
| + * });
|
| + *
|
| + * **Important**: With the default behavior of this class, your
|
| + * code making the request should be served from the same origin (domain name,
|
| + * port, and application layer protocol) as the URL you are trying to access
|
| + * with HttpRequest. However, there are ways to
|
| + * [get around this restriction](http://www.dartlang.org/articles/json-web-service/#note-on-jsonp).
|
| + *
|
| + * See also:
|
| + *
|
| + * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-web-service/#getting-data)
|
| + * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest)
|
| + * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest)
|
| + */
|
| +@DomName('XMLHttpRequest')
|
| +class HttpRequest extends EventTarget native "XMLHttpRequest" {
|
|
|
| - 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);
|
| + /**
|
| + * Creates a URL get request for the specified [url].
|
| + *
|
| + * The server response must be a `text/` mime type for this request to
|
| + * succeed.
|
| + *
|
| + * This is similar to [request] but specialized for HTTP GET requests which
|
| + * return text content.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [request]
|
| + */
|
| + static Future<String> getString(String url,
|
| + {bool withCredentials, void onProgress(ProgressEvent e)}) {
|
| + return request(url, withCredentials: withCredentials,
|
| + onProgress: onProgress).then((xhr) => xhr.responseText);
|
| + }
|
|
|
| - Iterable<Node> where(bool f(Node element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + /**
|
| + * Creates a URL request for the specified [url].
|
| + *
|
| + * By default this will do an HTTP GET request, this can be overridden with
|
| + * [method].
|
| + *
|
| + * The Future is completed when the response is available.
|
| + *
|
| + * The [withCredentials] parameter specified that credentials such as a cookie
|
| + * (already) set in the header or
|
| + * [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2)
|
| + * should be specified for the request. Details to keep in mind when using
|
| + * credentials:
|
| + *
|
| + * * Using credentials is only useful for cross-origin requests.
|
| + * * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
|
| + * * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
|
| + * * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
|
| + *
|
| + * Note that requests for file:// URIs are only supported by Chrome extensions
|
| + * with appropriate permissions in their manifest. Requests to file:// URIs
|
| + * will also never fail- the Future will always complete successfully, even
|
| + * when the file cannot be found.
|
| + *
|
| + * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
|
| + */
|
| + static Future<HttpRequest> request(String url,
|
| + {String method, bool withCredentials, String responseType, sendData,
|
| + void onProgress(ProgressEvent e)}) {
|
| + var completer = new Completer<HttpRequest>();
|
|
|
| - Iterable expand(Iterable f(Node element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + var xhr = new HttpRequest();
|
| + if (method == null) {
|
| + method = 'GET';
|
| + }
|
| + xhr.open(method, url, async: true);
|
|
|
| - bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
|
| + if (withCredentials != null) {
|
| + xhr.withCredentials = withCredentials;
|
| + }
|
|
|
| - bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
|
| + if (responseType != null) {
|
| + xhr.responseType = responseType;
|
| + }
|
|
|
| - List<Node> toList({ bool growable: true }) =>
|
| - new List<Node>.from(this, growable: growable);
|
| + if (onProgress != null) {
|
| + xhr.onProgress.listen(onProgress);
|
| + }
|
|
|
| - Set<Node> toSet() => new Set<Node>.from(this);
|
| + xhr.onLoad.listen((e) {
|
| + // Note: file:// URIs have status of 0.
|
| + if ((xhr.status >= 200 && xhr.status < 300) ||
|
| + xhr.status == 0 || xhr.status == 304) {
|
| + completer.complete(xhr);
|
| + } else {
|
| + completer.completeError(e);
|
| + }
|
| + });
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + xhr.onError.listen((e) {
|
| + completer.completeError(e);
|
| + });
|
|
|
| - Iterable<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + if (sendData != null) {
|
| + xhr.send(sendData);
|
| + } else {
|
| + xhr.send();
|
| + }
|
|
|
| - Iterable<Node> takeWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| + return completer.future;
|
| }
|
|
|
| - Iterable<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Node> skipWhile(bool test(Node value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| + /**
|
| + * Checks to see if the Progress event is supported on the current platform.
|
| + */
|
| + static bool get supportsProgressEvent {
|
| + var xhr = new HttpRequest();
|
| + return JS('bool', '("onprogress" in #)', xhr);
|
| }
|
|
|
| - Node firstWhere(bool test(Node value), { Node orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| + /**
|
| + * Checks to see if the current platform supports making cross origin
|
| + * requests.
|
| + *
|
| + * Note that even if cross origin requests are supported, they still may fail
|
| + * if the destination server does not support CORS requests.
|
| + */
|
| + static bool get supportsCrossOrigin {
|
| + var xhr = new HttpRequest();
|
| + return JS('bool', '("withCredentials" in #)', xhr);
|
| }
|
|
|
| - Node lastWhere(bool test(Node value), {Node orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| + /**
|
| + * Checks to see if the LoadEnd event is supported on the current platform.
|
| + */
|
| + static bool get supportsLoadEndEvent {
|
| + var xhr = new HttpRequest();
|
| + return JS('bool', '("onloadend" in #)', xhr);
|
| }
|
|
|
| - Node singleWhere(bool test(Node value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
|
|
| - Node elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('XMLHttpRequest.abortEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
|
|
|
| - // From Collection<Node>:
|
| + @DomName('XMLHttpRequest.errorEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
|
|
|
| - void add(Node value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('XMLHttpRequest.loadEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
|
|
|
| - void addAll(Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('XMLHttpRequest.loadendEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
|
|
|
| - // From List<Node>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('XMLHttpRequest.loadstartEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('XMLHttpRequest.progressEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
|
|
|
| - Iterable<Node> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('XMLHttpRequest.readystatechangeEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> readyStateChangeEvent = const EventStreamProvider<ProgressEvent>('readystatechange');
|
|
|
| - void sort([int compare(Node a, Node b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| + /**
|
| + * General constructor for any type of request (GET, POST, etc).
|
| + *
|
| + * This call is used in conjunction with [open]:
|
| + *
|
| + * var request = new HttpRequest();
|
| + * request.open('GET', 'http://dartlang.org')
|
| + * request.on.load.add((event) => print('Request complete'));
|
| + *
|
| + * is the (more verbose) equivalent of
|
| + *
|
| + * var request = new HttpRequest.get('http://dartlang.org',
|
| + * (event) => print('Request complete'));
|
| + */
|
| + @DomName('XMLHttpRequest.XMLHttpRequest')
|
| + @DocsEditable
|
| + factory HttpRequest() {
|
| + return HttpRequest._create_1();
|
| }
|
| + static HttpRequest _create_1() => JS('HttpRequest', 'new XMLHttpRequest()');
|
|
|
| - int indexOf(Node element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| + static const int DONE = 4;
|
|
|
| - int lastIndexOf(Node element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| + static const int HEADERS_RECEIVED = 2;
|
|
|
| - Node get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| + static const int LOADING = 3;
|
|
|
| - Node get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + static const int OPENED = 1;
|
|
|
| - Node get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + static const int UNSENT = 0;
|
|
|
| - void insert(int index, Node element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + /**
|
| + * Indicator of the current state of the request:
|
| + *
|
| + * <table>
|
| + * <tr>
|
| + * <td>Value</td>
|
| + * <td>State</td>
|
| + * <td>Meaning</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>0</td>
|
| + * <td>unsent</td>
|
| + * <td><code>open()</code> has not yet been called</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>1</td>
|
| + * <td>opened</td>
|
| + * <td><code>send()</code> has not yet been called</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>2</td>
|
| + * <td>headers received</td>
|
| + * <td><code>sent()</code> has been called; response headers and <code>status</code> are available</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>3</td> <td>loading</td> <td><code>responseText</code> holds some data</td>
|
| + * </tr>
|
| + * <tr>
|
| + * <td>4</td> <td>done</td> <td>request is complete</td>
|
| + * </tr>
|
| + * </table>
|
| + */
|
| + @DomName('XMLHttpRequest.readyState')
|
| + @DocsEditable
|
| + final int readyState;
|
|
|
| - void insertAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + /**
|
| + * The data received as a reponse from the request.
|
| + *
|
| + * The data could be in the
|
| + * form of a [String], [ArrayBuffer], [Document], [Blob], or json (also a
|
| + * [String]). `null` indicates request failure.
|
| + */
|
| + @DomName('XMLHttpRequest.response')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @SupportedBrowser(SupportedBrowser.IE, '10')
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Creates('ByteBuffer|Blob|Document|=Object|=List|String|num')
|
| + final Object response;
|
|
|
| - void setAll(int index, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + /**
|
| + * The response in string form or `null on failure.
|
| + */
|
| + @DomName('XMLHttpRequest.responseText')
|
| + @DocsEditable
|
| + final String responseText;
|
|
|
| - Node removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + /**
|
| + * [String] telling the server the desired response format.
|
| + *
|
| + * Default is `String`.
|
| + * Other options are one of 'arraybuffer', 'blob', 'document', 'json',
|
| + * 'text'. Some newer browsers will throw NS_ERROR_DOM_INVALID_ACCESS_ERR if
|
| + * `responseType` is set while performing a synchronous request.
|
| + *
|
| + * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType)
|
| + */
|
| + @DomName('XMLHttpRequest.responseType')
|
| + @DocsEditable
|
| + String responseType;
|
|
|
| - 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')
|
| + @JSName('responseXML')
|
| + /**
|
| + * The request response, or null on failure.
|
| + *
|
| + * The response is processed as
|
| + * `text/xml` stream, unless responseType = 'document' and the request is
|
| + * synchronous.
|
| + */
|
| + @DomName('XMLHttpRequest.responseXML')
|
| @DocsEditable
|
| - Node item(int index) native;
|
| + final Document responseXml;
|
|
|
| - @DomName('HTMLCollection.namedItem')
|
| + /**
|
| + * The http result code from the request (200, 404, etc).
|
| + * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| + */
|
| + @DomName('XMLHttpRequest.status')
|
| @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.
|
| -
|
| + final int status;
|
|
|
| -@DomName('HTMLDocument')
|
| -class HtmlDocument extends Document native "HTMLDocument" {
|
| + /**
|
| + * The request response string (such as \"200 OK\").
|
| + * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| + */
|
| + @DomName('XMLHttpRequest.statusText')
|
| + @DocsEditable
|
| + final String statusText;
|
|
|
| - @DomName('HTMLDocument.activeElement')
|
| + /**
|
| + * [EventTarget] that can hold listeners to track the progress of the request.
|
| + * The events fired will be members of [HttpRequestUploadEvents].
|
| + */
|
| + @DomName('XMLHttpRequest.upload')
|
| @DocsEditable
|
| - final Element activeElement;
|
| + final HttpRequestUpload upload;
|
|
|
| + /**
|
| + * True if cross-site requests should use credentials such as cookies
|
| + * or authorization headers; false otherwise.
|
| + *
|
| + * This value is ignored for same-site requests.
|
| + */
|
| + @DomName('XMLHttpRequest.withCredentials')
|
| + @DocsEditable
|
| + bool withCredentials;
|
|
|
| - @DomName('Document.body')
|
| - BodyElement body;
|
| + /**
|
| + * Stop the current request.
|
| + *
|
| + * The request can only be stopped if readyState is `HEADERS_RECIEVED` or
|
| + * `LOADING`. If this method is not in the process of being sent, the method
|
| + * has no effect.
|
| + */
|
| + @DomName('XMLHttpRequest.abort')
|
| + @DocsEditable
|
| + void abort() native;
|
|
|
| - @DomName('Document.caretRangeFromPoint')
|
| - Range caretRangeFromPoint(int x, int y) {
|
| - return $dom_caretRangeFromPoint(x, y);
|
| - }
|
| + @JSName('addEventListener')
|
| + @DomName('XMLHttpRequest.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - @DomName('Document.elementFromPoint')
|
| - Element elementFromPoint(int x, int y) {
|
| - return $dom_elementFromPoint(x, y);
|
| - }
|
| + @DomName('XMLHttpRequest.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event evt) native;
|
|
|
| /**
|
| - * Checks if the getCssCanvasContext API is supported on the current platform.
|
| + * Retrieve all the response headers from a request.
|
| *
|
| - * See also:
|
| + * `null` if no headers have been received. For multipart requests,
|
| + * `getAllResponseHeaders` will return the response headers for the current
|
| + * part of the request.
|
| *
|
| - * * [getCssCanvasContext]
|
| + * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| + * for a list of common response headers.
|
| */
|
| - static bool get supportsCssCanvasContext =>
|
| - JS('bool', '!!(document.getCSSCanvasContext)');
|
| -
|
| + @DomName('XMLHttpRequest.getAllResponseHeaders')
|
| + @DocsEditable
|
| + String getAllResponseHeaders() native;
|
|
|
| /**
|
| - * Gets a CanvasRenderingContext which can be used as the CSS background of an
|
| - * element.
|
| + * Return the response header named `header`, or `null` if not found.
|
| *
|
| - * CSS:
|
| + * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| + * for a list of common response headers.
|
| + */
|
| + @DomName('XMLHttpRequest.getResponseHeader')
|
| + @DocsEditable
|
| + String getResponseHeader(String header) native;
|
| +
|
| + /**
|
| + * Specify the desired `url`, and `method` to use in making the request.
|
| *
|
| - * background: -webkit-canvas(backgroundCanvas)
|
| + * By default the request is done asyncronously, with no user or password
|
| + * authentication information. If `async` is false, the request will be send
|
| + * synchronously.
|
| *
|
| - * Generate the canvas:
|
| + * Calling `open` again on a currently active request is equivalent to
|
| + * calling `abort`.
|
| + */
|
| + @DomName('XMLHttpRequest.open')
|
| + @DocsEditable
|
| + void open(String method, String url, {bool async, String user, String password}) native;
|
| +
|
| + /**
|
| + * Specify a particular MIME type (such as `text/xml`) desired for the
|
| + * response.
|
| *
|
| - * var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
|
| - * 100, 100);
|
| - * context.fillStyle = 'red';
|
| - * context.fillRect(0, 0, 100, 100);
|
| + * This value must be set before the request has been sent. See also the list
|
| + * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types)
|
| + */
|
| + @DomName('XMLHttpRequest.overrideMimeType')
|
| + @DocsEditable
|
| + void overrideMimeType(String override) native;
|
| +
|
| + @JSName('removeEventListener')
|
| + @DomName('XMLHttpRequest.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| +
|
| + /**
|
| + * Send the request with any given `data`.
|
| *
|
| * See also:
|
| *
|
| - * * [supportsCssCanvasContext]
|
| - * * [CanvasElement.getContext]
|
| + * * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
|
| + * from MDN.
|
| */
|
| - @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('XMLHttpRequest.send')
|
| + @DocsEditable
|
| + void send([data]) native;
|
|
|
| - @DomName('Document.selectedStylesheetSet')
|
| - String get selectedStylesheetSet => $dom_selectedStylesheetSet;
|
| - void set selectedStylesheetSet(String value) {
|
| - $dom_selectedStylesheetSet = value;
|
| - }
|
| + @DomName('XMLHttpRequest.setRequestHeader')
|
| + @DocsEditable
|
| + void setRequestHeader(String header, String value) native;
|
|
|
| - @DomName('Document.styleSheets')
|
| - List<StyleSheet> get styleSheets => $dom_styleSheets;
|
| + /**
|
| + * Event listeners to be notified when request has been aborted,
|
| + * generally due to calling `httpRequest.abort()`.
|
| + */
|
| + @DomName('XMLHttpRequest.onabort')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
|
|
|
| - @DomName('Document.title')
|
| - String get title => $dom_title;
|
| + /**
|
| + * Event listeners to be notified when a request has failed, such as when a
|
| + * cross-domain error occurred or the file wasn't found on the server.
|
| + */
|
| + @DomName('XMLHttpRequest.onerror')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
|
|
|
| - @DomName('Document.title')
|
| - void set title(String value) {
|
| - $dom_title = value;
|
| - }
|
| + /**
|
| + * Event listeners to be notified once the request has completed
|
| + * *successfully*.
|
| + */
|
| + @DomName('XMLHttpRequest.onload')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
|
|
|
| - @DomName('Document.webkitCancelFullScreen')
|
| + /**
|
| + * Event listeners to be notified once the request has completed (on
|
| + * either success or failure).
|
| + */
|
| + @DomName('XMLHttpRequest.onloadend')
|
| + @DocsEditable
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @SupportedBrowser(SupportedBrowser.IE, '10')
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - void cancelFullScreen() {
|
| - $dom_webkitCancelFullScreen();
|
| - }
|
| + Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
|
|
|
| - @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.webkitFullscreenElement')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - Element get fullscreenElement => $dom_webkitFullscreenElement;
|
| -
|
| - @DomName('Document.webkitFullscreenEnabled')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool get fullscreenEnabled => $dom_webkitFullscreenEnabled;
|
| -
|
| - @DomName('Document.webkitHidden')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool get hidden => $dom_webkitHidden;
|
| + /**
|
| + * Event listeners to be notified when the request starts, once
|
| + * `httpRequest.send()` has been called.
|
| + */
|
| + @DomName('XMLHttpRequest.onloadstart')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
|
|
|
| - @DomName('Document.webkitIsFullScreen')
|
| + /**
|
| + * Event listeners to be notified when data for the request
|
| + * is being sent or loaded.
|
| + *
|
| + * Progress events are fired every 50ms or for every byte transmitted,
|
| + * whichever is less frequent.
|
| + */
|
| + @DomName('XMLHttpRequest.onprogress')
|
| + @DocsEditable
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @SupportedBrowser(SupportedBrowser.IE, '10')
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool get isFullScreen => $dom_webkitIsFullScreen;
|
| + Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
|
|
|
| - @DomName('Document.webkitPointerLockElement')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - Element get pointerLockElement =>
|
| - $dom_webkitPointerLockElement;
|
| + /**
|
| + * Event listeners to be notified every time the [HttpRequest]
|
| + * object's `readyState` changes values.
|
| + */
|
| + @DomName('XMLHttpRequest.onreadystatechange')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
|
|
|
| - @DomName('Document.webkitVisibilityState')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - String get visibilityState => $dom_webkitVisibilityState;
|
| }
|
| // 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
|
| @@ -10959,25 +10744,28 @@ class HtmlDocument extends Document native "HTMLDocument" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLHtmlElement')
|
| -class HtmlElement extends Element native "HTMLHtmlElement" {
|
| +@DomName('XMLHttpRequestException')
|
| +class HttpRequestException native "XMLHttpRequestException" {
|
|
|
| - @DomName('HTMLHtmlElement.HTMLHtmlElement')
|
| + static const int ABORT_ERR = 102;
|
| +
|
| + static const int NETWORK_ERR = 101;
|
| +
|
| + @DomName('XMLHttpRequestException.code')
|
| @DocsEditable
|
| - factory HtmlElement() => document.$dom_createElement("html");
|
| -}
|
| -// 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.
|
| + final int code;
|
|
|
| + @DomName('XMLHttpRequestException.message')
|
| + @DocsEditable
|
| + final String message;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLFormControlsCollection')
|
| -class HtmlFormControlsCollection extends HtmlCollection native "HTMLFormControlsCollection" {
|
| + @DomName('XMLHttpRequestException.name')
|
| + @DocsEditable
|
| + final String name;
|
|
|
| - @DomName('HTMLFormControlsCollection.namedItem')
|
| + @DomName('XMLHttpRequestException.toString')
|
| @DocsEditable
|
| - Node namedItem(String name) native;
|
| + 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
|
| @@ -10985,1224 +10773,696 @@ class HtmlFormControlsCollection extends HtmlCollection native "HTMLFormControls
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLOptionsCollection')
|
| -class HtmlOptionsCollection extends HtmlCollection native "HTMLOptionsCollection" {
|
| +@DomName('XMLHttpRequestProgressEvent')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class HttpRequestProgressEvent extends ProgressEvent native "XMLHttpRequestProgressEvent" {
|
| +
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => Device.isEventTypeSupported('XMLHttpRequestProgressEvent');
|
| +
|
| + @DomName('XMLHttpRequestProgressEvent.position')
|
| + @DocsEditable
|
| + final int position;
|
| +
|
| + @DomName('XMLHttpRequestProgressEvent.totalSize')
|
| + @DocsEditable
|
| + final int totalSize;
|
| }
|
| // 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.
|
|
|
|
|
| -/**
|
| - * A utility for retrieving data from a URL.
|
| - *
|
| - * HttpRequest can be used to obtain data from http, ftp, and file
|
| - * protocols.
|
| - *
|
| - * For example, suppose we're developing these API docs, and we
|
| - * wish to retrieve the HTML of the top-level page and print it out.
|
| - * The easiest way to do that would be:
|
| - *
|
| - * HttpRequest.getString('http://api.dartlang.org').then((response) {
|
| - * print(response);
|
| - * });
|
| - *
|
| - * **Important**: With the default behavior of this class, your
|
| - * code making the request should be served from the same origin (domain name,
|
| - * port, and application layer protocol) as the URL you are trying to access
|
| - * with HttpRequest. However, there are ways to
|
| - * [get around this restriction](http://www.dartlang.org/articles/json-web-service/#note-on-jsonp).
|
| - *
|
| - * See also:
|
| - *
|
| - * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-web-service/#getting-data)
|
| - * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest)
|
| - * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest)
|
| - */
|
| -@DomName('XMLHttpRequest')
|
| -class HttpRequest extends EventTarget native "XMLHttpRequest" {
|
| +@DocsEditable
|
| +@DomName('XMLHttpRequestUpload')
|
| +class HttpRequestUpload extends EventTarget native "XMLHttpRequestUpload" {
|
|
|
| - /**
|
| - * Creates a URL get request for the specified [url].
|
| - *
|
| - * The server response must be a `text/` mime type for this request to
|
| - * succeed.
|
| - *
|
| - * This is similar to [request] but specialized for HTTP GET requests which
|
| - * return text content.
|
| - *
|
| - * See also:
|
| - *
|
| - * * [request]
|
| - */
|
| - static Future<String> getString(String url,
|
| - {bool withCredentials, void onProgress(ProgressEvent e)}) {
|
| - return request(url, withCredentials: withCredentials,
|
| - onProgress: onProgress).then((xhr) => xhr.responseText);
|
| - }
|
| + @DomName('XMLHttpRequestUpload.abortEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
|
|
|
| - /**
|
| - * Creates a URL request for the specified [url].
|
| - *
|
| - * By default this will do an HTTP GET request, this can be overridden with
|
| - * [method].
|
| - *
|
| - * The Future is completed when the response is available.
|
| - *
|
| - * The [withCredentials] parameter specified that credentials such as a cookie
|
| - * (already) set in the header or
|
| - * [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2)
|
| - * should be specified for the request. Details to keep in mind when using
|
| - * credentials:
|
| - *
|
| - * * Using credentials is only useful for cross-origin requests.
|
| - * * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
|
| - * * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
|
| - * * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
|
| - *
|
| - * Note that requests for file:// URIs are only supported by Chrome extensions
|
| - * with appropriate permissions in their manifest. Requests to file:// URIs
|
| - * will also never fail- the Future will always complete successfully, even
|
| - * when the file cannot be found.
|
| - *
|
| - * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
|
| - */
|
| - static Future<HttpRequest> request(String url,
|
| - {String method, bool withCredentials, String responseType, sendData,
|
| - void onProgress(ProgressEvent e)}) {
|
| - var completer = new Completer<HttpRequest>();
|
| + @DomName('XMLHttpRequestUpload.errorEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
|
|
|
| - var xhr = new HttpRequest();
|
| - if (method == null) {
|
| - method = 'GET';
|
| - }
|
| - xhr.open(method, url, async: true);
|
| + @DomName('XMLHttpRequestUpload.loadEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
|
|
|
| - if (withCredentials != null) {
|
| - xhr.withCredentials = withCredentials;
|
| - }
|
| + @DomName('XMLHttpRequestUpload.loadendEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
|
|
|
| - if (responseType != null) {
|
| - xhr.responseType = responseType;
|
| - }
|
| + @DomName('XMLHttpRequestUpload.loadstartEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
|
|
|
| - if (onProgress != null) {
|
| - xhr.onProgress.listen(onProgress);
|
| - }
|
| + @DomName('XMLHttpRequestUpload.progressEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
|
|
|
| - xhr.onLoad.listen((e) {
|
| - // Note: file:// URIs have status of 0.
|
| - if ((xhr.status >= 200 && xhr.status < 300) ||
|
| - xhr.status == 0 || xhr.status == 304) {
|
| - completer.complete(xhr);
|
| - } else {
|
| - completer.completeError(e);
|
| - }
|
| - });
|
| + @JSName('addEventListener')
|
| + @DomName('XMLHttpRequestUpload.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - xhr.onError.listen((e) {
|
| - completer.completeError(e);
|
| - });
|
| + @DomName('XMLHttpRequestUpload.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event evt) native;
|
|
|
| - if (sendData != null) {
|
| - xhr.send(sendData);
|
| - } else {
|
| - xhr.send();
|
| - }
|
| + @JSName('removeEventListener')
|
| + @DomName('XMLHttpRequestUpload.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - return completer.future;
|
| - }
|
| + @DomName('XMLHttpRequestUpload.onabort')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
|
|
|
| - /**
|
| - * Checks to see if the Progress event is supported on the current platform.
|
| - */
|
| - static bool get supportsProgressEvent {
|
| - var xhr = new HttpRequest();
|
| - return JS('bool', '("onprogress" in #)', xhr);
|
| - }
|
| + @DomName('XMLHttpRequestUpload.onerror')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
|
|
|
| - /**
|
| - * Checks to see if the current platform supports making cross origin
|
| - * requests.
|
| - *
|
| - * Note that even if cross origin requests are supported, they still may fail
|
| - * if the destination server does not support CORS requests.
|
| - */
|
| - static bool get supportsCrossOrigin {
|
| - var xhr = new HttpRequest();
|
| - return JS('bool', '("withCredentials" in #)', xhr);
|
| - }
|
| + @DomName('XMLHttpRequestUpload.onload')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
|
|
|
| - /**
|
| - * Checks to see if the LoadEnd event is supported on the current platform.
|
| - */
|
| - static bool get supportsLoadEndEvent {
|
| - var xhr = new HttpRequest();
|
| - return JS('bool', '("onloadend" in #)', xhr);
|
| - }
|
| + @DomName('XMLHttpRequestUpload.onloadend')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
|
|
|
| + @DomName('XMLHttpRequestUpload.onloadstart')
|
| + @DocsEditable
|
| + Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
|
|
|
| - @DomName('XMLHttpRequest.abortEvent')
|
| + @DomName('XMLHttpRequestUpload.onprogress')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
|
| + Stream<ProgressEvent> get onProgress => progressEvent.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.
|
|
|
| - @DomName('XMLHttpRequest.errorEvent')
|
| +
|
| +@DocsEditable
|
| +@DomName('HTMLIFrameElement')
|
| +class IFrameElement extends Element native "HTMLIFrameElement" {
|
| +
|
| + @DomName('HTMLIFrameElement.HTMLIFrameElement')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
|
| + factory IFrameElement() => document.$dom_createElement("iframe");
|
|
|
| - @DomName('XMLHttpRequest.loadEvent')
|
| + WindowBase get contentWindow => _convertNativeToDart_Window(this._get_contentWindow);
|
| + @JSName('contentWindow')
|
| + @DomName('HTMLIFrameElement.contentWindow')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_contentWindow;
|
|
|
| - @DomName('XMLHttpRequest.loadendEvent')
|
| + @DomName('HTMLIFrameElement.height')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
|
| + String height;
|
|
|
| - @DomName('XMLHttpRequest.loadstartEvent')
|
| + @DomName('HTMLIFrameElement.name')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
|
| + String name;
|
|
|
| - @DomName('XMLHttpRequest.progressEvent')
|
| + @DomName('HTMLIFrameElement.sandbox')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
|
| + String sandbox;
|
|
|
| - @DomName('XMLHttpRequest.readystatechangeEvent')
|
| + @DomName('HTMLIFrameElement.seamless')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> readyStateChangeEvent = const EventStreamProvider<ProgressEvent>('readystatechange');
|
| + bool seamless;
|
|
|
| - /**
|
| - * General constructor for any type of request (GET, POST, etc).
|
| - *
|
| - * This call is used in conjunction with [open]:
|
| - *
|
| - * var request = new HttpRequest();
|
| - * request.open('GET', 'http://dartlang.org')
|
| - * request.on.load.add((event) => print('Request complete'));
|
| - *
|
| - * is the (more verbose) equivalent of
|
| - *
|
| - * var request = new HttpRequest.get('http://dartlang.org',
|
| - * (event) => print('Request complete'));
|
| - */
|
| - @DomName('XMLHttpRequest.XMLHttpRequest')
|
| + @DomName('HTMLIFrameElement.src')
|
| @DocsEditable
|
| - factory HttpRequest() {
|
| - return HttpRequest._create_1();
|
| - }
|
| - static HttpRequest _create_1() => JS('HttpRequest', 'new XMLHttpRequest()');
|
| + String src;
|
|
|
| - static const int DONE = 4;
|
| + @DomName('HTMLIFrameElement.srcdoc')
|
| + @DocsEditable
|
| + String srcdoc;
|
|
|
| - static const int HEADERS_RECEIVED = 2;
|
| + @DomName('HTMLIFrameElement.width')
|
| + @DocsEditable
|
| + String width;
|
| +}
|
| +// 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.
|
|
|
| - static const int LOADING = 3;
|
| +@DomName('ImageData')
|
|
|
| - static const int OPENED = 1;
|
| +class ImageData native "ImageData" {
|
|
|
| - static const int UNSENT = 0;
|
|
|
| - /**
|
| - * Indicator of the current state of the request:
|
| - *
|
| - * <table>
|
| - * <tr>
|
| - * <td>Value</td>
|
| - * <td>State</td>
|
| - * <td>Meaning</td>
|
| - * </tr>
|
| - * <tr>
|
| - * <td>0</td>
|
| - * <td>unsent</td>
|
| - * <td><code>open()</code> has not yet been called</td>
|
| - * </tr>
|
| - * <tr>
|
| - * <td>1</td>
|
| - * <td>opened</td>
|
| - * <td><code>send()</code> has not yet been called</td>
|
| - * </tr>
|
| - * <tr>
|
| - * <td>2</td>
|
| - * <td>headers received</td>
|
| - * <td><code>sent()</code> has been called; response headers and <code>status</code> are available</td>
|
| - * </tr>
|
| - * <tr>
|
| - * <td>3</td> <td>loading</td> <td><code>responseText</code> holds some data</td>
|
| - * </tr>
|
| - * <tr>
|
| - * <td>4</td> <td>done</td> <td>request is complete</td>
|
| - * </tr>
|
| - * </table>
|
| - */
|
| - @DomName('XMLHttpRequest.readyState')
|
| + @DomName('ImageData.data')
|
| @DocsEditable
|
| - final int readyState;
|
| + final List<int> data;
|
|
|
| - /**
|
| - * The data received as a reponse from the request.
|
| - *
|
| - * The data could be in the
|
| - * form of a [String], [ArrayBuffer], [Document], [Blob], or json (also a
|
| - * [String]). `null` indicates request failure.
|
| - */
|
| - @DomName('XMLHttpRequest.response')
|
| + @DomName('ImageData.height')
|
| @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| - @SupportedBrowser(SupportedBrowser.IE, '10')
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Creates('ByteBuffer|Blob|Document|=Object|=List|String|num')
|
| - final Object response;
|
| + final int height;
|
|
|
| - /**
|
| - * The response in string form or `null on failure.
|
| - */
|
| - @DomName('XMLHttpRequest.responseText')
|
| + @DomName('ImageData.width')
|
| @DocsEditable
|
| - final String responseText;
|
| + final int width;
|
|
|
| - /**
|
| - * [String] telling the server the desired response format.
|
| - *
|
| - * Default is `String`.
|
| - * Other options are one of 'arraybuffer', 'blob', 'document', 'json',
|
| - * 'text'. Some newer browsers will throw NS_ERROR_DOM_INVALID_ACCESS_ERR if
|
| - * `responseType` is set while performing a synchronous request.
|
| - *
|
| - * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType)
|
| - */
|
| - @DomName('XMLHttpRequest.responseType')
|
| +}
|
| +// 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('HTMLImageElement')
|
| +class ImageElement extends Element implements CanvasImageSource native "HTMLImageElement" {
|
| +
|
| + @DomName('HTMLImageElement.HTMLImageElement')
|
| @DocsEditable
|
| - String responseType;
|
| + factory ImageElement({String src, int width, int height}) {
|
| + var e = document.$dom_createElement("img");
|
| + if (src != null) e.src = src;
|
| + if (width != null) e.width = width;
|
| + if (height != null) e.height = height;
|
| + return e;
|
| + }
|
|
|
| - @JSName('responseXML')
|
| - /**
|
| - * The request response, or null on failure.
|
| - *
|
| - * The response is processed as
|
| - * `text/xml` stream, unless responseType = 'document' and the request is
|
| - * synchronous.
|
| - */
|
| - @DomName('XMLHttpRequest.responseXML')
|
| + @DomName('HTMLImageElement.alt')
|
| @DocsEditable
|
| - final Document responseXml;
|
| + String alt;
|
|
|
| - /**
|
| - * The http result code from the request (200, 404, etc).
|
| - * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| - */
|
| - @DomName('XMLHttpRequest.status')
|
| + @DomName('HTMLImageElement.border')
|
| @DocsEditable
|
| - final int status;
|
| + String border;
|
|
|
| - /**
|
| - * The request response string (such as \"200 OK\").
|
| - * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
| - */
|
| - @DomName('XMLHttpRequest.statusText')
|
| + @DomName('HTMLImageElement.complete')
|
| @DocsEditable
|
| - final String statusText;
|
| + final bool complete;
|
|
|
| - /**
|
| - * [EventTarget] that can hold listeners to track the progress of the request.
|
| - * The events fired will be members of [HttpRequestUploadEvents].
|
| - */
|
| - @DomName('XMLHttpRequest.upload')
|
| + @DomName('HTMLImageElement.crossOrigin')
|
| @DocsEditable
|
| - final HttpRequestUpload upload;
|
| + String crossOrigin;
|
|
|
| - /**
|
| - * True if cross-site requests should use credentials such as cookies
|
| - * or authorization headers; false otherwise.
|
| - *
|
| - * This value is ignored for same-site requests.
|
| - */
|
| - @DomName('XMLHttpRequest.withCredentials')
|
| + @DomName('HTMLImageElement.height')
|
| @DocsEditable
|
| - bool withCredentials;
|
| + int height;
|
|
|
| - /**
|
| - * Stop the current request.
|
| - *
|
| - * The request can only be stopped if readyState is `HEADERS_RECIEVED` or
|
| - * `LOADING`. If this method is not in the process of being sent, the method
|
| - * has no effect.
|
| - */
|
| - @DomName('XMLHttpRequest.abort')
|
| + @DomName('HTMLImageElement.isMap')
|
| @DocsEditable
|
| - void abort() native;
|
| + bool isMap;
|
|
|
| - @JSName('addEventListener')
|
| - @DomName('XMLHttpRequest.addEventListener')
|
| + @DomName('HTMLImageElement.lowsrc')
|
| @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + String lowsrc;
|
|
|
| - @DomName('XMLHttpRequest.dispatchEvent')
|
| + @DomName('HTMLImageElement.naturalHeight')
|
| @DocsEditable
|
| - bool dispatchEvent(Event evt) native;
|
| + final int naturalHeight;
|
|
|
| - /**
|
| - * Retrieve all the response headers from a request.
|
| - *
|
| - * `null` if no headers have been received. For multipart requests,
|
| - * `getAllResponseHeaders` will return the response headers for the current
|
| - * part of the request.
|
| - *
|
| - * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| - * for a list of common response headers.
|
| - */
|
| - @DomName('XMLHttpRequest.getAllResponseHeaders')
|
| + @DomName('HTMLImageElement.naturalWidth')
|
| @DocsEditable
|
| - String getAllResponseHeaders() native;
|
| + final int naturalWidth;
|
|
|
| - /**
|
| - * Return the response header named `header`, or `null` if not found.
|
| - *
|
| - * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)
|
| - * for a list of common response headers.
|
| - */
|
| - @DomName('XMLHttpRequest.getResponseHeader')
|
| + @DomName('HTMLImageElement.src')
|
| @DocsEditable
|
| - String getResponseHeader(String header) native;
|
| + String src;
|
|
|
| - /**
|
| - * Specify the desired `url`, and `method` to use in making the request.
|
| - *
|
| - * By default the request is done asyncronously, with no user or password
|
| - * authentication information. If `async` is false, the request will be send
|
| - * synchronously.
|
| - *
|
| - * Calling `open` again on a currently active request is equivalent to
|
| - * calling `abort`.
|
| - */
|
| - @DomName('XMLHttpRequest.open')
|
| + @DomName('HTMLImageElement.useMap')
|
| @DocsEditable
|
| - void open(String method, String url, {bool async, String user, String password}) native;
|
| + String useMap;
|
|
|
| - /**
|
| - * Specify a particular MIME type (such as `text/xml`) desired for the
|
| - * response.
|
| - *
|
| - * This value must be set before the request has been sent. See also the list
|
| - * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types)
|
| - */
|
| - @DomName('XMLHttpRequest.overrideMimeType')
|
| + @DomName('HTMLImageElement.width')
|
| @DocsEditable
|
| - void overrideMimeType(String override) native;
|
| + int width;
|
|
|
| - @JSName('removeEventListener')
|
| - @DomName('XMLHttpRequest.removeEventListener')
|
| + @DomName('HTMLImageElement.x')
|
| @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + final int x;
|
|
|
| - /**
|
| - * Send the request with any given `data`.
|
| - *
|
| - * See also:
|
| - *
|
| - * * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
|
| - * from MDN.
|
| - */
|
| - @DomName('XMLHttpRequest.send')
|
| + @DomName('HTMLImageElement.y')
|
| @DocsEditable
|
| - void send([data]) native;
|
| + final int y;
|
|
|
| - @DomName('XMLHttpRequest.setRequestHeader')
|
| - @DocsEditable
|
| - void setRequestHeader(String header, String value) 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.
|
|
|
| - /**
|
| - * Event listeners to be notified when request has been aborted,
|
| - * generally due to calling `httpRequest.abort()`.
|
| - */
|
| - @DomName('XMLHttpRequest.onabort')
|
| - @DocsEditable
|
| - Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
|
|
|
| - /**
|
| - * Event listeners to be notified when a request has failed, such as when a
|
| - * cross-domain error occurred or the file wasn't found on the server.
|
| - */
|
| - @DomName('XMLHttpRequest.onerror')
|
| - @DocsEditable
|
| - Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
|
| +@DomName('HTMLInputElement')
|
| +class InputElement extends Element implements
|
| + HiddenInputElement,
|
| + SearchInputElement,
|
| + TextInputElement,
|
| + UrlInputElement,
|
| + TelephoneInputElement,
|
| + EmailInputElement,
|
| + PasswordInputElement,
|
| + DateInputElement,
|
| + MonthInputElement,
|
| + WeekInputElement,
|
| + TimeInputElement,
|
| + LocalDateTimeInputElement,
|
| + NumberInputElement,
|
| + RangeInputElement,
|
| + CheckboxInputElement,
|
| + RadioButtonInputElement,
|
| + FileUploadInputElement,
|
| + SubmitButtonInputElement,
|
| + ImageButtonInputElement,
|
| + ResetButtonInputElement,
|
| + ButtonInputElement
|
| + native "HTMLInputElement" {
|
|
|
| - /**
|
| - * Event listeners to be notified once the request has completed
|
| - * *successfully*.
|
| - */
|
| - @DomName('XMLHttpRequest.onload')
|
| - @DocsEditable
|
| - Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
|
| + factory InputElement({String type}) {
|
| + var e = document.$dom_createElement("input");
|
| + if (type != null) {
|
| + try {
|
| + // IE throws an exception for unknown types.
|
| + e.type = type;
|
| + } catch(_) {}
|
| + }
|
| + return e;
|
| + }
|
|
|
| - /**
|
| - * Event listeners to be notified once the request has completed (on
|
| - * either success or failure).
|
| - */
|
| - @DomName('XMLHttpRequest.onloadend')
|
| + @DomName('HTMLInputElement.webkitSpeechChangeEvent')
|
| @DocsEditable
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| - @SupportedBrowser(SupportedBrowser.IE, '10')
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
|
| + @Experimental
|
| + static const EventStreamProvider<Event> speechChangeEvent = const EventStreamProvider<Event>('webkitSpeechChange');
|
|
|
| - /**
|
| - * Event listeners to be notified when the request starts, once
|
| - * `httpRequest.send()` has been called.
|
| - */
|
| - @DomName('XMLHttpRequest.onloadstart')
|
| + @DomName('HTMLInputElement.accept')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
|
| + String accept;
|
|
|
| - /**
|
| - * Event listeners to be notified when data for the request
|
| - * is being sent or loaded.
|
| - *
|
| - * Progress events are fired every 50ms or for every byte transmitted,
|
| - * whichever is less frequent.
|
| - */
|
| - @DomName('XMLHttpRequest.onprogress')
|
| + @DomName('HTMLInputElement.alt')
|
| @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| - @SupportedBrowser(SupportedBrowser.IE, '10')
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
|
| + String alt;
|
|
|
| - /**
|
| - * Event listeners to be notified every time the [HttpRequest]
|
| - * object's `readyState` changes values.
|
| - */
|
| - @DomName('XMLHttpRequest.onreadystatechange')
|
| + @DomName('HTMLInputElement.autocomplete')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onReadyStateChange => readyStateChangeEvent.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.
|
| + String autocomplete;
|
|
|
| + @DomName('HTMLInputElement.autofocus')
|
| + @DocsEditable
|
| + bool autofocus;
|
|
|
| -@DocsEditable
|
| -@DomName('XMLHttpRequestException')
|
| -class HttpRequestException native "XMLHttpRequestException" {
|
| + @DomName('HTMLInputElement.checked')
|
| + @DocsEditable
|
| + bool checked;
|
|
|
| - static const int ABORT_ERR = 102;
|
| + @DomName('HTMLInputElement.defaultChecked')
|
| + @DocsEditable
|
| + bool defaultChecked;
|
|
|
| - static const int NETWORK_ERR = 101;
|
| + @DomName('HTMLInputElement.defaultValue')
|
| + @DocsEditable
|
| + String defaultValue;
|
|
|
| - @DomName('XMLHttpRequestException.code')
|
| + @DomName('HTMLInputElement.dirName')
|
| @DocsEditable
|
| - final int code;
|
| + String dirName;
|
|
|
| - @DomName('XMLHttpRequestException.message')
|
| + @DomName('HTMLInputElement.disabled')
|
| @DocsEditable
|
| - final String message;
|
| + bool disabled;
|
|
|
| - @DomName('XMLHttpRequestException.name')
|
| + @DomName('HTMLInputElement.files')
|
| @DocsEditable
|
| - final String name;
|
| + @Returns('FileList')
|
| + @Creates('FileList')
|
| + List<File> files;
|
|
|
| - @DomName('XMLHttpRequestException.toString')
|
| + @DomName('HTMLInputElement.form')
|
| @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.
|
| + final FormElement form;
|
|
|
| + @DomName('HTMLInputElement.formAction')
|
| + @DocsEditable
|
| + String formAction;
|
|
|
| -@DocsEditable
|
| -@DomName('XMLHttpRequestProgressEvent')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -@Experimental
|
| -class HttpRequestProgressEvent extends ProgressEvent native "XMLHttpRequestProgressEvent" {
|
| + @DomName('HTMLInputElement.formEnctype')
|
| + @DocsEditable
|
| + String formEnctype;
|
|
|
| - /// Checks if this type is supported on the current platform.
|
| - static bool get supported => Device.isEventTypeSupported('XMLHttpRequestProgressEvent');
|
| + @DomName('HTMLInputElement.formMethod')
|
| + @DocsEditable
|
| + String formMethod;
|
|
|
| - @DomName('XMLHttpRequestProgressEvent.position')
|
| + @DomName('HTMLInputElement.formNoValidate')
|
| @DocsEditable
|
| - final int position;
|
| + bool formNoValidate;
|
|
|
| - @DomName('XMLHttpRequestProgressEvent.totalSize')
|
| + @DomName('HTMLInputElement.formTarget')
|
| @DocsEditable
|
| - final int totalSize;
|
| -}
|
| -// 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('XMLHttpRequestUpload')
|
| -class HttpRequestUpload extends EventTarget native "XMLHttpRequestUpload" {
|
| -
|
| - @DomName('XMLHttpRequestUpload.abortEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
|
| + String formTarget;
|
|
|
| - @DomName('XMLHttpRequestUpload.errorEvent')
|
| + @DomName('HTMLInputElement.height')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
|
| + int height;
|
|
|
| - @DomName('XMLHttpRequestUpload.loadEvent')
|
| + @DomName('HTMLInputElement.incremental')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
|
| + bool incremental;
|
|
|
| - @DomName('XMLHttpRequestUpload.loadendEvent')
|
| + @DomName('HTMLInputElement.indeterminate')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
|
| + bool indeterminate;
|
|
|
| - @DomName('XMLHttpRequestUpload.loadstartEvent')
|
| + @DomName('HTMLInputElement.labels')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
|
| + @Returns('NodeList')
|
| + @Creates('NodeList')
|
| + final List<Node> labels;
|
|
|
| - @DomName('XMLHttpRequestUpload.progressEvent')
|
| + @DomName('HTMLInputElement.list')
|
| @DocsEditable
|
| - static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
|
| + final Element list;
|
|
|
| - @JSName('addEventListener')
|
| - @DomName('XMLHttpRequestUpload.addEventListener')
|
| + @DomName('HTMLInputElement.max')
|
| @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + String max;
|
|
|
| - @DomName('XMLHttpRequestUpload.dispatchEvent')
|
| + @DomName('HTMLInputElement.maxLength')
|
| @DocsEditable
|
| - bool dispatchEvent(Event evt) native;
|
| + int maxLength;
|
|
|
| - @JSName('removeEventListener')
|
| - @DomName('XMLHttpRequestUpload.removeEventListener')
|
| + @DomName('HTMLInputElement.min')
|
| @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + String min;
|
|
|
| - @DomName('XMLHttpRequestUpload.onabort')
|
| + @DomName('HTMLInputElement.multiple')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
|
| + bool multiple;
|
|
|
| - @DomName('XMLHttpRequestUpload.onerror')
|
| + @DomName('HTMLInputElement.name')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
|
| + String name;
|
|
|
| - @DomName('XMLHttpRequestUpload.onload')
|
| + @DomName('HTMLInputElement.pattern')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
|
| + String pattern;
|
|
|
| - @DomName('XMLHttpRequestUpload.onloadend')
|
| + @DomName('HTMLInputElement.placeholder')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
|
| + String placeholder;
|
|
|
| - @DomName('XMLHttpRequestUpload.onloadstart')
|
| + @DomName('HTMLInputElement.readOnly')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
|
| + bool readOnly;
|
|
|
| - @DomName('XMLHttpRequestUpload.onprogress')
|
| + @DomName('HTMLInputElement.required')
|
| @DocsEditable
|
| - Stream<ProgressEvent> get onProgress => progressEvent.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('HTMLIFrameElement')
|
| -class IFrameElement extends Element native "HTMLIFrameElement" {
|
| + bool required;
|
|
|
| - @DomName('HTMLIFrameElement.HTMLIFrameElement')
|
| + @DomName('HTMLInputElement.selectionDirection')
|
| @DocsEditable
|
| - factory IFrameElement() => document.$dom_createElement("iframe");
|
| + String selectionDirection;
|
|
|
| - WindowBase get contentWindow => _convertNativeToDart_Window(this._get_contentWindow);
|
| - @JSName('contentWindow')
|
| - @DomName('HTMLIFrameElement.contentWindow')
|
| + @DomName('HTMLInputElement.selectionEnd')
|
| @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_contentWindow;
|
| + int selectionEnd;
|
|
|
| - @DomName('HTMLIFrameElement.height')
|
| + @DomName('HTMLInputElement.selectionStart')
|
| @DocsEditable
|
| - String height;
|
| + int selectionStart;
|
|
|
| - @DomName('HTMLIFrameElement.name')
|
| + @DomName('HTMLInputElement.size')
|
| @DocsEditable
|
| - String name;
|
| + int size;
|
|
|
| - @DomName('HTMLIFrameElement.sandbox')
|
| + @DomName('HTMLInputElement.src')
|
| @DocsEditable
|
| - String sandbox;
|
| + String src;
|
|
|
| - @DomName('HTMLIFrameElement.seamless')
|
| + @DomName('HTMLInputElement.step')
|
| @DocsEditable
|
| - bool seamless;
|
| + String step;
|
|
|
| - @DomName('HTMLIFrameElement.src')
|
| + @DomName('HTMLInputElement.type')
|
| @DocsEditable
|
| - String src;
|
| + String type;
|
|
|
| - @DomName('HTMLIFrameElement.srcdoc')
|
| + @DomName('HTMLInputElement.useMap')
|
| @DocsEditable
|
| - String srcdoc;
|
| + String useMap;
|
|
|
| - @DomName('HTMLIFrameElement.width')
|
| + @DomName('HTMLInputElement.validationMessage')
|
| @DocsEditable
|
| - String width;
|
| -}
|
| -// 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('ImageData')
|
| -
|
| -class ImageData native "ImageData" {
|
| -
|
| + final String validationMessage;
|
|
|
| - @DomName('ImageData.data')
|
| + @DomName('HTMLInputElement.validity')
|
| @DocsEditable
|
| - final List<int> data;
|
| + final ValidityState validity;
|
|
|
| - @DomName('ImageData.height')
|
| + @DomName('HTMLInputElement.value')
|
| @DocsEditable
|
| - final int height;
|
| + String value;
|
|
|
| - @DomName('ImageData.width')
|
| + DateTime get valueAsDate => _convertNativeToDart_DateTime(this._get_valueAsDate);
|
| + @JSName('valueAsDate')
|
| + @DomName('HTMLInputElement.valueAsDate')
|
| @DocsEditable
|
| - final int 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.
|
| -
|
| + final dynamic _get_valueAsDate;
|
|
|
| -@DomName('HTMLImageElement')
|
| -class ImageElement extends Element implements CanvasImageSource native "HTMLImageElement" {
|
| + void set valueAsDate(DateTime value) {
|
| + this._set_valueAsDate = _convertDartToNative_DateTime(value);
|
| + }
|
| + void set _set_valueAsDate(/*dynamic*/ value) {
|
| + JS("void", "#.valueAsDate = #", this, value);
|
| + }
|
|
|
| - @DomName('HTMLImageElement.HTMLImageElement')
|
| + @DomName('HTMLInputElement.valueAsNumber')
|
| @DocsEditable
|
| - factory ImageElement({String src, int width, int height}) {
|
| - var e = document.$dom_createElement("img");
|
| - if (src != null) e.src = src;
|
| - if (width != null) e.width = width;
|
| - if (height != null) e.height = height;
|
| - return e;
|
| - }
|
| + num valueAsNumber;
|
|
|
| - @DomName('HTMLImageElement.alt')
|
| + @JSName('webkitEntries')
|
| + @DomName('HTMLInputElement.webkitEntries')
|
| @DocsEditable
|
| - String alt;
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + @Returns('_EntryArray')
|
| + @Creates('_EntryArray')
|
| + final List<Entry> entries;
|
|
|
| - @DomName('HTMLImageElement.border')
|
| + @JSName('webkitGrammar')
|
| + @DomName('HTMLInputElement.webkitGrammar')
|
| @DocsEditable
|
| - String border;
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool grammar;
|
|
|
| - @DomName('HTMLImageElement.complete')
|
| + @JSName('webkitSpeech')
|
| + @DomName('HTMLInputElement.webkitSpeech')
|
| @DocsEditable
|
| - final bool complete;
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool speech;
|
|
|
| - @DomName('HTMLImageElement.crossOrigin')
|
| + @JSName('webkitdirectory')
|
| + @DomName('HTMLInputElement.webkitdirectory')
|
| @DocsEditable
|
| - String crossOrigin;
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + bool directory;
|
|
|
| - @DomName('HTMLImageElement.height')
|
| + @DomName('HTMLInputElement.width')
|
| @DocsEditable
|
| - int height;
|
| + int width;
|
|
|
| - @DomName('HTMLImageElement.isMap')
|
| + @DomName('HTMLInputElement.willValidate')
|
| @DocsEditable
|
| - bool isMap;
|
| + final bool willValidate;
|
|
|
| - @DomName('HTMLImageElement.lowsrc')
|
| + @DomName('HTMLInputElement.checkValidity')
|
| @DocsEditable
|
| - String lowsrc;
|
| + bool checkValidity() native;
|
|
|
| - @DomName('HTMLImageElement.naturalHeight')
|
| + @DomName('HTMLInputElement.select')
|
| @DocsEditable
|
| - final int naturalHeight;
|
| + void select() native;
|
|
|
| - @DomName('HTMLImageElement.naturalWidth')
|
| + @DomName('HTMLInputElement.setCustomValidity')
|
| @DocsEditable
|
| - final int naturalWidth;
|
| + void setCustomValidity(String error) native;
|
|
|
| - @DomName('HTMLImageElement.src')
|
| + @DomName('HTMLInputElement.setRangeText')
|
| @DocsEditable
|
| - String src;
|
| + void setRangeText(String replacement, {int start, int end, String selectionMode}) native;
|
|
|
| - @DomName('HTMLImageElement.useMap')
|
| + @DomName('HTMLInputElement.setSelectionRange')
|
| @DocsEditable
|
| - String useMap;
|
| + void setSelectionRange(int start, int end, [String direction]) native;
|
|
|
| - @DomName('HTMLImageElement.width')
|
| + @DomName('HTMLInputElement.stepDown')
|
| @DocsEditable
|
| - int width;
|
| + void stepDown([int n]) native;
|
|
|
| - @DomName('HTMLImageElement.x')
|
| + @DomName('HTMLInputElement.stepUp')
|
| @DocsEditable
|
| - final int x;
|
| + void stepUp([int n]) native;
|
|
|
| - @DomName('HTMLImageElement.y')
|
| + @DomName('HTMLInputElement.onwebkitSpeechChange')
|
| @DocsEditable
|
| - final int y;
|
| + Stream<Event> get onSpeechChange => speechChangeEvent.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.
|
|
|
|
|
| -@DomName('HTMLInputElement')
|
| -class InputElement extends Element implements
|
| - HiddenInputElement,
|
| - SearchInputElement,
|
| - TextInputElement,
|
| - UrlInputElement,
|
| - TelephoneInputElement,
|
| - EmailInputElement,
|
| - PasswordInputElement,
|
| - DateInputElement,
|
| - MonthInputElement,
|
| - WeekInputElement,
|
| - TimeInputElement,
|
| - LocalDateTimeInputElement,
|
| - NumberInputElement,
|
| - RangeInputElement,
|
| - CheckboxInputElement,
|
| - RadioButtonInputElement,
|
| - FileUploadInputElement,
|
| - SubmitButtonInputElement,
|
| - ImageButtonInputElement,
|
| - ResetButtonInputElement,
|
| - ButtonInputElement
|
| - native "HTMLInputElement" {
|
| -
|
| - factory InputElement({String type}) {
|
| - var e = document.$dom_createElement("input");
|
| - if (type != null) {
|
| - try {
|
| - // IE throws an exception for unknown types.
|
| - e.type = type;
|
| - } catch(_) {}
|
| - }
|
| - return e;
|
| - }
|
| -
|
| - @DomName('HTMLInputElement.webkitSpeechChangeEvent')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - static const EventStreamProvider<Event> speechChangeEvent = const EventStreamProvider<Event>('webkitSpeechChange');
|
| -
|
| - @DomName('HTMLInputElement.accept')
|
| - @DocsEditable
|
| - String accept;
|
| -
|
| - @DomName('HTMLInputElement.alt')
|
| - @DocsEditable
|
| - String alt;
|
| -
|
| - @DomName('HTMLInputElement.autocomplete')
|
| - @DocsEditable
|
| - String autocomplete;
|
| +// Interfaces representing the InputElement APIs which are supported
|
| +// for the various types of InputElement.
|
| +// From http://dev.w3.org/html5/spec/the-input-element.html#the-input-element.
|
|
|
| +/**
|
| + * Exposes the functionality common between all InputElement types.
|
| + */
|
| +abstract class InputElementBase implements Element {
|
| @DomName('HTMLInputElement.autofocus')
|
| - @DocsEditable
|
| bool autofocus;
|
|
|
| - @DomName('HTMLInputElement.checked')
|
| - @DocsEditable
|
| - bool checked;
|
| -
|
| - @DomName('HTMLInputElement.defaultChecked')
|
| - @DocsEditable
|
| - bool defaultChecked;
|
| -
|
| - @DomName('HTMLInputElement.defaultValue')
|
| - @DocsEditable
|
| - String defaultValue;
|
| -
|
| - @DomName('HTMLInputElement.dirName')
|
| - @DocsEditable
|
| - String dirName;
|
| -
|
| @DomName('HTMLInputElement.disabled')
|
| - @DocsEditable
|
| bool disabled;
|
|
|
| - @DomName('HTMLInputElement.files')
|
| - @DocsEditable
|
| - @Returns('FileList')
|
| - @Creates('FileList')
|
| - List<File> files;
|
| + @DomName('HTMLInputElement.incremental')
|
| + bool incremental;
|
|
|
| - @DomName('HTMLInputElement.form')
|
| - @DocsEditable
|
| - final FormElement form;
|
| + @DomName('HTMLInputElement.indeterminate')
|
| + bool indeterminate;
|
|
|
| - @DomName('HTMLInputElement.formAction')
|
| - @DocsEditable
|
| - String formAction;
|
| + @DomName('HTMLInputElement.labels')
|
| + List<Node> get labels;
|
|
|
| - @DomName('HTMLInputElement.formEnctype')
|
| - @DocsEditable
|
| - String formEnctype;
|
| + @DomName('HTMLInputElement.name')
|
| + String name;
|
|
|
| - @DomName('HTMLInputElement.formMethod')
|
| - @DocsEditable
|
| - String formMethod;
|
| + @DomName('HTMLInputElement.validationMessage')
|
| + String get validationMessage;
|
|
|
| - @DomName('HTMLInputElement.formNoValidate')
|
| - @DocsEditable
|
| - bool formNoValidate;
|
| + @DomName('HTMLInputElement.validity')
|
| + ValidityState get validity;
|
|
|
| - @DomName('HTMLInputElement.formTarget')
|
| - @DocsEditable
|
| - String formTarget;
|
| + @DomName('HTMLInputElement.value')
|
| + String value;
|
|
|
| - @DomName('HTMLInputElement.height')
|
| - @DocsEditable
|
| - int height;
|
| + @DomName('HTMLInputElement.willValidate')
|
| + bool get willValidate;
|
|
|
| - @DomName('HTMLInputElement.incremental')
|
| - @DocsEditable
|
| - bool incremental;
|
| + @DomName('HTMLInputElement.checkValidity')
|
| + bool checkValidity();
|
|
|
| - @DomName('HTMLInputElement.indeterminate')
|
| - @DocsEditable
|
| - bool indeterminate;
|
| + @DomName('HTMLInputElement.setCustomValidity')
|
| + void setCustomValidity(String error);
|
| +}
|
|
|
| - @DomName('HTMLInputElement.labels')
|
| - @DocsEditable
|
| - @Returns('NodeList')
|
| - @Creates('NodeList')
|
| - final List<Node> labels;
|
| +/**
|
| + * Hidden input which is not intended to be seen or edited by the user.
|
| + */
|
| +abstract class HiddenInputElement implements Element {
|
| + factory HiddenInputElement() => new InputElement(type: 'hidden');
|
| +}
|
|
|
| - @DomName('HTMLInputElement.list')
|
| - @DocsEditable
|
| - final Element list;
|
|
|
| - @DomName('HTMLInputElement.max')
|
| - @DocsEditable
|
| - String max;
|
| +/**
|
| + * Base interface for all inputs which involve text editing.
|
| + */
|
| +abstract class TextInputElementBase implements InputElementBase {
|
| + @DomName('HTMLInputElement.autocomplete')
|
| + String autocomplete;
|
|
|
| @DomName('HTMLInputElement.maxLength')
|
| - @DocsEditable
|
| int maxLength;
|
|
|
| - @DomName('HTMLInputElement.min')
|
| - @DocsEditable
|
| - String min;
|
| -
|
| - @DomName('HTMLInputElement.multiple')
|
| - @DocsEditable
|
| - bool multiple;
|
| -
|
| - @DomName('HTMLInputElement.name')
|
| - @DocsEditable
|
| - String name;
|
| -
|
| @DomName('HTMLInputElement.pattern')
|
| - @DocsEditable
|
| String pattern;
|
|
|
| @DomName('HTMLInputElement.placeholder')
|
| - @DocsEditable
|
| String placeholder;
|
|
|
| @DomName('HTMLInputElement.readOnly')
|
| - @DocsEditable
|
| bool readOnly;
|
|
|
| @DomName('HTMLInputElement.required')
|
| - @DocsEditable
|
| bool required;
|
|
|
| + @DomName('HTMLInputElement.size')
|
| + int size;
|
| +
|
| + @DomName('HTMLInputElement.select')
|
| + void select();
|
| +
|
| @DomName('HTMLInputElement.selectionDirection')
|
| - @DocsEditable
|
| String selectionDirection;
|
|
|
| @DomName('HTMLInputElement.selectionEnd')
|
| - @DocsEditable
|
| int selectionEnd;
|
|
|
| @DomName('HTMLInputElement.selectionStart')
|
| - @DocsEditable
|
| int selectionStart;
|
|
|
| - @DomName('HTMLInputElement.size')
|
| - @DocsEditable
|
| - int size;
|
| + @DomName('HTMLInputElement.setSelectionRange')
|
| + void setSelectionRange(int start, int end, [String direction]);
|
| +}
|
|
|
| - @DomName('HTMLInputElement.src')
|
| - @DocsEditable
|
| - String src;
|
| +/**
|
| + * Similar to [TextInputElement], but on platforms where search is styled
|
| + * differently this will get the search style.
|
| + *
|
| + * Use [supported] to check if this is supported on the current platform.
|
| + */
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +abstract class SearchInputElement implements TextInputElementBase {
|
| + factory SearchInputElement() => new InputElement(type: 'search');
|
|
|
| - @DomName('HTMLInputElement.step')
|
| - @DocsEditable
|
| - String step;
|
| + @DomName('HTMLInputElement.dirName')
|
| + String dirName;
|
|
|
| - @DomName('HTMLInputElement.type')
|
| - @DocsEditable
|
| - String type;
|
| + @DomName('HTMLInputElement.list')
|
| + Element get list;
|
|
|
| - @DomName('HTMLInputElement.useMap')
|
| - @DocsEditable
|
| - String useMap;
|
| + /// Returns true if this input type is supported on the current platform.
|
| + static bool get supported {
|
| + return (new InputElement(type: 'search')).type == 'search';
|
| + }
|
| +}
|
|
|
| - @DomName('HTMLInputElement.validationMessage')
|
| - @DocsEditable
|
| - final String validationMessage;
|
| +/**
|
| + * A basic text input editor control.
|
| + */
|
| +abstract class TextInputElement implements TextInputElementBase {
|
| + factory TextInputElement() => new InputElement(type: 'text');
|
|
|
| - @DomName('HTMLInputElement.validity')
|
| - @DocsEditable
|
| - final ValidityState validity;
|
| + @DomName('HTMLInputElement.dirName')
|
| + String dirName;
|
|
|
| - @DomName('HTMLInputElement.value')
|
| - @DocsEditable
|
| - String value;
|
| + @DomName('HTMLInputElement.list')
|
| + Element get list;
|
| +}
|
|
|
| - DateTime get valueAsDate => _convertNativeToDart_DateTime(this._get_valueAsDate);
|
| - @JSName('valueAsDate')
|
| - @DomName('HTMLInputElement.valueAsDate')
|
| - @DocsEditable
|
| - final dynamic _get_valueAsDate;
|
| +/**
|
| + * A control for editing an absolute URL.
|
| + *
|
| + * Use [supported] to check if this is supported on the current platform.
|
| + */
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +abstract class UrlInputElement implements TextInputElementBase {
|
| + factory UrlInputElement() => new InputElement(type: 'url');
|
|
|
| - void set valueAsDate(DateTime value) {
|
| - this._set_valueAsDate = _convertDartToNative_DateTime(value);
|
| - }
|
| - void set _set_valueAsDate(/*dynamic*/ value) {
|
| - JS("void", "#.valueAsDate = #", this, value);
|
| - }
|
| -
|
| - @DomName('HTMLInputElement.valueAsNumber')
|
| - @DocsEditable
|
| - num valueAsNumber;
|
| -
|
| - @JSName('webkitEntries')
|
| - @DomName('HTMLInputElement.webkitEntries')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - @Returns('_EntryArray')
|
| - @Creates('_EntryArray')
|
| - final List<Entry> entries;
|
| -
|
| - @JSName('webkitGrammar')
|
| - @DomName('HTMLInputElement.webkitGrammar')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool grammar;
|
| -
|
| - @JSName('webkitSpeech')
|
| - @DomName('HTMLInputElement.webkitSpeech')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool speech;
|
| -
|
| - @JSName('webkitdirectory')
|
| - @DomName('HTMLInputElement.webkitdirectory')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - bool directory;
|
| -
|
| - @DomName('HTMLInputElement.width')
|
| - @DocsEditable
|
| - int width;
|
| -
|
| - @DomName('HTMLInputElement.willValidate')
|
| - @DocsEditable
|
| - final bool willValidate;
|
| -
|
| - @DomName('HTMLInputElement.checkValidity')
|
| - @DocsEditable
|
| - bool checkValidity() native;
|
| -
|
| - @DomName('HTMLInputElement.select')
|
| - @DocsEditable
|
| - void select() native;
|
| -
|
| - @DomName('HTMLInputElement.setCustomValidity')
|
| - @DocsEditable
|
| - void setCustomValidity(String error) native;
|
| -
|
| - @DomName('HTMLInputElement.setRangeText')
|
| - @DocsEditable
|
| - void setRangeText(String replacement, {int start, int end, String selectionMode}) native;
|
| -
|
| - @DomName('HTMLInputElement.setSelectionRange')
|
| - @DocsEditable
|
| - void setSelectionRange(int start, int end, [String direction]) native;
|
| -
|
| - @DomName('HTMLInputElement.stepDown')
|
| - @DocsEditable
|
| - void stepDown([int n]) native;
|
| -
|
| - @DomName('HTMLInputElement.stepUp')
|
| - @DocsEditable
|
| - void stepUp([int n]) native;
|
| -
|
| - @DomName('HTMLInputElement.onwebkitSpeechChange')
|
| - @DocsEditable
|
| - Stream<Event> get onSpeechChange => speechChangeEvent.forTarget(this);
|
| -
|
| -}
|
| -
|
| -
|
| -// Interfaces representing the InputElement APIs which are supported
|
| -// for the various types of InputElement.
|
| -// From http://dev.w3.org/html5/spec/the-input-element.html#the-input-element.
|
| -
|
| -/**
|
| - * Exposes the functionality common between all InputElement types.
|
| - */
|
| -abstract class InputElementBase implements Element {
|
| - @DomName('HTMLInputElement.autofocus')
|
| - bool autofocus;
|
| -
|
| - @DomName('HTMLInputElement.disabled')
|
| - bool disabled;
|
| -
|
| - @DomName('HTMLInputElement.incremental')
|
| - bool incremental;
|
| -
|
| - @DomName('HTMLInputElement.indeterminate')
|
| - bool indeterminate;
|
| -
|
| - @DomName('HTMLInputElement.labels')
|
| - List<Node> get labels;
|
| -
|
| - @DomName('HTMLInputElement.name')
|
| - String name;
|
| -
|
| - @DomName('HTMLInputElement.validationMessage')
|
| - String get validationMessage;
|
| -
|
| - @DomName('HTMLInputElement.validity')
|
| - ValidityState get validity;
|
| -
|
| - @DomName('HTMLInputElement.value')
|
| - String value;
|
| -
|
| - @DomName('HTMLInputElement.willValidate')
|
| - bool get willValidate;
|
| -
|
| - @DomName('HTMLInputElement.checkValidity')
|
| - bool checkValidity();
|
| -
|
| - @DomName('HTMLInputElement.setCustomValidity')
|
| - void setCustomValidity(String error);
|
| -}
|
| -
|
| -/**
|
| - * Hidden input which is not intended to be seen or edited by the user.
|
| - */
|
| -abstract class HiddenInputElement implements Element {
|
| - factory HiddenInputElement() => new InputElement(type: 'hidden');
|
| -}
|
| -
|
| -
|
| -/**
|
| - * Base interface for all inputs which involve text editing.
|
| - */
|
| -abstract class TextInputElementBase implements InputElementBase {
|
| - @DomName('HTMLInputElement.autocomplete')
|
| - String autocomplete;
|
| -
|
| - @DomName('HTMLInputElement.maxLength')
|
| - int maxLength;
|
| -
|
| - @DomName('HTMLInputElement.pattern')
|
| - String pattern;
|
| -
|
| - @DomName('HTMLInputElement.placeholder')
|
| - String placeholder;
|
| -
|
| - @DomName('HTMLInputElement.readOnly')
|
| - bool readOnly;
|
| -
|
| - @DomName('HTMLInputElement.required')
|
| - bool required;
|
| -
|
| - @DomName('HTMLInputElement.size')
|
| - int size;
|
| -
|
| - @DomName('HTMLInputElement.select')
|
| - void select();
|
| -
|
| - @DomName('HTMLInputElement.selectionDirection')
|
| - String selectionDirection;
|
| -
|
| - @DomName('HTMLInputElement.selectionEnd')
|
| - int selectionEnd;
|
| -
|
| - @DomName('HTMLInputElement.selectionStart')
|
| - int selectionStart;
|
| -
|
| - @DomName('HTMLInputElement.setSelectionRange')
|
| - void setSelectionRange(int start, int end, [String direction]);
|
| -}
|
| -
|
| -/**
|
| - * Similar to [TextInputElement], but on platforms where search is styled
|
| - * differently this will get the search style.
|
| - *
|
| - * Use [supported] to check if this is supported on the current platform.
|
| - */
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| -@SupportedBrowser(SupportedBrowser.IE, '10')
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -abstract class SearchInputElement implements TextInputElementBase {
|
| - factory SearchInputElement() => new InputElement(type: 'search');
|
| -
|
| - @DomName('HTMLInputElement.dirName')
|
| - String dirName;
|
| -
|
| - @DomName('HTMLInputElement.list')
|
| - Element get list;
|
| -
|
| - /// Returns true if this input type is supported on the current platform.
|
| - static bool get supported {
|
| - return (new InputElement(type: 'search')).type == 'search';
|
| - }
|
| -}
|
| -
|
| -/**
|
| - * A basic text input editor control.
|
| - */
|
| -abstract class TextInputElement implements TextInputElementBase {
|
| - factory TextInputElement() => new InputElement(type: 'text');
|
| -
|
| - @DomName('HTMLInputElement.dirName')
|
| - String dirName;
|
| -
|
| - @DomName('HTMLInputElement.list')
|
| - Element get list;
|
| -}
|
| -
|
| -/**
|
| - * A control for editing an absolute URL.
|
| - *
|
| - * Use [supported] to check if this is supported on the current platform.
|
| - */
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| -@SupportedBrowser(SupportedBrowser.IE, '10')
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -abstract class UrlInputElement implements TextInputElementBase {
|
| - factory UrlInputElement() => new InputElement(type: 'url');
|
| -
|
| - @DomName('HTMLInputElement.list')
|
| - Element get list;
|
| + @DomName('HTMLInputElement.list')
|
| + Element get list;
|
|
|
| /// Returns true if this input type is supported on the current platform.
|
| static bool get supported {
|
| @@ -14248,7 +13508,7 @@ class MimeType native "MimeType" {
|
|
|
| @DocsEditable
|
| @DomName('MimeTypeArray')
|
| -class MimeTypeArray implements JavaScriptIndexingBehavior, List<MimeType> native "MimeTypeArray" {
|
| +class MimeTypeArray extends Object with ListMixin<MimeType>, ImmutableListMixin<MimeType> implements JavaScriptIndexingBehavior, List<MimeType> native "MimeTypeArray" {
|
|
|
| @DomName('DOMMimeTypeArray.length')
|
| @DocsEditable
|
| @@ -14262,218 +13522,33 @@ class MimeTypeArray implements JavaScriptIndexingBehavior, List<MimeType> native
|
| // -- start List<MimeType> mixins.
|
| // MimeType is the element type.
|
|
|
| - // From Iterable<MimeType>:
|
| -
|
| - Iterator<MimeType> 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<MimeType>(this);
|
| - }
|
| -
|
| - MimeType reduce(MimeType combine(MimeType value, MimeType element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, MimeType element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - bool contains(MimeType element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(MimeType element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(MimeType element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<MimeType> where(bool f(MimeType element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + // -- end List<MimeType> mixins.
|
|
|
| - Iterable expand(Iterable f(MimeType element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMMimeTypeArray.item')
|
| + @DocsEditable
|
| + MimeType item(int index) native;
|
|
|
| - bool every(bool f(MimeType element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMMimeTypeArray.namedItem')
|
| + @DocsEditable
|
| + MimeType 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.
|
|
|
| - bool any(bool f(MimeType element)) => IterableMixinWorkaround.any(this, f);
|
|
|
| - List<MimeType> toList({ bool growable: true }) =>
|
| - new List<MimeType>.from(this, growable: growable);
|
| +@DocsEditable
|
| +@DomName('HTMLModElement')
|
| +class ModElement extends Element native "HTMLModElement" {
|
|
|
| - Set<MimeType> toSet() => new Set<MimeType>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<MimeType> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<MimeType> takeWhile(bool test(MimeType value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<MimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<MimeType> skipWhile(bool test(MimeType value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - MimeType firstWhere(bool test(MimeType value), { MimeType orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - MimeType lastWhere(bool test(MimeType value), {MimeType orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - MimeType singleWhere(bool test(MimeType value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - MimeType elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<MimeType>:
|
| -
|
| - void add(MimeType value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<MimeType> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<MimeType>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<MimeType> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(MimeType a, MimeType b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(MimeType element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(MimeType element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - MimeType get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - MimeType get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - MimeType 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, MimeType element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<MimeType> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<MimeType> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - MimeType removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - MimeType 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(MimeType element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(MimeType element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<MimeType> 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<MimeType> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [MimeType fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<MimeType> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<MimeType> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <MimeType>[]);
|
| - }
|
| -
|
| - Map<int, MimeType> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<MimeType> mixins.
|
| -
|
| - @DomName('DOMMimeTypeArray.item')
|
| - @DocsEditable
|
| - MimeType item(int index) native;
|
| -
|
| - @DomName('DOMMimeTypeArray.namedItem')
|
| - @DocsEditable
|
| - MimeType 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.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('HTMLModElement')
|
| -class ModElement extends Element native "HTMLModElement" {
|
| -
|
| - @DomName('HTMLModElement.cite')
|
| - @DocsEditable
|
| - String cite;
|
| + @DomName('HTMLModElement.cite')
|
| + @DocsEditable
|
| + String cite;
|
|
|
| @DomName('HTMLModElement.dateTime')
|
| @DocsEditable
|
| @@ -15685,7 +14760,7 @@ class NodeIterator native "NodeIterator" {
|
|
|
| @DocsEditable
|
| @DomName('NodeList')
|
| -class NodeList implements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" {
|
| +class NodeList extends Object with ListMixin<Node>, ImmutableListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" {
|
|
|
| @DomName('NodeList.length')
|
| @DocsEditable
|
| @@ -15699,196 +14774,11 @@ 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);
|
| - }
|
| -
|
| - Node reduce(Node combine(Node value, Node element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - 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.
|
|
|
| @JSName('item')
|
| @@ -16851,7 +15741,7 @@ class Plugin native "Plugin" {
|
|
|
| @DocsEditable
|
| @DomName('PluginArray')
|
| -class PluginArray implements JavaScriptIndexingBehavior, List<Plugin> native "PluginArray" {
|
| +class PluginArray extends Object with ListMixin<Plugin>, ImmutableListMixin<Plugin> implements JavaScriptIndexingBehavior, List<Plugin> native "PluginArray" {
|
|
|
| @DomName('DOMPluginArray.length')
|
| @DocsEditable
|
| @@ -16865,222 +15755,37 @@ class PluginArray implements JavaScriptIndexingBehavior, List<Plugin> native "Pl
|
| // -- start List<Plugin> mixins.
|
| // Plugin is the element type.
|
|
|
| - // From Iterable<Plugin>:
|
| -
|
| - Iterator<Plugin> 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<Plugin>(this);
|
| - }
|
|
|
| - Plugin reduce(Plugin combine(Plugin value, Plugin element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Plugin element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - bool contains(Plugin element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Plugin element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Plugin element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + // -- end List<Plugin> mixins.
|
|
|
| - Iterable<Plugin> where(bool f(Plugin element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('DOMPluginArray.item')
|
| + @DocsEditable
|
| + Plugin item(int index) native;
|
|
|
| - Iterable expand(Iterable f(Plugin element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMPluginArray.namedItem')
|
| + @DocsEditable
|
| + Plugin namedItem(String name) native;
|
|
|
| - bool every(bool f(Plugin element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMPluginArray.refresh')
|
| + @DocsEditable
|
| + void refresh(bool reload) 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 any(bool f(Plugin element)) => IterableMixinWorkaround.any(this, f);
|
|
|
| - List<Plugin> toList({ bool growable: true }) =>
|
| - new List<Plugin>.from(this, growable: growable);
|
| -
|
| - Set<Plugin> toSet() => new Set<Plugin>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<Plugin> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<Plugin> takeWhile(bool test(Plugin value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<Plugin> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<Plugin> skipWhile(bool test(Plugin value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - Plugin firstWhere(bool test(Plugin value), { Plugin orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - Plugin lastWhere(bool test(Plugin value), {Plugin orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - Plugin singleWhere(bool test(Plugin value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - Plugin elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<Plugin>:
|
| -
|
| - void add(Plugin value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<Plugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<Plugin>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<Plugin> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(Plugin a, Plugin b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(Plugin element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(Plugin element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - Plugin get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Plugin get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - Plugin 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, Plugin element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<Plugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<Plugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Plugin removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - Plugin 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(Plugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(Plugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<Plugin> 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<Plugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [Plugin fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<Plugin> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<Plugin> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Plugin>[]);
|
| - }
|
| -
|
| - Map<int, Plugin> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<Plugin> mixins.
|
| -
|
| - @DomName('DOMPluginArray.item')
|
| - @DocsEditable
|
| - Plugin item(int index) native;
|
| -
|
| - @DomName('DOMPluginArray.namedItem')
|
| - @DocsEditable
|
| - Plugin namedItem(String name) native;
|
| -
|
| - @DomName('DOMPluginArray.refresh')
|
| - @DocsEditable
|
| - void refresh(bool reload) 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('PopStateEvent')
|
| -@SupportedBrowser(SupportedBrowser.CHROME)
|
| -@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| -@SupportedBrowser(SupportedBrowser.IE, '10')
|
| -@SupportedBrowser(SupportedBrowser.SAFARI)
|
| -class PopStateEvent extends Event native "PopStateEvent" {
|
| +@DocsEditable
|
| +@DomName('PopStateEvent')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +class PopStateEvent extends Event native "PopStateEvent" {
|
|
|
| dynamic get state => convertNativeToDart_SerializedScriptValue(this._get_state);
|
| @JSName('state')
|
| @@ -18691,7 +17396,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
|
| @@ -18705,196 +17410,11 @@ 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);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, SourceBuffer element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(SourceBuffer element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(SourceBuffer element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
|
|
| - Iterable map(f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<SourceBuffer> where(bool f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(SourceBuffer element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(SourceBuffer element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(SourceBuffer element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<SourceBuffer> toList({ bool growable: true }) =>
|
| - new List<SourceBuffer>.from(this, growable: growable);
|
| -
|
| - Set<SourceBuffer> toSet() => new Set<SourceBuffer>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<SourceBuffer> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<SourceBuffer> takeWhile(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<SourceBuffer> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<SourceBuffer> skipWhile(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - SourceBuffer firstWhere(bool test(SourceBuffer value), { SourceBuffer orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - SourceBuffer lastWhere(bool test(SourceBuffer value), {SourceBuffer orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - SourceBuffer singleWhere(bool test(SourceBuffer value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - SourceBuffer elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<SourceBuffer>:
|
| -
|
| - void add(SourceBuffer value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<SourceBuffer> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // 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);
|
| -
|
| - List<SourceBuffer> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SourceBuffer>[]);
|
| - }
|
| -
|
| - Map<int, SourceBuffer> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| // -- end List<SourceBuffer> mixins.
|
|
|
| @JSName('addEventListener')
|
| @@ -18984,7 +17504,7 @@ class SpeechGrammar native "SpeechGrammar" {
|
|
|
| @DocsEditable
|
| @DomName('SpeechGrammarList')
|
| -class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "SpeechGrammarList" {
|
| +class SpeechGrammarList extends Object with ListMixin<SpeechGrammar>, ImmutableListMixin<SpeechGrammar> implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "SpeechGrammarList" {
|
|
|
| @DomName('SpeechGrammarList.SpeechGrammarList')
|
| @DocsEditable
|
| @@ -19005,233 +17525,48 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
|
| // -- start List<SpeechGrammar> mixins.
|
| // SpeechGrammar is the element type.
|
|
|
| - // From Iterable<SpeechGrammar>:
|
| -
|
| - 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);
|
| - }
|
|
|
| - SpeechGrammar reduce(SpeechGrammar combine(SpeechGrammar value, SpeechGrammar 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, SpeechGrammar element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + // -- end List<SpeechGrammar> mixins.
|
|
|
| - bool contains(SpeechGrammar element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('SpeechGrammarList.addFromString')
|
| + @DocsEditable
|
| + void addFromString(String string, [num weight]) native;
|
|
|
| - void forEach(void f(SpeechGrammar element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('SpeechGrammarList.addFromUri')
|
| + @DocsEditable
|
| + void addFromUri(String src, [num weight]) native;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @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.
|
|
|
| - Iterable map(f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
|
|
| - Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| +@DocsEditable
|
| +@DomName('SpeechInputEvent')
|
| +class SpeechInputEvent extends Event native "SpeechInputEvent" {
|
|
|
| - Iterable expand(Iterable f(SpeechGrammar element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @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.
|
|
|
| - bool every(bool f(SpeechGrammar element)) => IterableMixinWorkaround.every(this, f);
|
|
|
| - bool any(bool f(SpeechGrammar element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<SpeechGrammar> toList({ bool growable: true }) =>
|
| - new List<SpeechGrammar>.from(this, growable: growable);
|
| -
|
| - Set<SpeechGrammar> toSet() => new Set<SpeechGrammar>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<SpeechGrammar> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<SpeechGrammar> takeWhile(bool test(SpeechGrammar value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<SpeechGrammar> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<SpeechGrammar> skipWhile(bool test(SpeechGrammar value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - 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" {
|
| +@DocsEditable
|
| +@DomName('SpeechInputResult')
|
| +class SpeechInputResult native "SpeechInputResult" {
|
|
|
| @DomName('SpeechInputResult.confidence')
|
| @DocsEditable
|
| @@ -20458,7 +18793,7 @@ class TextTrackCue extends EventTarget native "TextTrackCue" {
|
|
|
| @DocsEditable
|
| @DomName('TextTrackCueList')
|
| -class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior native "TextTrackCueList" {
|
| +class TextTrackCueList extends Object with ListMixin<TextTrackCue>, ImmutableListMixin<TextTrackCue> implements List<TextTrackCue>, JavaScriptIndexingBehavior native "TextTrackCueList" {
|
|
|
| @DomName('TextTrackCueList.length')
|
| @DocsEditable
|
| @@ -20472,196 +18807,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')
|
| @@ -20679,7 +18829,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 ListMixin<TextTrack>, ImmutableListMixin<TextTrack> implements JavaScriptIndexingBehavior, List<TextTrack> native "TextTrackList" {
|
|
|
| @DomName('TextTrackList.addtrackEvent')
|
| @DocsEditable
|
| @@ -20697,215 +18847,30 @@ 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);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - bool contains(TextTrack element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(TextTrack element)) => IterableMixinWorkaround.forEach(this, f);
|
| + // -- end List<TextTrack> mixins.
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @JSName('addEventListener')
|
| + @DomName('TextTrackList.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - Iterable map(f(TextTrack element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('TextTrackList.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event evt) native;
|
|
|
| - Iterable<TextTrack> where(bool f(TextTrack element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('TextTrackList.item')
|
| + @DocsEditable
|
| + TextTrack item(int index) native;
|
|
|
| - 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')
|
| - @DomName('TextTrackList.addEventListener')
|
| - @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| -
|
| - @DomName('TextTrackList.dispatchEvent')
|
| - @DocsEditable
|
| - bool dispatchEvent(Event evt) native;
|
| -
|
| - @DomName('TextTrackList.item')
|
| - @DocsEditable
|
| - TextTrack item(int index) native;
|
| -
|
| - @JSName('removeEventListener')
|
| - @DomName('TextTrackList.removeEventListener')
|
| - @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| + @JSName('removeEventListener')
|
| + @DomName('TextTrackList.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| @DomName('TextTrackList.onaddtrack')
|
| @DocsEditable
|
| @@ -21127,7 +19092,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.
|
| @@ -21148,196 +19113,11 @@ 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);
|
| - }
|
| -
|
| - Touch reduce(Touch combine(Touch value, Touch element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Touch element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(Touch element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(Touch element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(Touch element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<Touch> where(bool f(Touch element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(Touch element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(Touch element)) => IterableMixinWorkaround.every(this, f);
|
|
|
| - 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')
|
| @@ -22315,2736 +20095,924 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| * request. This value only needs to be saved if you intend to call
|
| * [cancelAnimationFrame] so you can specify the particular animation to
|
| * cancel.
|
| - *
|
| - * Note: The supplied [callback] needs to call [requestAnimationFrame] again
|
| - * for the animation to continue.
|
| - */
|
| - @DomName('DOMWindow.requestAnimationFrame')
|
| - int requestAnimationFrame(RequestAnimationFrameCallback callback) {
|
| - _ensureRequestAnimationFrame();
|
| - return _requestAnimationFrame(callback);
|
| - }
|
| -
|
| - void cancelAnimationFrame(id) {
|
| - _ensureRequestAnimationFrame();
|
| - _cancelAnimationFrame(id);
|
| - }
|
| -
|
| - @JSName('requestAnimationFrame')
|
| - int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
|
| -
|
| - @JSName('cancelAnimationFrame')
|
| - void _cancelAnimationFrame(int id) native;
|
| -
|
| - _ensureRequestAnimationFrame() {
|
| - if (JS('bool',
|
| - '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this))
|
| - return;
|
| -
|
| - JS('void',
|
| - r"""
|
| - (function($this) {
|
| - var vendors = ['ms', 'moz', 'webkit', 'o'];
|
| - for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) {
|
| - $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame'];
|
| - $this.cancelAnimationFrame =
|
| - $this[vendors[i]+'CancelAnimationFrame'] ||
|
| - $this[vendors[i]+'CancelRequestAnimationFrame'];
|
| - }
|
| - if ($this.requestAnimationFrame && $this.cancelAnimationFrame) return;
|
| - $this.requestAnimationFrame = function(callback) {
|
| - return window.setTimeout(function() {
|
| - callback(Date.now());
|
| - }, 16 /* 16ms ~= 60fps */);
|
| - };
|
| - $this.cancelAnimationFrame = function(id) { clearTimeout(id); }
|
| - })(#)""",
|
| - this);
|
| - }
|
| -
|
| - /**
|
| - * Gets an instance of the Indexed DB factory to being using Indexed DB.
|
| - *
|
| - * Use [IdbFactory.supported] to check if Indexed DB is supported on the
|
| - * current platform.
|
| - */
|
| - @SupportedBrowser(SupportedBrowser.CHROME, '23.0')
|
| - @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
|
| - @SupportedBrowser(SupportedBrowser.IE, '10.0')
|
| - @Experimental
|
| - IdbFactory get indexedDB =>
|
| - JS('IdbFactory|Null', // If not supported, returns `null`.
|
| - '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
|
| - this, this, this);
|
| -
|
| - @DomName('Window.console')
|
| - Console get console => Console.safeConsole;
|
| -
|
| - /// Checks if _setImmediate is supported.
|
| - static bool get _supportsSetImmediate =>
|
| - JS('bool', '!!(window.setImmediate)');
|
| -
|
| - // Set immediate implementation for IE
|
| - void _setImmediate(void callback()) {
|
| - JS('void', '#.setImmediate(#)', this, convertDartClosureToJS(callback, 0));
|
| - }
|
| -
|
| - /**
|
| - * Access a sandboxed file system of the specified `size`. If `persistent` is
|
| - * true, the application will request permission from the user to create
|
| - * lasting storage. This storage cannot be freed without the user's
|
| - * permission. Returns a [Future] whose value stores a reference to the
|
| - * sandboxed file system for use. Because the file system is sandboxed,
|
| - * applications cannot access file systems created in other web pages.
|
| - */
|
| - Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) {
|
| - return _requestFileSystem(persistent? 1 : 0, size);
|
| - }
|
| -
|
| - @DomName('DOMWindow.convertPointFromNodeToPage')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - Point convertPointFromNodeToPage(Node node, Point point) {
|
| - var result = _convertPointFromNodeToPage(node,
|
| - new _DomPoint(point.x, point.y));
|
| - return new Point(result.x, result.y);
|
| - }
|
| -
|
| - @DomName('DOMWindow.convertPointFromPageToNode')
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - Point convertPointFromPageToNode(Node node, Point point) {
|
| - var result = _convertPointFromPageToNode(node,
|
| - new _DomPoint(point.x, point.y));
|
| - return new Point(result.x, result.y);
|
| - }
|
| -
|
| - /**
|
| - * Checks whether [convertPointFromNodeToPage] and
|
| - * [convertPointFromPageToNode] are supported on the current platform.
|
| - */
|
| - static bool get supportsPointConversions => _DomPoint.supported;
|
| -
|
| - @DomName('DOMWindow.DOMContentLoadedEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> contentLoadedEvent = const EventStreamProvider<Event>('DOMContentLoaded');
|
| -
|
| - @DomName('DOMWindow.devicemotionEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<DeviceMotionEvent> deviceMotionEvent = const EventStreamProvider<DeviceMotionEvent>('devicemotion');
|
| -
|
| - @DomName('DOMWindow.deviceorientationEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<DeviceOrientationEvent> deviceOrientationEvent = const EventStreamProvider<DeviceOrientationEvent>('deviceorientation');
|
| -
|
| - @DomName('DOMWindow.hashchangeEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
|
| -
|
| - @DomName('DOMWindow.messageEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
|
| -
|
| - @DomName('DOMWindow.offlineEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
|
| -
|
| - @DomName('DOMWindow.onlineEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
|
| -
|
| - @DomName('DOMWindow.pagehideEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> pageHideEvent = const EventStreamProvider<Event>('pagehide');
|
| -
|
| - @DomName('DOMWindow.pageshowEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> pageShowEvent = const EventStreamProvider<Event>('pageshow');
|
| -
|
| - @DomName('DOMWindow.popstateEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
|
| -
|
| - @DomName('DOMWindow.resizeEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
|
| -
|
| - @DomName('DOMWindow.storageEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
|
| -
|
| - @DomName('DOMWindow.unloadEvent')
|
| - @DocsEditable
|
| - static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
|
| -
|
| - @DomName('DOMWindow.webkitAnimationEndEvent')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - static const EventStreamProvider<AnimationEvent> animationEndEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationEnd');
|
| -
|
| - @DomName('DOMWindow.webkitAnimationIterationEvent')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - static const EventStreamProvider<AnimationEvent> animationIterationEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationIteration');
|
| -
|
| - @DomName('DOMWindow.webkitAnimationStartEvent')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - static const EventStreamProvider<AnimationEvent> animationStartEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationStart');
|
| -
|
| - static const int PERSISTENT = 1;
|
| -
|
| - static const int TEMPORARY = 0;
|
| -
|
| - @DomName('DOMWindow.applicationCache')
|
| - @DocsEditable
|
| - final ApplicationCache applicationCache;
|
| -
|
| - @DomName('DOMWindow.closed')
|
| - @DocsEditable
|
| - final bool closed;
|
| -
|
| - @DomName('DOMWindow.crypto')
|
| - @DocsEditable
|
| - final Crypto crypto;
|
| -
|
| - @DomName('DOMWindow.defaultStatus')
|
| - @DocsEditable
|
| - String defaultStatus;
|
| -
|
| - @DomName('DOMWindow.defaultstatus')
|
| - @DocsEditable
|
| - String defaultstatus;
|
| -
|
| - @DomName('DOMWindow.devicePixelRatio')
|
| - @DocsEditable
|
| - final num devicePixelRatio;
|
| -
|
| - @DomName('DOMWindow.event')
|
| - @DocsEditable
|
| - final Event event;
|
| -
|
| - @DomName('DOMWindow.history')
|
| - @DocsEditable
|
| - final History history;
|
| -
|
| - @DomName('DOMWindow.innerHeight')
|
| - @DocsEditable
|
| - final int innerHeight;
|
| -
|
| - @DomName('DOMWindow.innerWidth')
|
| - @DocsEditable
|
| - final int innerWidth;
|
| -
|
| - @DomName('DOMWindow.localStorage')
|
| - @DocsEditable
|
| - final Storage localStorage;
|
| -
|
| - @DomName('DOMWindow.locationbar')
|
| - @DocsEditable
|
| - final BarInfo locationbar;
|
| -
|
| - @DomName('DOMWindow.menubar')
|
| - @DocsEditable
|
| - final BarInfo menubar;
|
| -
|
| - @DomName('DOMWindow.name')
|
| - @DocsEditable
|
| - String name;
|
| -
|
| - @DomName('DOMWindow.navigator')
|
| - @DocsEditable
|
| - final Navigator navigator;
|
| -
|
| - @DomName('DOMWindow.offscreenBuffering')
|
| - @DocsEditable
|
| - final bool offscreenBuffering;
|
| -
|
| - WindowBase get opener => _convertNativeToDart_Window(this._get_opener);
|
| - @JSName('opener')
|
| - @DomName('DOMWindow.opener')
|
| - @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_opener;
|
| -
|
| - @DomName('DOMWindow.outerHeight')
|
| - @DocsEditable
|
| - final int outerHeight;
|
| -
|
| - @DomName('DOMWindow.outerWidth')
|
| - @DocsEditable
|
| - final int outerWidth;
|
| -
|
| - @DomName('DOMWindow.pageXOffset')
|
| - @DocsEditable
|
| - final int pageXOffset;
|
| -
|
| - @DomName('DOMWindow.pageYOffset')
|
| - @DocsEditable
|
| - final int pageYOffset;
|
| -
|
| - WindowBase get parent => _convertNativeToDart_Window(this._get_parent);
|
| - @JSName('parent')
|
| - @DomName('DOMWindow.parent')
|
| - @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_parent;
|
| -
|
| - @DomName('DOMWindow.performance')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| - @SupportedBrowser(SupportedBrowser.IE)
|
| - final Performance performance;
|
| -
|
| - @DomName('DOMWindow.personalbar')
|
| - @DocsEditable
|
| - final BarInfo personalbar;
|
| -
|
| - @DomName('DOMWindow.screen')
|
| - @DocsEditable
|
| - final Screen screen;
|
| -
|
| - @DomName('DOMWindow.screenLeft')
|
| - @DocsEditable
|
| - final int screenLeft;
|
| -
|
| - @DomName('DOMWindow.screenTop')
|
| - @DocsEditable
|
| - final int screenTop;
|
| -
|
| - @DomName('DOMWindow.screenX')
|
| - @DocsEditable
|
| - final int screenX;
|
| -
|
| - @DomName('DOMWindow.screenY')
|
| - @DocsEditable
|
| - final int screenY;
|
| -
|
| - @DomName('DOMWindow.scrollX')
|
| - @DocsEditable
|
| - final int scrollX;
|
| -
|
| - @DomName('DOMWindow.scrollY')
|
| - @DocsEditable
|
| - final int scrollY;
|
| -
|
| - @DomName('DOMWindow.scrollbars')
|
| - @DocsEditable
|
| - final BarInfo scrollbars;
|
| -
|
| - WindowBase get self => _convertNativeToDart_Window(this._get_self);
|
| - @JSName('self')
|
| - @DomName('DOMWindow.self')
|
| - @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_self;
|
| -
|
| - @DomName('DOMWindow.sessionStorage')
|
| - @DocsEditable
|
| - final Storage sessionStorage;
|
| -
|
| - @DomName('DOMWindow.status')
|
| - @DocsEditable
|
| - String status;
|
| -
|
| - @DomName('DOMWindow.statusbar')
|
| - @DocsEditable
|
| - final BarInfo statusbar;
|
| -
|
| - @DomName('DOMWindow.styleMedia')
|
| - @DocsEditable
|
| - final StyleMedia styleMedia;
|
| -
|
| - @DomName('DOMWindow.toolbar')
|
| - @DocsEditable
|
| - final BarInfo toolbar;
|
| -
|
| - WindowBase get top => _convertNativeToDart_Window(this._get_top);
|
| - @JSName('top')
|
| - @DomName('DOMWindow.top')
|
| - @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_top;
|
| -
|
| - @JSName('webkitNotifications')
|
| - @DomName('DOMWindow.webkitNotifications')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - final NotificationCenter notifications;
|
| -
|
| - @JSName('webkitStorageInfo')
|
| - @DomName('DOMWindow.webkitStorageInfo')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - final StorageInfo storageInfo;
|
| -
|
| - WindowBase get window => _convertNativeToDart_Window(this._get_window);
|
| - @JSName('window')
|
| - @DomName('DOMWindow.window')
|
| - @DocsEditable
|
| - @Creates('Window|=Object')
|
| - @Returns('Window|=Object')
|
| - final dynamic _get_window;
|
| -
|
| - @JSName('addEventListener')
|
| - @DomName('DOMWindow.addEventListener')
|
| - @DocsEditable
|
| - void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| -
|
| - @DomName('DOMWindow.alert')
|
| - @DocsEditable
|
| - void alert(String message) native;
|
| -
|
| - @DomName('DOMWindow.atob')
|
| - @DocsEditable
|
| - String atob(String string) native;
|
| -
|
| - @DomName('DOMWindow.btoa')
|
| - @DocsEditable
|
| - String btoa(String string) native;
|
| -
|
| - @DomName('DOMWindow.captureEvents')
|
| - @DocsEditable
|
| - void captureEvents() native;
|
| -
|
| - @JSName('clearInterval')
|
| - @DomName('DOMWindow.clearInterval')
|
| - @DocsEditable
|
| - void _clearInterval(int handle) native;
|
| -
|
| - @JSName('clearTimeout')
|
| - @DomName('DOMWindow.clearTimeout')
|
| - @DocsEditable
|
| - void _clearTimeout(int handle) native;
|
| -
|
| - @DomName('DOMWindow.close')
|
| - @DocsEditable
|
| - void close() native;
|
| -
|
| - @DomName('DOMWindow.confirm')
|
| - @DocsEditable
|
| - bool confirm(String message) native;
|
| -
|
| - @DomName('DOMWindow.dispatchEvent')
|
| - @DocsEditable
|
| - bool dispatchEvent(Event evt) native;
|
| -
|
| - @DomName('DOMWindow.find')
|
| - @DocsEditable
|
| - bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native;
|
| -
|
| - @JSName('getComputedStyle')
|
| - @DomName('DOMWindow.getComputedStyle')
|
| - @DocsEditable
|
| - CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native;
|
| -
|
| - @JSName('getMatchedCSSRules')
|
| - @DomName('DOMWindow.getMatchedCSSRules')
|
| - @DocsEditable
|
| - @Returns('_CssRuleList')
|
| - @Creates('_CssRuleList')
|
| - List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native;
|
| -
|
| - @DomName('DOMWindow.getSelection')
|
| - @DocsEditable
|
| - Selection getSelection() native;
|
| -
|
| - @DomName('DOMWindow.matchMedia')
|
| - @DocsEditable
|
| - MediaQueryList matchMedia(String query) native;
|
| -
|
| - @DomName('DOMWindow.moveBy')
|
| - @DocsEditable
|
| - void moveBy(num x, num y) native;
|
| -
|
| - @DomName('DOMWindow.moveTo')
|
| - @DocsEditable
|
| - void moveTo(num x, num y) native;
|
| -
|
| - @DomName('DOMWindow.openDatabase')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - @Creates('SqlDatabase')
|
| - SqlDatabase openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
|
| -
|
| - @DomName('DOMWindow.postMessage')
|
| - @DocsEditable
|
| - void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
|
| - if (?messagePorts) {
|
| - var message_1 = convertDartToNative_SerializedScriptValue(message);
|
| - _postMessage_1(message_1, targetOrigin, messagePorts);
|
| - return;
|
| - }
|
| - var message_2 = convertDartToNative_SerializedScriptValue(message);
|
| - _postMessage_2(message_2, targetOrigin);
|
| - return;
|
| - }
|
| - @JSName('postMessage')
|
| - @DomName('DOMWindow.postMessage')
|
| - @DocsEditable
|
| - void _postMessage_1(message, targetOrigin, List messagePorts) native;
|
| - @JSName('postMessage')
|
| - @DomName('DOMWindow.postMessage')
|
| - @DocsEditable
|
| - void _postMessage_2(message, targetOrigin) native;
|
| -
|
| - @DomName('DOMWindow.print')
|
| - @DocsEditable
|
| - void print() native;
|
| -
|
| - @DomName('DOMWindow.releaseEvents')
|
| - @DocsEditable
|
| - void releaseEvents() native;
|
| -
|
| - @JSName('removeEventListener')
|
| - @DomName('DOMWindow.removeEventListener')
|
| - @DocsEditable
|
| - void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
| -
|
| - @DomName('DOMWindow.resizeBy')
|
| - @DocsEditable
|
| - void resizeBy(num x, num y) native;
|
| -
|
| - @DomName('DOMWindow.resizeTo')
|
| - @DocsEditable
|
| - void resizeTo(num width, num height) native;
|
| -
|
| - @DomName('DOMWindow.scroll')
|
| - @DocsEditable
|
| - void scroll(int x, int y) native;
|
| -
|
| - @DomName('DOMWindow.scrollBy')
|
| - @DocsEditable
|
| - void scrollBy(int x, int y) native;
|
| -
|
| - @DomName('DOMWindow.scrollTo')
|
| - @DocsEditable
|
| - void scrollTo(int x, int y) native;
|
| -
|
| - @JSName('setInterval')
|
| - @DomName('DOMWindow.setInterval')
|
| - @DocsEditable
|
| - int _setInterval(Object handler, int timeout) native;
|
| -
|
| - @JSName('setTimeout')
|
| - @DomName('DOMWindow.setTimeout')
|
| - @DocsEditable
|
| - int _setTimeout(Object handler, int timeout) native;
|
| -
|
| - @DomName('DOMWindow.showModalDialog')
|
| - @DocsEditable
|
| - Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
|
| -
|
| - @DomName('DOMWindow.stop')
|
| - @DocsEditable
|
| - void stop() native;
|
| -
|
| - @DomName('DOMWindow.toString')
|
| - @DocsEditable
|
| - String toString() native;
|
| -
|
| - @JSName('webkitConvertPointFromNodeToPage')
|
| - @DomName('DOMWindow.webkitConvertPointFromNodeToPage')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - _DomPoint _convertPointFromNodeToPage(Node node, _DomPoint p) native;
|
| -
|
| - @JSName('webkitConvertPointFromPageToNode')
|
| - @DomName('DOMWindow.webkitConvertPointFromPageToNode')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @SupportedBrowser(SupportedBrowser.SAFARI)
|
| - @Experimental
|
| - _DomPoint _convertPointFromPageToNode(Node node, _DomPoint p) native;
|
| -
|
| - @JSName('webkitRequestFileSystem')
|
| - @DomName('DOMWindow.webkitRequestFileSystem')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @Experimental
|
| - void __requestFileSystem(int type, int size, _FileSystemCallback successCallback, [_ErrorCallback errorCallback]) native;
|
| -
|
| - @JSName('webkitRequestFileSystem')
|
| - @DomName('DOMWindow.webkitRequestFileSystem')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @Experimental
|
| - Future<FileSystem> _requestFileSystem(int type, int size) {
|
| - var completer = new Completer<FileSystem>();
|
| - __requestFileSystem(type, size,
|
| - (value) { completer.complete(value); },
|
| - (error) { completer.completeError(error); });
|
| - return completer.future;
|
| - }
|
| -
|
| - @JSName('webkitResolveLocalFileSystemURL')
|
| - @DomName('DOMWindow.webkitResolveLocalFileSystemURL')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @Experimental
|
| - void _resolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) native;
|
| -
|
| - @JSName('webkitResolveLocalFileSystemURL')
|
| - @DomName('DOMWindow.webkitResolveLocalFileSystemURL')
|
| - @DocsEditable
|
| - @SupportedBrowser(SupportedBrowser.CHROME)
|
| - @Experimental
|
| - Future<Entry> resolveLocalFileSystemUrl(String url) {
|
| - var completer = new Completer<Entry>();
|
| - _resolveLocalFileSystemUrl(url,
|
| - (value) { completer.complete(value); },
|
| - (error) { completer.completeError(error); });
|
| - return completer.future;
|
| - }
|
| -
|
| - @DomName('DOMWindow.onDOMContentLoaded')
|
| - @DocsEditable
|
| - Stream<Event> get onContentLoaded => contentLoadedEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onabort')
|
| - @DocsEditable
|
| - Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onblur')
|
| - @DocsEditable
|
| - Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onchange')
|
| - @DocsEditable
|
| - Stream<Event> get onChange => Element.changeEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onclick')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.oncontextmenu')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondblclick')
|
| - @DocsEditable
|
| - Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondevicemotion')
|
| - @DocsEditable
|
| - Stream<DeviceMotionEvent> get onDeviceMotion => deviceMotionEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondeviceorientation')
|
| - @DocsEditable
|
| - Stream<DeviceOrientationEvent> get onDeviceOrientation => deviceOrientationEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondrag')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondragend')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondragenter')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondragleave')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondragover')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondragstart')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ondrop')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onerror')
|
| - @DocsEditable
|
| - Stream<Event> get onError => Element.errorEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onfocus')
|
| - @DocsEditable
|
| - Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onhashchange')
|
| - @DocsEditable
|
| - Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.oninput')
|
| - @DocsEditable
|
| - Stream<Event> get onInput => Element.inputEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.oninvalid')
|
| - @DocsEditable
|
| - Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onkeydown')
|
| - @DocsEditable
|
| - Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onkeypress')
|
| - @DocsEditable
|
| - Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onkeyup')
|
| - @DocsEditable
|
| - Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onload')
|
| - @DocsEditable
|
| - Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmessage')
|
| - @DocsEditable
|
| - Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmousedown')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmousemove')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmouseout')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmouseover')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmouseup')
|
| - @DocsEditable
|
| - Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onmousewheel')
|
| - @DocsEditable
|
| - Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onoffline')
|
| - @DocsEditable
|
| - Stream<Event> get onOffline => offlineEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.ononline')
|
| - @DocsEditable
|
| - Stream<Event> get onOnline => onlineEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onpagehide')
|
| - @DocsEditable
|
| - Stream<Event> get onPageHide => pageHideEvent.forTarget(this);
|
| -
|
| - @DomName('DOMWindow.onpageshow')
|
| - @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
|
| -@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);
|
| + *
|
| + * Note: The supplied [callback] needs to call [requestAnimationFrame] again
|
| + * for the animation to continue.
|
| + */
|
| + @DomName('DOMWindow.requestAnimationFrame')
|
| + int requestAnimationFrame(RequestAnimationFrameCallback callback) {
|
| + _ensureRequestAnimationFrame();
|
| + return _requestAnimationFrame(callback);
|
| }
|
| - 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;
|
| + void cancelAnimationFrame(id) {
|
| + _ensureRequestAnimationFrame();
|
| + _cancelAnimationFrame(id);
|
| + }
|
|
|
| - @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.
|
| + @JSName('requestAnimationFrame')
|
| + int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
|
|
|
| + @JSName('cancelAnimationFrame')
|
| + void _cancelAnimationFrame(int id) native;
|
|
|
| -@DocsEditable
|
| -@DomName('EntityReference')
|
| -abstract class _EntityReference extends Node native "EntityReference" {
|
| -}
|
| -// 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.
|
| + _ensureRequestAnimationFrame() {
|
| + if (JS('bool',
|
| + '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this))
|
| + return;
|
|
|
| + JS('void',
|
| + r"""
|
| + (function($this) {
|
| + var vendors = ['ms', 'moz', 'webkit', 'o'];
|
| + for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) {
|
| + $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame'];
|
| + $this.cancelAnimationFrame =
|
| + $this[vendors[i]+'CancelAnimationFrame'] ||
|
| + $this[vendors[i]+'CancelRequestAnimationFrame'];
|
| + }
|
| + if ($this.requestAnimationFrame && $this.cancelAnimationFrame) return;
|
| + $this.requestAnimationFrame = function(callback) {
|
| + return window.setTimeout(function() {
|
| + callback(Date.now());
|
| + }, 16 /* 16ms ~= 60fps */);
|
| + };
|
| + $this.cancelAnimationFrame = function(id) { clearTimeout(id); }
|
| + })(#)""",
|
| + this);
|
| + }
|
|
|
| -@DocsEditable
|
| -@DomName('EntryArray')
|
| -class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "EntryArray" {
|
| + /**
|
| + * Gets an instance of the Indexed DB factory to being using Indexed DB.
|
| + *
|
| + * Use [IdbFactory.supported] to check if Indexed DB is supported on the
|
| + * current platform.
|
| + */
|
| + @SupportedBrowser(SupportedBrowser.CHROME, '23.0')
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
|
| + @SupportedBrowser(SupportedBrowser.IE, '10.0')
|
| + @Experimental
|
| + IdbFactory get indexedDB =>
|
| + JS('IdbFactory|Null', // If not supported, returns `null`.
|
| + '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
|
| + this, this, this);
|
|
|
| - @DomName('EntryArray.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| + @DomName('Window.console')
|
| + Console get console => Console.safeConsole;
|
|
|
| - Entry operator[](int index) => JS("Entry", "#[#]", this, index);
|
| + /// Checks if _setImmediate is supported.
|
| + static bool get _supportsSetImmediate =>
|
| + JS('bool', '!!(window.setImmediate)');
|
|
|
| - void operator[]=(int index, Entry value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| + // Set immediate implementation for IE
|
| + void _setImmediate(void callback()) {
|
| + JS('void', '#.setImmediate(#)', this, convertDartClosureToJS(callback, 0));
|
| }
|
| - // -- 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);
|
| + /**
|
| + * Access a sandboxed file system of the specified `size`. If `persistent` is
|
| + * true, the application will request permission from the user to create
|
| + * lasting storage. This storage cannot be freed without the user's
|
| + * permission. Returns a [Future] whose value stores a reference to the
|
| + * sandboxed file system for use. Because the file system is sandboxed,
|
| + * applications cannot access file systems created in other web pages.
|
| + */
|
| + Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) {
|
| + return _requestFileSystem(persistent? 1 : 0, size);
|
| }
|
|
|
| - Entry reduce(Entry combine(Entry value, Entry element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| + @DomName('DOMWindow.convertPointFromNodeToPage')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + Point convertPointFromNodeToPage(Node node, Point point) {
|
| + var result = _convertPointFromNodeToPage(node,
|
| + new _DomPoint(point.x, point.y));
|
| + return new Point(result.x, result.y);
|
| }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Entry element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| + @DomName('DOMWindow.convertPointFromPageToNode')
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + Point convertPointFromPageToNode(Node node, Point point) {
|
| + var result = _convertPointFromPageToNode(node,
|
| + new _DomPoint(point.x, point.y));
|
| + return new Point(result.x, result.y);
|
| }
|
|
|
| - 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);
|
| + /**
|
| + * Checks whether [convertPointFromNodeToPage] and
|
| + * [convertPointFromPageToNode] are supported on the current platform.
|
| + */
|
| + static bool get supportsPointConversions => _DomPoint.supported;
|
|
|
| - Iterable map(f(Entry element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('DOMWindow.DOMContentLoadedEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> contentLoadedEvent = const EventStreamProvider<Event>('DOMContentLoaded');
|
|
|
| - Iterable<Entry> where(bool f(Entry element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('DOMWindow.devicemotionEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<DeviceMotionEvent> deviceMotionEvent = const EventStreamProvider<DeviceMotionEvent>('devicemotion');
|
|
|
| - Iterable expand(Iterable f(Entry element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMWindow.deviceorientationEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<DeviceOrientationEvent> deviceOrientationEvent = const EventStreamProvider<DeviceOrientationEvent>('deviceorientation');
|
|
|
| - bool every(bool f(Entry element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMWindow.hashchangeEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
|
|
|
| - bool any(bool f(Entry element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('DOMWindow.messageEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
|
|
|
| - List<Entry> toList({ bool growable: true }) =>
|
| - new List<Entry>.from(this, growable: growable);
|
| + @DomName('DOMWindow.offlineEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
|
|
|
| - Set<Entry> toSet() => new Set<Entry>.from(this);
|
| + @DomName('DOMWindow.onlineEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('DOMWindow.pagehideEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> pageHideEvent = const EventStreamProvider<Event>('pagehide');
|
|
|
| - Iterable<Entry> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @DomName('DOMWindow.pageshowEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> pageShowEvent = const EventStreamProvider<Event>('pageshow');
|
|
|
| - Iterable<Entry> takeWhile(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.popstateEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
|
|
|
| - Iterable<Entry> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('DOMWindow.resizeEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
|
|
|
| - Iterable<Entry> skipWhile(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.storageEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
|
|
|
| - Entry firstWhere(bool test(Entry value), { Entry orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.unloadEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
|
|
|
| - Entry lastWhere(bool test(Entry value), {Entry orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.webkitAnimationEndEvent')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + static const EventStreamProvider<AnimationEvent> animationEndEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationEnd');
|
|
|
| - Entry singleWhere(bool test(Entry value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + @DomName('DOMWindow.webkitAnimationIterationEvent')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + static const EventStreamProvider<AnimationEvent> animationIterationEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationIteration');
|
|
|
| - Entry elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('DOMWindow.webkitAnimationStartEvent')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + static const EventStreamProvider<AnimationEvent> animationStartEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationStart');
|
|
|
| - // From Collection<Entry>:
|
| + static const int PERSISTENT = 1;
|
|
|
| - void add(Entry value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + static const int TEMPORARY = 0;
|
|
|
| - void addAll(Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.applicationCache')
|
| + @DocsEditable
|
| + final ApplicationCache applicationCache;
|
|
|
| - // From List<Entry>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('DOMWindow.closed')
|
| + @DocsEditable
|
| + final bool closed;
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('DOMWindow.crypto')
|
| + @DocsEditable
|
| + final Crypto crypto;
|
|
|
| - Iterable<Entry> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('DOMWindow.defaultStatus')
|
| + @DocsEditable
|
| + String defaultStatus;
|
|
|
| - void sort([int compare(Entry a, Entry b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| + @DomName('DOMWindow.defaultstatus')
|
| + @DocsEditable
|
| + String defaultstatus;
|
|
|
| - int indexOf(Entry element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| + @DomName('DOMWindow.devicePixelRatio')
|
| + @DocsEditable
|
| + final num devicePixelRatio;
|
|
|
| - int lastIndexOf(Entry element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| + @DomName('DOMWindow.event')
|
| + @DocsEditable
|
| + final Event event;
|
|
|
| - Entry get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('DOMWindow.history')
|
| + @DocsEditable
|
| + final History history;
|
|
|
| - Entry get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('DOMWindow.innerHeight')
|
| + @DocsEditable
|
| + final int innerHeight;
|
|
|
| - Entry get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + @DomName('DOMWindow.innerWidth')
|
| + @DocsEditable
|
| + final int innerWidth;
|
|
|
| - void insert(int index, Entry element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.localStorage')
|
| + @DocsEditable
|
| + final Storage localStorage;
|
|
|
| - void insertAll(int index, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.locationbar')
|
| + @DocsEditable
|
| + final BarInfo locationbar;
|
|
|
| - void setAll(int index, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('DOMWindow.menubar')
|
| + @DocsEditable
|
| + final BarInfo menubar;
|
|
|
| - Entry removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.name')
|
| + @DocsEditable
|
| + String name;
|
|
|
| - Entry removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.navigator')
|
| + @DocsEditable
|
| + final Navigator navigator;
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.offscreenBuffering')
|
| + @DocsEditable
|
| + final bool offscreenBuffering;
|
|
|
| - void removeWhere(bool test(Entry element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + WindowBase get opener => _convertNativeToDart_Window(this._get_opener);
|
| + @JSName('opener')
|
| + @DomName('DOMWindow.opener')
|
| + @DocsEditable
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_opener;
|
|
|
| - void retainWhere(bool test(Entry element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.outerHeight')
|
| + @DocsEditable
|
| + final int outerHeight;
|
|
|
| - void setRange(int start, int end, Iterable<Entry> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| + @DomName('DOMWindow.outerWidth')
|
| + @DocsEditable
|
| + final int outerWidth;
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| + @DomName('DOMWindow.pageXOffset')
|
| + @DocsEditable
|
| + final int pageXOffset;
|
|
|
| - void replaceRange(int start, int end, Iterable<Entry> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('DOMWindow.pageYOffset')
|
| + @DocsEditable
|
| + final int pageYOffset;
|
|
|
| - void fillRange(int start, int end, [Entry fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + WindowBase get parent => _convertNativeToDart_Window(this._get_parent);
|
| + @JSName('parent')
|
| + @DomName('DOMWindow.parent')
|
| + @DocsEditable
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_parent;
|
|
|
| - Iterable<Entry> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + @DomName('DOMWindow.performance')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @SupportedBrowser(SupportedBrowser.IE)
|
| + final Performance performance;
|
|
|
| - List<Entry> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Entry>[]);
|
| - }
|
| + @DomName('DOMWindow.personalbar')
|
| + @DocsEditable
|
| + final BarInfo personalbar;
|
|
|
| - Map<int, Entry> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| + @DomName('DOMWindow.screen')
|
| + @DocsEditable
|
| + final Screen screen;
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @DomName('DOMWindow.screenLeft')
|
| + @DocsEditable
|
| + final int screenLeft;
|
|
|
| - // -- end List<Entry> mixins.
|
| + @DomName('DOMWindow.screenTop')
|
| + @DocsEditable
|
| + final int screenTop;
|
|
|
| - @DomName('EntryArray.item')
|
| + @DomName('DOMWindow.screenX')
|
| @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.
|
| + final int screenX;
|
|
|
| + @DomName('DOMWindow.screenY')
|
| + @DocsEditable
|
| + final int screenY;
|
|
|
| -@DocsEditable
|
| -@DomName('EntryArraySync')
|
| -class _EntryArraySync implements JavaScriptIndexingBehavior, List<_EntrySync> native "EntryArraySync" {
|
| + @DomName('DOMWindow.scrollX')
|
| + @DocsEditable
|
| + final int scrollX;
|
|
|
| - @DomName('EntryArraySync.length')
|
| + @DomName('DOMWindow.scrollY')
|
| @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| + final int scrollY;
|
|
|
| - _EntrySync operator[](int index) => JS("_EntrySync", "#[#]", this, index);
|
| + @DomName('DOMWindow.scrollbars')
|
| + @DocsEditable
|
| + final BarInfo scrollbars;
|
|
|
| - void operator[]=(int index, _EntrySync value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<_EntrySync> mixins.
|
| - // _EntrySync is the element type.
|
| + WindowBase get self => _convertNativeToDart_Window(this._get_self);
|
| + @JSName('self')
|
| + @DomName('DOMWindow.self')
|
| + @DocsEditable
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_self;
|
|
|
| - // From Iterable<_EntrySync>:
|
| + @DomName('DOMWindow.sessionStorage')
|
| + @DocsEditable
|
| + final Storage sessionStorage;
|
|
|
| - 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);
|
| - }
|
| + @DomName('DOMWindow.status')
|
| + @DocsEditable
|
| + String status;
|
|
|
| - _EntrySync reduce(_EntrySync combine(_EntrySync value, _EntrySync element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + @DomName('DOMWindow.statusbar')
|
| + @DocsEditable
|
| + final BarInfo statusbar;
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, _EntrySync element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + @DomName('DOMWindow.styleMedia')
|
| + @DocsEditable
|
| + final StyleMedia styleMedia;
|
| +
|
| + @DomName('DOMWindow.toolbar')
|
| + @DocsEditable
|
| + final BarInfo toolbar;
|
|
|
| - bool contains(_EntrySync element) => IterableMixinWorkaround.contains(this, element);
|
| + WindowBase get top => _convertNativeToDart_Window(this._get_top);
|
| + @JSName('top')
|
| + @DomName('DOMWindow.top')
|
| + @DocsEditable
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_top;
|
|
|
| - void forEach(void f(_EntrySync element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @JSName('webkitNotifications')
|
| + @DomName('DOMWindow.webkitNotifications')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + final NotificationCenter notifications;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @JSName('webkitStorageInfo')
|
| + @DomName('DOMWindow.webkitStorageInfo')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + final StorageInfo storageInfo;
|
|
|
| - Iterable map(f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + WindowBase get window => _convertNativeToDart_Window(this._get_window);
|
| + @JSName('window')
|
| + @DomName('DOMWindow.window')
|
| + @DocsEditable
|
| + @Creates('Window|=Object')
|
| + @Returns('Window|=Object')
|
| + final dynamic _get_window;
|
|
|
| - Iterable<_EntrySync> where(bool f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @JSName('addEventListener')
|
| + @DomName('DOMWindow.addEventListener')
|
| + @DocsEditable
|
| + void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - Iterable expand(Iterable f(_EntrySync element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMWindow.alert')
|
| + @DocsEditable
|
| + void alert(String message) native;
|
|
|
| - bool every(bool f(_EntrySync element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMWindow.atob')
|
| + @DocsEditable
|
| + String atob(String string) native;
|
|
|
| - bool any(bool f(_EntrySync element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('DOMWindow.btoa')
|
| + @DocsEditable
|
| + String btoa(String string) native;
|
|
|
| - List<_EntrySync> toList({ bool growable: true }) =>
|
| - new List<_EntrySync>.from(this, growable: growable);
|
| + @DomName('DOMWindow.captureEvents')
|
| + @DocsEditable
|
| + void captureEvents() native;
|
|
|
| - Set<_EntrySync> toSet() => new Set<_EntrySync>.from(this);
|
| + @JSName('clearInterval')
|
| + @DomName('DOMWindow.clearInterval')
|
| + @DocsEditable
|
| + void _clearInterval(int handle) native;
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @JSName('clearTimeout')
|
| + @DomName('DOMWindow.clearTimeout')
|
| + @DocsEditable
|
| + void _clearTimeout(int handle) native;
|
|
|
| - Iterable<_EntrySync> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @DomName('DOMWindow.close')
|
| + @DocsEditable
|
| + void close() native;
|
|
|
| - Iterable<_EntrySync> takeWhile(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.confirm')
|
| + @DocsEditable
|
| + bool confirm(String message) native;
|
|
|
| - Iterable<_EntrySync> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('DOMWindow.dispatchEvent')
|
| + @DocsEditable
|
| + bool dispatchEvent(Event evt) native;
|
|
|
| - Iterable<_EntrySync> skipWhile(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.find')
|
| + @DocsEditable
|
| + bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native;
|
|
|
| - _EntrySync firstWhere(bool test(_EntrySync value), { _EntrySync orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @JSName('getComputedStyle')
|
| + @DomName('DOMWindow.getComputedStyle')
|
| + @DocsEditable
|
| + CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native;
|
|
|
| - _EntrySync lastWhere(bool test(_EntrySync value), {_EntrySync orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @JSName('getMatchedCSSRules')
|
| + @DomName('DOMWindow.getMatchedCSSRules')
|
| + @DocsEditable
|
| + @Returns('_CssRuleList')
|
| + @Creates('_CssRuleList')
|
| + List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native;
|
|
|
| - _EntrySync singleWhere(bool test(_EntrySync value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + @DomName('DOMWindow.getSelection')
|
| + @DocsEditable
|
| + Selection getSelection() native;
|
|
|
| - _EntrySync elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('DOMWindow.matchMedia')
|
| + @DocsEditable
|
| + MediaQueryList matchMedia(String query) native;
|
|
|
| - // From Collection<_EntrySync>:
|
| + @DomName('DOMWindow.moveBy')
|
| + @DocsEditable
|
| + void moveBy(num x, num y) native;
|
|
|
| - void add(_EntrySync value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.moveTo')
|
| + @DocsEditable
|
| + void moveTo(num x, num y) native;
|
|
|
| - void addAll(Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.openDatabase')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + @Creates('SqlDatabase')
|
| + SqlDatabase openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
|
|
|
| - // From List<_EntrySync>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| + @DomName('DOMWindow.postMessage')
|
| + @DocsEditable
|
| + void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
|
| + if (?messagePorts) {
|
| + var message_1 = convertDartToNative_SerializedScriptValue(message);
|
| + _postMessage_1(message_1, targetOrigin, messagePorts);
|
| + return;
|
| + }
|
| + var message_2 = convertDartToNative_SerializedScriptValue(message);
|
| + _postMessage_2(message_2, targetOrigin);
|
| + return;
|
| }
|
| + @JSName('postMessage')
|
| + @DomName('DOMWindow.postMessage')
|
| + @DocsEditable
|
| + void _postMessage_1(message, targetOrigin, List messagePorts) native;
|
| + @JSName('postMessage')
|
| + @DomName('DOMWindow.postMessage')
|
| + @DocsEditable
|
| + void _postMessage_2(message, targetOrigin) native;
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('DOMWindow.print')
|
| + @DocsEditable
|
| + void print() native;
|
|
|
| - Iterable<_EntrySync> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('DOMWindow.releaseEvents')
|
| + @DocsEditable
|
| + void releaseEvents() native;
|
|
|
| - void sort([int compare(_EntrySync a, _EntrySync b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| + @JSName('removeEventListener')
|
| + @DomName('DOMWindow.removeEventListener')
|
| + @DocsEditable
|
| + void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
|
|
|
| - int indexOf(_EntrySync element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| + @DomName('DOMWindow.resizeBy')
|
| + @DocsEditable
|
| + void resizeBy(num x, num y) native;
|
|
|
| - int lastIndexOf(_EntrySync element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| + @DomName('DOMWindow.resizeTo')
|
| + @DocsEditable
|
| + void resizeTo(num width, num height) native;
|
|
|
| - _EntrySync get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('DOMWindow.scroll')
|
| + @DocsEditable
|
| + void scroll(int x, int y) native;
|
|
|
| - _EntrySync get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('DOMWindow.scrollBy')
|
| + @DocsEditable
|
| + void scrollBy(int x, int y) native;
|
|
|
| - _EntrySync get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + @DomName('DOMWindow.scrollTo')
|
| + @DocsEditable
|
| + void scrollTo(int x, int y) native;
|
|
|
| - void insert(int index, _EntrySync element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @JSName('setInterval')
|
| + @DomName('DOMWindow.setInterval')
|
| + @DocsEditable
|
| + int _setInterval(Object handler, int timeout) native;
|
|
|
| - void insertAll(int index, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @JSName('setTimeout')
|
| + @DomName('DOMWindow.setTimeout')
|
| + @DocsEditable
|
| + int _setTimeout(Object handler, int timeout) native;
|
|
|
| - void setAll(int index, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('DOMWindow.showModalDialog')
|
| + @DocsEditable
|
| + Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
|
|
|
| - _EntrySync removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.stop')
|
| + @DocsEditable
|
| + void stop() native;
|
|
|
| - _EntrySync removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @DomName('DOMWindow.toString')
|
| + @DocsEditable
|
| + String toString() native;
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @JSName('webkitConvertPointFromNodeToPage')
|
| + @DomName('DOMWindow.webkitConvertPointFromNodeToPage')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + _DomPoint _convertPointFromNodeToPage(Node node, _DomPoint p) native;
|
|
|
| - void removeWhere(bool test(_EntrySync element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @JSName('webkitConvertPointFromPageToNode')
|
| + @DomName('DOMWindow.webkitConvertPointFromPageToNode')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @Experimental
|
| + _DomPoint _convertPointFromPageToNode(Node node, _DomPoint p) native;
|
|
|
| - void retainWhere(bool test(_EntrySync element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + @JSName('webkitRequestFileSystem')
|
| + @DomName('DOMWindow.webkitRequestFileSystem')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @Experimental
|
| + void __requestFileSystem(int type, int size, _FileSystemCallback successCallback, [_ErrorCallback errorCallback]) native;
|
|
|
| - void setRange(int start, int end, Iterable<_EntrySync> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| + @JSName('webkitRequestFileSystem')
|
| + @DomName('DOMWindow.webkitRequestFileSystem')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @Experimental
|
| + Future<FileSystem> _requestFileSystem(int type, int size) {
|
| + var completer = new Completer<FileSystem>();
|
| + __requestFileSystem(type, size,
|
| + (value) { completer.complete(value); },
|
| + (error) { completer.completeError(error); });
|
| + return completer.future;
|
| }
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| + @JSName('webkitResolveLocalFileSystemURL')
|
| + @DomName('DOMWindow.webkitResolveLocalFileSystemURL')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @Experimental
|
| + void _resolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) native;
|
|
|
| - void replaceRange(int start, int end, Iterable<_EntrySync> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + @JSName('webkitResolveLocalFileSystemURL')
|
| + @DomName('DOMWindow.webkitResolveLocalFileSystemURL')
|
| + @DocsEditable
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @Experimental
|
| + Future<Entry> resolveLocalFileSystemUrl(String url) {
|
| + var completer = new Completer<Entry>();
|
| + _resolveLocalFileSystemUrl(url,
|
| + (value) { completer.complete(value); },
|
| + (error) { completer.completeError(error); });
|
| + return completer.future;
|
| }
|
|
|
| - void fillRange(int start, int end, [_EntrySync fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + @DomName('DOMWindow.onDOMContentLoaded')
|
| + @DocsEditable
|
| + Stream<Event> get onContentLoaded => contentLoadedEvent.forTarget(this);
|
|
|
| - Iterable<_EntrySync> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + @DomName('DOMWindow.onabort')
|
| + @DocsEditable
|
| + Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
|
|
|
| - List<_EntrySync> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <_EntrySync>[]);
|
| - }
|
| + @DomName('DOMWindow.onblur')
|
| + @DocsEditable
|
| + Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
|
|
|
| - Map<int, _EntrySync> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| + @DomName('DOMWindow.onchange')
|
| + @DocsEditable
|
| + Stream<Event> get onChange => Element.changeEvent.forTarget(this);
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @DomName('DOMWindow.onclick')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
|
|
|
| - // -- end List<_EntrySync> mixins.
|
| + @DomName('DOMWindow.oncontextmenu')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
|
|
|
| - @DomName('EntryArraySync.item')
|
| + @DomName('DOMWindow.ondblclick')
|
| @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.
|
| + Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
|
|
|
| + @DomName('DOMWindow.ondevicemotion')
|
| + @DocsEditable
|
| + Stream<DeviceMotionEvent> get onDeviceMotion => deviceMotionEvent.forTarget(this);
|
|
|
| -@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.
|
| + @DomName('DOMWindow.ondeviceorientation')
|
| + @DocsEditable
|
| + Stream<DeviceOrientationEvent> get onDeviceOrientation => deviceOrientationEvent.forTarget(this);
|
|
|
| + @DomName('DOMWindow.ondrag')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
|
|
|
| -@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.
|
| + @DomName('DOMWindow.ondragend')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
|
|
|
| + @DomName('DOMWindow.ondragenter')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
|
|
|
| -@DocsEditable
|
| -@DomName('FileReaderSync')
|
| -abstract class _FileReaderSync native "FileReaderSync" {
|
| + @DomName('DOMWindow.ondragleave')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
|
|
|
| - @DomName('FileReaderSync.FileReaderSync')
|
| + @DomName('DOMWindow.ondragover')
|
| @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.
|
| + Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
|
|
|
| + @DomName('DOMWindow.ondragstart')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
|
|
|
| -@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.
|
| + @DomName('DOMWindow.ondrop')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
|
|
|
| + @DomName('DOMWindow.onerror')
|
| + @DocsEditable
|
| + Stream<Event> get onError => Element.errorEvent.forTarget(this);
|
|
|
| -@DocsEditable
|
| -@DomName('GamepadList')
|
| -class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "GamepadList" {
|
| + @DomName('DOMWindow.onfocus')
|
| + @DocsEditable
|
| + Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
|
|
|
| - @DomName('GamepadList.length')
|
| + @DomName('DOMWindow.onhashchange')
|
| @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| + Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
|
|
|
| - Gamepad operator[](int index) => JS("Gamepad", "#[#]", this, index);
|
| + @DomName('DOMWindow.oninput')
|
| + @DocsEditable
|
| + Stream<Event> get onInput => Element.inputEvent.forTarget(this);
|
|
|
| - void operator[]=(int index, Gamepad value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<Gamepad> mixins.
|
| - // Gamepad is the element type.
|
| + @DomName('DOMWindow.oninvalid')
|
| + @DocsEditable
|
| + Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
|
|
|
| - // From Iterable<Gamepad>:
|
| + @DomName('DOMWindow.onkeydown')
|
| + @DocsEditable
|
| + Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
|
|
|
| - 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);
|
| - }
|
| + @DomName('DOMWindow.onkeypress')
|
| + @DocsEditable
|
| + Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
|
|
|
| - Gamepad reduce(Gamepad combine(Gamepad value, Gamepad element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| + @DomName('DOMWindow.onkeyup')
|
| + @DocsEditable
|
| + Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, Gamepad element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| + @DomName('DOMWindow.onload')
|
| + @DocsEditable
|
| + Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
|
|
|
| - bool contains(Gamepad element) => IterableMixinWorkaround.contains(this, element);
|
| + @DomName('DOMWindow.onmessage')
|
| + @DocsEditable
|
| + Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
|
|
|
| - void forEach(void f(Gamepad element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('DOMWindow.onmousedown')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('DOMWindow.onmousemove')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
|
|
|
| - Iterable map(f(Gamepad element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('DOMWindow.onmouseout')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> where(bool f(Gamepad element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('DOMWindow.onmouseover')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
|
|
|
| - Iterable expand(Iterable f(Gamepad element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('DOMWindow.onmouseup')
|
| + @DocsEditable
|
| + Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
|
|
|
| - bool every(bool f(Gamepad element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('DOMWindow.onmousewheel')
|
| + @DocsEditable
|
| + Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
|
|
|
| - bool any(bool f(Gamepad element)) => IterableMixinWorkaround.any(this, f);
|
| + @DomName('DOMWindow.onoffline')
|
| + @DocsEditable
|
| + Stream<Event> get onOffline => offlineEvent.forTarget(this);
|
|
|
| - List<Gamepad> toList({ bool growable: true }) =>
|
| - new List<Gamepad>.from(this, growable: growable);
|
| + @DomName('DOMWindow.ononline')
|
| + @DocsEditable
|
| + Stream<Event> get onOnline => onlineEvent.forTarget(this);
|
|
|
| - Set<Gamepad> toSet() => new Set<Gamepad>.from(this);
|
| + @DomName('DOMWindow.onpagehide')
|
| + @DocsEditable
|
| + Stream<Event> get onPageHide => pageHideEvent.forTarget(this);
|
|
|
| - bool get isEmpty => this.length == 0;
|
| + @DomName('DOMWindow.onpageshow')
|
| + @DocsEditable
|
| + Stream<Event> get onPageShow => pageShowEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + @DomName('DOMWindow.onpopstate')
|
| + @DocsEditable
|
| + Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> takeWhile(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.onreset')
|
| + @DocsEditable
|
| + Stream<Event> get onReset => Element.resetEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + @DomName('DOMWindow.onresize')
|
| + @DocsEditable
|
| + Stream<Event> get onResize => resizeEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> skipWhile(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| + @DomName('DOMWindow.onscroll')
|
| + @DocsEditable
|
| + Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
|
|
|
| - Gamepad firstWhere(bool test(Gamepad value), { Gamepad orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.onsearch')
|
| + @DocsEditable
|
| + Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
|
|
|
| - Gamepad lastWhere(bool test(Gamepad value), {Gamepad orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| + @DomName('DOMWindow.onselect')
|
| + @DocsEditable
|
| + Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
|
|
|
| - Gamepad singleWhere(bool test(Gamepad value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| + @DomName('DOMWindow.onstorage')
|
| + @DocsEditable
|
| + Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
|
|
|
| - Gamepad elementAt(int index) {
|
| - return this[index];
|
| - }
|
| + @DomName('DOMWindow.onsubmit')
|
| + @DocsEditable
|
| + Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
|
|
|
| - // From Collection<Gamepad>:
|
| + @DomName('DOMWindow.ontouchcancel')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
|
|
|
| - void add(Gamepad value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.ontouchend')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
|
|
|
| - void addAll(Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| + @DomName('DOMWindow.ontouchmove')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
|
|
|
| - // From List<Gamepad>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| + @DomName('DOMWindow.ontouchstart')
|
| + @DocsEditable
|
| + Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('DOMWindow.onunload')
|
| + @DocsEditable
|
| + Stream<Event> get onUnload => unloadEvent.forTarget(this);
|
|
|
| - Iterable<Gamepad> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + @DomName('DOMWindow.onwebkitAnimationEnd')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationEnd => animationEndEvent.forTarget(this);
|
|
|
| - void sort([int compare(Gamepad a, Gamepad b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| + @DomName('DOMWindow.onwebkitAnimationIteration')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationIteration => animationIterationEvent.forTarget(this);
|
|
|
| - int indexOf(Gamepad element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| + @DomName('DOMWindow.onwebkitAnimationStart')
|
| + @DocsEditable
|
| + Stream<AnimationEvent> get onAnimationStart => animationStartEvent.forTarget(this);
|
|
|
| - int lastIndexOf(Gamepad element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| + @DomName('DOMWindow.onwebkitTransitionEnd')
|
| + @DocsEditable
|
| + Stream<TransitionEvent> get onTransitionEnd => Element.transitionEndEvent.forTarget(this);
|
|
|
| - Gamepad get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
|
|
| - Gamepad get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + @DomName('DOMWindow.beforeunloadEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<BeforeUnloadEvent> beforeUnloadEvent =
|
| + const _BeforeUnloadEventStreamProvider('beforeunload');
|
|
|
| - Gamepad get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| + @DomName('DOMWindow.onbeforeunload')
|
| + @DocsEditable
|
| + Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
|
| +}
|
|
|
| - void insert(int index, Gamepad element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +/**
|
| + * 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 insertAll(int index, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent {
|
| + String _returnValue;
|
|
|
| - void setAll(int index, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| + _BeforeUnloadEvent(Event base): super(base);
|
|
|
| - Gamepad removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + String get returnValue => _returnValue;
|
|
|
| - Gamepad removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| + 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);
|
| + }
|
| }
|
| +}
|
|
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| +class _BeforeUnloadEventStreamProvider implements
|
| + EventStreamProvider<BeforeUnloadEvent> {
|
| + final String _eventType;
|
|
|
| - void removeWhere(bool test(Gamepad element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| + const _BeforeUnloadEventStreamProvider(this._eventType);
|
|
|
| - void retainWhere(bool test(Gamepad element)) {
|
| - throw new UnsupportedError("Cannot remove from 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 setRange(int start, int end, Iterable<Gamepad> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| + return controller.stream;
|
| }
|
|
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on 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.
|
|
|
| - void replaceRange(int start, int end, Iterable<Gamepad> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
|
|
| - void fillRange(int start, int end, [Gamepad fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('Worker')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@SupportedBrowser(SupportedBrowser.IE, '10')
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +class Worker extends AbstractWorker native "Worker" {
|
|
|
| - Iterable<Gamepad> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| + @DomName('Worker.messageEvent')
|
| + @DocsEditable
|
| + static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
|
|
|
| - List<Gamepad> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <Gamepad>[]);
|
| + @DomName('Worker.Worker')
|
| + @DocsEditable
|
| + factory Worker(String scriptUrl) {
|
| + return Worker._create_1(scriptUrl);
|
| }
|
| + static Worker _create_1(scriptUrl) => JS('Worker', 'new Worker(#)', scriptUrl);
|
|
|
| - Map<int, Gamepad> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '(typeof window.Worker != "undefined")');
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @DomName('Worker.postMessage')
|
| + @DocsEditable
|
| + void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) native;
|
|
|
| - // -- end List<Gamepad> mixins.
|
| + @DomName('Worker.terminate')
|
| + @DocsEditable
|
| + void terminate() native;
|
|
|
| - @DomName('GamepadList.item')
|
| + @DomName('Worker.onmessage')
|
| @DocsEditable
|
| - Gamepad item(int index) native;
|
| + 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
|
| @@ -25052,17 +21020,27 @@ 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('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;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLBaseFontElement')
|
| -abstract class _HTMLBaseFontElement extends Element native "HTMLBaseFontElement" {
|
| + @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
|
| @@ -25070,17 +21048,28 @@ abstract class _HTMLBaseFontElement extends Element native "HTMLBaseFontElement"
|
|
|
|
|
| @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')
|
| +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;
|
|
|
| -@DocsEditable
|
| -@DomName('HTMLFontElement')
|
| -abstract class _HTMLFontElement extends Element native "HTMLFontElement" {
|
| + @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
|
| @@ -25088,8 +21077,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
|
| @@ -25097,8 +21090,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
|
| @@ -25106,258 +21104,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);
|
| +
|
| + var left = min(this.left, rect.left);
|
| + var top = min(this.top, rect.top);
|
|
|
| - void replaceRange(int start, int end, Iterable<Node> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + 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;
|
| -}
|
| -// 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('PagePopupController')
|
| -abstract class _PagePopupController native "PagePopupController" {
|
| + 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
|
| @@ -25365,46 +21386,31 @@ abstract class _PagePopupController native "PagePopupController" {
|
|
|
|
|
| @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
|
| @@ -25412,8 +21418,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
|
| @@ -25421,216 +21427,155 @@ 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 ListMixin<_CSSValue>, ImmutableListMixin<_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");
|
| - }
|
| + // -- end List<_CSSValue> mixins.
|
|
|
| - SpeechInputResult get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| + @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.
|
|
|
| - SpeechInputResult 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, SpeechInputResult element) {
|
| - throw new UnsupportedError("Cannot add to 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.
|
|
|
| - 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('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.
|
|
|
| - SpeechInputResult removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
|
|
| - SpeechInputResult removeLast() {
|
| - 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.
|
|
|
| - 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('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 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('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 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('WebKitPoint')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class _DomPoint native "WebKitPoint" {
|
|
|
| - void fillRange(int start, int end, [SpeechInputResult fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| + @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);
|
|
|
| - Iterable<SpeechInputResult> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<SpeechInputResult> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <SpeechInputResult>[]);
|
| - }
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => JS('bool', '!!(window.WebKitPoint)');
|
|
|
| - Map<int, SpeechInputResult> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| + @DomName('DOMPoint.x')
|
| + @DocsEditable
|
| + num x;
|
|
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| + @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.
|
|
|
| - // -- end List<SpeechInputResult> mixins.
|
|
|
| - @DomName('SpeechInputResultList.item')
|
| - @DocsEditable
|
| - SpeechInputResult item(int index) native;
|
| +@DocsEditable
|
| +@DomName('EntityReference')
|
| +abstract class _EntityReference extends Node native "EntityReference" {
|
| }
|
| // 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
|
| @@ -25638,216 +21583,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 ListMixin<Entry>, ImmutableListMixin<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 ListMixin<_EntrySync>, ImmutableListMixin<_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 ListMixin<Gamepad>, ImmutableListMixin<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
|
| @@ -25855,209 +21785,209 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
|
|
|
|
|
| @DocsEditable
|
| -@DomName('StyleSheetList')
|
| -class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> native "StyleSheetList" {
|
| +@DomName('NamedNodeMap')
|
| +class _NamedNodeMap extends Object with ListMixin<Node>, ImmutableListMixin<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.
|
| -
|
| - // 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);
|
| - }
|
| + // -- start List<Node> mixins.
|
| + // Node is the element type.
|
|
|
| - StyleSheet reduce(StyleSheet combine(StyleSheet value, StyleSheet element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
|
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, StyleSheet element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - bool contains(StyleSheet element) => IterableMixinWorkaround.contains(this, element);
|
| + // -- end List<Node> mixins.
|
|
|
| - void forEach(void f(StyleSheet element)) => IterableMixinWorkaround.forEach(this, f);
|
| + @DomName('NamedNodeMap.getNamedItem')
|
| + @DocsEditable
|
| + Node getNamedItem(String name) native;
|
|
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| + @DomName('NamedNodeMap.getNamedItemNS')
|
| + @DocsEditable
|
| + Node getNamedItemNS(String namespaceURI, String localName) native;
|
|
|
| - Iterable map(f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| + @DomName('NamedNodeMap.item')
|
| + @DocsEditable
|
| + Node item(int index) native;
|
|
|
| - Iterable<StyleSheet> where(bool f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| + @DomName('NamedNodeMap.removeNamedItem')
|
| + @DocsEditable
|
| + Node removeNamedItem(String name) native;
|
|
|
| - Iterable expand(Iterable f(StyleSheet element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| + @DomName('NamedNodeMap.removeNamedItemNS')
|
| + @DocsEditable
|
| + Node removeNamedItemNS(String namespaceURI, String localName) native;
|
|
|
| - bool every(bool f(StyleSheet element)) => IterableMixinWorkaround.every(this, f);
|
| + @DomName('NamedNodeMap.setNamedItem')
|
| + @DocsEditable
|
| + Node setNamedItem(Node node) native;
|
|
|
| - bool any(bool f(StyleSheet element)) => IterableMixinWorkaround.any(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.
|
|
|
| - List<StyleSheet> toList({ bool growable: true }) =>
|
| - new List<StyleSheet>.from(this, growable: growable);
|
|
|
| - Set<StyleSheet> toSet() => new Set<StyleSheet>.from(this);
|
| +@DocsEditable
|
| +@DomName('PagePopupController')
|
| +abstract class _PagePopupController native "PagePopupController" {
|
| +}
|
| +// 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('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.
|
|
|
| - Iterable<StyleSheet> takeWhile(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
|
|
| - Iterable<StyleSheet> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| +// 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.
|
|
|
| - Iterable<StyleSheet> skipWhile(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
|
|
| - StyleSheet firstWhere(bool test(StyleSheet value), { StyleSheet orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| +@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.
|
|
|
| - StyleSheet lastWhere(bool test(StyleSheet value), {StyleSheet orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
|
|
| - StyleSheet singleWhere(bool test(StyleSheet value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| +@DocsEditable
|
| +@DomName('SharedWorker')
|
| +abstract class _SharedWorker extends AbstractWorker native "SharedWorker" {
|
|
|
| - StyleSheet elementAt(int index) {
|
| - return this[index];
|
| + @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.
|
|
|
| - // From Collection<StyleSheet>:
|
|
|
| - void add(StyleSheet value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| +@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.
|
|
|
| - void addAll(Iterable<StyleSheet> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
|
|
| - // From List<StyleSheet>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| +@DocsEditable
|
| +@DomName('SpeechInputResultList')
|
| +class _SpeechInputResultList extends Object with ListMixin<SpeechInputResult>, ImmutableListMixin<SpeechInputResult> implements JavaScriptIndexingBehavior, List<SpeechInputResult> native "SpeechInputResultList" {
|
|
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| + @DomName('SpeechInputResultList.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
|
|
| - Iterable<StyleSheet> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| + SpeechInputResult operator[](int index) => JS("SpeechInputResult", "#[#]", this, index);
|
|
|
| - void sort([int compare(StyleSheet a, StyleSheet b)]) {
|
| - throw new UnsupportedError("Cannot sort 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.
|
|
|
| - 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");
|
| + void set length(int value) {
|
| + throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| - 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.
|
| @@ -26856,6 +22786,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.
|
|
|