| 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 d67a2c9ff3950b3d9a770804f89d73a70f63118f..ef1c3a4c346ea4e15cedea1ffdb341f903ad5b92 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -187,6 +187,9 @@ class AnchorElement extends Element native "HTMLAnchorElement" {
|
|
|
| @DocsEditable
|
| @DomName('WebKitAnimationEvent')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| class AnimationEvent extends Event native "WebKitAnimationEvent" {
|
|
|
| @DomName('AnimationEvent.animationName')
|
| @@ -982,7 +985,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
|
|
| @DomName('CanvasRenderingContext2D.currentPath')
|
| @DocsEditable
|
| - DomPath currentPath;
|
| + Path currentPath;
|
|
|
| @DomName('CanvasRenderingContext2D.fillStyle')
|
| @DocsEditable
|
| @@ -1826,6 +1829,22 @@ class CssCharsetRule extends CssRule native "CSSCharsetRule" {
|
|
|
|
|
| @DocsEditable
|
| +@DomName('WebKitCSSFilterRule')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class CssFilterRule extends CssRule native "WebKitCSSFilterRule" {
|
| +
|
| + @DomName('WebKitCSSFilterRule.style')
|
| + @DocsEditable
|
| + final CssStyleDeclaration style;
|
| +}
|
| +// 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('CSSFontFaceLoadEvent')
|
| class CssFontFaceLoadEvent extends Event native "CSSFontFaceLoadEvent" {
|
|
|
| @@ -1903,6 +1922,9 @@ class CssImportRule extends CssRule native "CSSImportRule" {
|
|
|
| @DocsEditable
|
| @DomName('WebKitCSSKeyframeRule')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| class CssKeyframeRule extends CssRule native "WebKitCSSKeyframeRule" {
|
|
|
| @DomName('WebKitCSSKeyframeRule.keyText')
|
| @@ -1920,6 +1942,9 @@ class CssKeyframeRule extends CssRule native "WebKitCSSKeyframeRule" {
|
|
|
| @DocsEditable
|
| @DomName('WebKitCSSKeyframesRule')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| class CssKeyframesRule extends CssRule native "WebKitCSSKeyframesRule" {
|
|
|
| @DomName('WebKitCSSKeyframesRule.cssRules')
|
| @@ -1994,6 +2019,24 @@ class CssPageRule extends CssRule native "CSSPageRule" {
|
|
|
|
|
| @DocsEditable
|
| +@DomName('WebKitCSSRegionRule')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class CssRegionRule extends CssRule native "WebKitCSSRegionRule" {
|
| +
|
| + @DomName('WebKitCSSRegionRule.cssRules')
|
| + @DocsEditable
|
| + @Returns('_CssRuleList')
|
| + @Creates('_CssRuleList')
|
| + final List<CssRule> cssRules;
|
| +}
|
| +// 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('CSSRule')
|
| class CssRule native "CSSRule" {
|
|
|
| @@ -6041,7 +6084,7 @@ class Document extends Node native "Document"
|
|
|
| @DomName('Document.securityPolicy')
|
| @DocsEditable
|
| - final DomSecurityPolicy securityPolicy;
|
| + final SecurityPolicy securityPolicy;
|
|
|
| @JSName('selectedStylesheetSet')
|
| @DomName('Document.selectedStylesheetSet')
|
| @@ -6301,7 +6344,7 @@ class Document extends Node native "Document"
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| @Experimental
|
| - DomNamedFlowCollection getNamedFlows() native;
|
| + NamedFlowCollection getNamedFlows() native;
|
|
|
| @DomName('Document.webkitRegister')
|
| @DocsEditable
|
| @@ -6744,24 +6787,32 @@ class DomImplementation native "DOMImplementation" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('MimeType')
|
| -class DomMimeType native "MimeType" {
|
| +@DomName('DOMParser')
|
| +class DomParser native "DOMParser" {
|
|
|
| - @DomName('DOMMimeType.description')
|
| + @DomName('DOMParser.DOMParser')
|
| @DocsEditable
|
| - final String description;
|
| + factory DomParser() {
|
| + return DomParser._create_1();
|
| + }
|
| + static DomParser _create_1() => JS('DomParser', 'new DOMParser()');
|
|
|
| - @DomName('DOMMimeType.enabledPlugin')
|
| + @DomName('DOMParser.parseFromString')
|
| @DocsEditable
|
| - final DomPlugin enabledPlugin;
|
| + Document parseFromString(String str, String contentType) native;
|
| +}
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
|
|
| - @DomName('DOMMimeType.suffixes')
|
| - @DocsEditable
|
| - final String suffixes;
|
|
|
| - @DomName('DOMMimeType.type')
|
| +@DocsEditable
|
| +@DomName('DOMSettableTokenList')
|
| +class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" {
|
| +
|
| + @DomName('DOMSettableTokenList.value')
|
| @DocsEditable
|
| - final String type;
|
| + String value;
|
| }
|
| // 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
|
| @@ -6769,105 +6820,105 @@ class DomMimeType native "MimeType" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('MimeTypeArray')
|
| -class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType> native "MimeTypeArray" {
|
| +@DomName('DOMStringList')
|
| +class DomStringList implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
|
|
| - @DomName('DOMMimeTypeArray.length')
|
| + @DomName('DOMStringList.length')
|
| @DocsEditable
|
| int get length => JS("int", "#.length", this);
|
|
|
| - DomMimeType operator[](int index) => JS("DomMimeType", "#[#]", this, index);
|
| + String operator[](int index) => JS("String", "#[#]", this, index);
|
|
|
| - void operator[]=(int index, DomMimeType value) {
|
| + void operator[]=(int index, String value) {
|
| throw new UnsupportedError("Cannot assign element of immutable List.");
|
| }
|
| - // -- start List<DomMimeType> mixins.
|
| - // DomMimeType is the element type.
|
| + // -- start List<String> mixins.
|
| + // String is the element type.
|
|
|
| - // From Iterable<DomMimeType>:
|
| + // From Iterable<String>:
|
|
|
| - Iterator<DomMimeType> get iterator {
|
| + 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<DomMimeType>(this);
|
| + return new FixedSizeListIterator<String>(this);
|
| }
|
|
|
| - DomMimeType reduce(DomMimeType combine(DomMimeType value, DomMimeType element)) {
|
| + String reduce(String combine(String value, String element)) {
|
| return IterableMixinWorkaround.reduce(this, combine);
|
| }
|
|
|
| dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, DomMimeType element)) {
|
| + dynamic combine(dynamic previousValue, String element)) {
|
| return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| }
|
|
|
| - bool contains(DomMimeType element) => IterableMixinWorkaround.contains(this, element);
|
| + // contains() defined by IDL.
|
|
|
| - void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(this, f);
|
| + void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
|
|
|
| String join([String separator = ""]) =>
|
| IterableMixinWorkaround.joinList(this, separator);
|
|
|
| - Iterable map(f(DomMimeType element)) =>
|
| + Iterable map(f(String element)) =>
|
| IterableMixinWorkaround.mapList(this, f);
|
|
|
| - Iterable<DomMimeType> where(bool f(DomMimeType element)) =>
|
| + Iterable<String> where(bool f(String element)) =>
|
| IterableMixinWorkaround.where(this, f);
|
|
|
| - Iterable expand(Iterable f(DomMimeType element)) =>
|
| + Iterable expand(Iterable f(String element)) =>
|
| IterableMixinWorkaround.expand(this, f);
|
|
|
| - bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this, f);
|
| + bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
|
|
|
| - bool any(bool f(DomMimeType element)) => IterableMixinWorkaround.any(this, f);
|
| + bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f);
|
|
|
| - List<DomMimeType> toList({ bool growable: true }) =>
|
| - new List<DomMimeType>.from(this, growable: growable);
|
| + List<String> toList({ bool growable: true }) =>
|
| + new List<String>.from(this, growable: growable);
|
|
|
| - Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this);
|
| + Set<String> toSet() => new Set<String>.from(this);
|
|
|
| bool get isEmpty => this.length == 0;
|
|
|
| - Iterable<DomMimeType> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| + Iterable<String> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
|
|
| - Iterable<DomMimeType> takeWhile(bool test(DomMimeType value)) {
|
| + Iterable<String> takeWhile(bool test(String value)) {
|
| return IterableMixinWorkaround.takeWhile(this, test);
|
| }
|
|
|
| - Iterable<DomMimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| + Iterable<String> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
|
|
| - Iterable<DomMimeType> skipWhile(bool test(DomMimeType value)) {
|
| + Iterable<String> skipWhile(bool test(String value)) {
|
| return IterableMixinWorkaround.skipWhile(this, test);
|
| }
|
|
|
| - DomMimeType firstWhere(bool test(DomMimeType value), { DomMimeType orElse() }) {
|
| + String firstWhere(bool test(String value), { String orElse() }) {
|
| return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| }
|
|
|
| - DomMimeType lastWhere(bool test(DomMimeType value), {DomMimeType orElse()}) {
|
| + String lastWhere(bool test(String value), {String orElse()}) {
|
| return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| }
|
|
|
| - DomMimeType singleWhere(bool test(DomMimeType value)) {
|
| + String singleWhere(bool test(String value)) {
|
| return IterableMixinWorkaround.singleWhere(this, test);
|
| }
|
|
|
| - DomMimeType elementAt(int index) {
|
| + String elementAt(int index) {
|
| return this[index];
|
| }
|
|
|
| - // From Collection<DomMimeType>:
|
| + // From Collection<String>:
|
|
|
| - void add(DomMimeType value) {
|
| + void add(String value) {
|
| throw new UnsupportedError("Cannot add to immutable List.");
|
| }
|
|
|
| - void addAll(Iterable<DomMimeType> iterable) {
|
| + void addAll(Iterable<String> iterable) {
|
| throw new UnsupportedError("Cannot add to immutable List.");
|
| }
|
|
|
| - // From List<DomMimeType>:
|
| + // From List<String>:
|
| void set length(int value) {
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
| @@ -6876,55 +6927,55 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| throw new UnsupportedError("Cannot clear immutable List.");
|
| }
|
|
|
| - Iterable<DomMimeType> get reversed {
|
| + Iterable<String> get reversed {
|
| return IterableMixinWorkaround.reversedList(this);
|
| }
|
|
|
| - void sort([int compare(DomMimeType a, DomMimeType b)]) {
|
| + void sort([int compare(String a, String b)]) {
|
| throw new UnsupportedError("Cannot sort immutable List.");
|
| }
|
|
|
| - int indexOf(DomMimeType element, [int start = 0]) =>
|
| + int indexOf(String element, [int start = 0]) =>
|
| Lists.indexOf(this, element, start, this.length);
|
|
|
| - int lastIndexOf(DomMimeType element, [int start]) {
|
| + int lastIndexOf(String element, [int start]) {
|
| if (start == null) start = length - 1;
|
| return Lists.lastIndexOf(this, element, start);
|
| }
|
|
|
| - DomMimeType get first {
|
| + String get first {
|
| if (this.length > 0) return this[0];
|
| throw new StateError("No elements");
|
| }
|
|
|
| - DomMimeType get last {
|
| + String get last {
|
| if (this.length > 0) return this[this.length - 1];
|
| throw new StateError("No elements");
|
| }
|
|
|
| - DomMimeType get single {
|
| + 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, DomMimeType element) {
|
| + void insert(int index, String element) {
|
| throw new UnsupportedError("Cannot add to immutable List.");
|
| }
|
|
|
| - void insertAll(int index, Iterable<DomMimeType> iterable) {
|
| + void insertAll(int index, Iterable<String> iterable) {
|
| throw new UnsupportedError("Cannot add to immutable List.");
|
| }
|
|
|
| - void setAll(int index, Iterable<DomMimeType> iterable) {
|
| + void setAll(int index, Iterable<String> iterable) {
|
| throw new UnsupportedError("Cannot modify an immutable List.");
|
| }
|
|
|
| - DomMimeType removeAt(int pos) {
|
| + String removeAt(int pos) {
|
| throw new UnsupportedError("Cannot remove from immutable List.");
|
| }
|
|
|
| - DomMimeType removeLast() {
|
| + String removeLast() {
|
| throw new UnsupportedError("Cannot remove from immutable List.");
|
| }
|
|
|
| @@ -6932,15 +6983,15 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| throw new UnsupportedError("Cannot remove from immutable List.");
|
| }
|
|
|
| - void removeWhere(bool test(DomMimeType element)) {
|
| + void removeWhere(bool test(String element)) {
|
| throw new UnsupportedError("Cannot remove from immutable List.");
|
| }
|
|
|
| - void retainWhere(bool test(DomMimeType element)) {
|
| + void retainWhere(bool test(String element)) {
|
| throw new UnsupportedError("Cannot remove from immutable List.");
|
| }
|
|
|
| - void setRange(int start, int end, Iterable<DomMimeType> iterable, [int skipCount=0]) {
|
| + void setRange(int start, int end, Iterable<String> iterable, [int skipCount=0]) {
|
| throw new UnsupportedError("Cannot setRange on immutable List.");
|
| }
|
|
|
| @@ -6948,23 +6999,23 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| }
|
|
|
| - void replaceRange(int start, int end, Iterable<DomMimeType> iterable) {
|
| + void replaceRange(int start, int end, Iterable<String> iterable) {
|
| throw new UnsupportedError("Cannot modify an immutable List.");
|
| }
|
|
|
| - void fillRange(int start, int end, [DomMimeType fillValue]) {
|
| + void fillRange(int start, int end, [String fillValue]) {
|
| throw new UnsupportedError("Cannot modify an immutable List.");
|
| }
|
|
|
| - Iterable<DomMimeType> getRange(int start, int end) =>
|
| + Iterable<String> getRange(int start, int end) =>
|
| IterableMixinWorkaround.getRangeList(this, start, end);
|
|
|
| - List<DomMimeType> sublist(int start, [int end]) {
|
| + List<String> sublist(int start, [int end]) {
|
| if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <DomMimeType>[]);
|
| + return Lists.getRange(this, start, end, <String>[]);
|
| }
|
|
|
| - Map<int, DomMimeType> asMap() =>
|
| + Map<int, String> asMap() =>
|
| IterableMixinWorkaround.asMapList(this);
|
|
|
| String toString() {
|
| @@ -6974,56 +7025,23 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
| return buffer.toString();
|
| }
|
|
|
| - // -- end List<DomMimeType> mixins.
|
| -
|
| - @DomName('DOMMimeTypeArray.item')
|
| - @DocsEditable
|
| - DomMimeType item(int index) native;
|
| -
|
| - @DomName('DOMMimeTypeArray.namedItem')
|
| - @DocsEditable
|
| - DomMimeType 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('WebKitNamedFlowCollection')
|
| -class DomNamedFlowCollection native "WebKitNamedFlowCollection" {
|
| -
|
| - @DomName('DOMNamedFlowCollection.length')
|
| - @DocsEditable
|
| - final int length;
|
| + // -- end List<String> mixins.
|
|
|
| - @DomName('DOMNamedFlowCollection.item')
|
| + @DomName('DOMStringList.contains')
|
| @DocsEditable
|
| - NamedFlow item(int index) native;
|
| + bool contains(String string) native;
|
|
|
| - @DomName('DOMNamedFlowCollection.namedItem')
|
| + @DomName('DOMStringList.item')
|
| @DocsEditable
|
| - NamedFlow namedItem(String name) native;
|
| + String item(int index) native;
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| -@DocsEditable
|
| -@DomName('DOMParser')
|
| -class DomParser native "DOMParser" {
|
| -
|
| - @DomName('DOMParser.DOMParser')
|
| - @DocsEditable
|
| - factory DomParser() {
|
| - return DomParser._create_1();
|
| - }
|
| - static DomParser _create_1() => JS('DomParser', 'new DOMParser()');
|
| -
|
| - @DomName('DOMParser.parseFromString')
|
| - @DocsEditable
|
| - Document parseFromString(String str, String contentType) native;
|
| +@DomName('DOMStringMap')
|
| +abstract class DomStringMap {
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| @@ -7031,804 +7049,61 @@ class DomParser native "DOMParser" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('Path')
|
| -class DomPath native "Path" {
|
| -
|
| - @DomName('DOMPath.DOMPath')
|
| - @DocsEditable
|
| - factory DomPath([path_OR_text]) {
|
| - if (!?path_OR_text) {
|
| - return DomPath._create_1();
|
| - }
|
| - if ((path_OR_text is DomPath || path_OR_text == null)) {
|
| - return DomPath._create_2(path_OR_text);
|
| - }
|
| - if ((path_OR_text is String || path_OR_text == null)) {
|
| - return DomPath._create_3(path_OR_text);
|
| - }
|
| - throw new ArgumentError("Incorrect number or type of arguments");
|
| - }
|
| - static DomPath _create_1() => JS('DomPath', 'new Path()');
|
| - static DomPath _create_2(path_OR_text) => JS('DomPath', 'new Path(#)', path_OR_text);
|
| - static DomPath _create_3(path_OR_text) => JS('DomPath', 'new Path(#)', path_OR_text);
|
| -
|
| - @DomName('DOMPath.arc')
|
| - @DocsEditable
|
| - void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) native;
|
| -
|
| - @DomName('DOMPath.arcTo')
|
| - @DocsEditable
|
| - void arcTo(num x1, num y1, num x2, num y2, num radius) native;
|
| -
|
| - @DomName('DOMPath.bezierCurveTo')
|
| - @DocsEditable
|
| - void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) native;
|
| +@DomName('DOMTokenList')
|
| +class DomTokenList native "DOMTokenList" {
|
|
|
| - @DomName('DOMPath.closePath')
|
| + @DomName('DOMTokenList.length')
|
| @DocsEditable
|
| - void closePath() native;
|
| + final int length;
|
|
|
| - @DomName('DOMPath.lineTo')
|
| + @DomName('DOMTokenList.contains')
|
| @DocsEditable
|
| - void lineTo(num x, num y) native;
|
| + bool contains(String token) native;
|
|
|
| - @DomName('DOMPath.moveTo')
|
| + @DomName('DOMTokenList.item')
|
| @DocsEditable
|
| - void moveTo(num x, num y) native;
|
| + String item(int index) native;
|
|
|
| - @DomName('DOMPath.quadraticCurveTo')
|
| + @DomName('DOMTokenList.toString')
|
| @DocsEditable
|
| - void quadraticCurveTo(num cpx, num cpy, num x, num y) native;
|
| + String toString() native;
|
|
|
| - @DomName('DOMPath.rect')
|
| + @DomName('DOMTokenList.toggle')
|
| @DocsEditable
|
| - void rect(num x, num y, num width, num height) native;
|
| + bool toggle(String token, [bool force]) 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('Plugin')
|
| -class DomPlugin native "Plugin" {
|
| +class _ChildrenElementList extends ListBase<Element> {
|
| + // Raw Element.
|
| + final Element _element;
|
| + final HtmlCollection _childElements;
|
|
|
| - @DomName('DOMPlugin.description')
|
| - @DocsEditable
|
| - final String description;
|
| + _ChildrenElementList._wrap(Element element)
|
| + : _childElements = element.$dom_children,
|
| + _element = element;
|
|
|
| - @DomName('DOMPlugin.filename')
|
| - @DocsEditable
|
| - final String filename;
|
| + bool contains(Element element) => _childElements.contains(element);
|
|
|
| - @DomName('DOMPlugin.length')
|
| - @DocsEditable
|
| - final int length;
|
|
|
| - @DomName('DOMPlugin.name')
|
| - @DocsEditable
|
| - final String name;
|
| + bool get isEmpty {
|
| + return _element.$dom_firstElementChild == null;
|
| + }
|
|
|
| - @DomName('DOMPlugin.item')
|
| - @DocsEditable
|
| - DomMimeType item(int index) native;
|
| + int get length {
|
| + return _childElements.length;
|
| + }
|
|
|
| - @DomName('DOMPlugin.namedItem')
|
| - @DocsEditable
|
| - DomMimeType 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.
|
| + Element operator [](int index) {
|
| + return _childElements[index];
|
| + }
|
|
|
| -
|
| -@DocsEditable
|
| -@DomName('PluginArray')
|
| -class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> native "PluginArray" {
|
| -
|
| - @DomName('DOMPluginArray.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - DomPlugin operator[](int index) => JS("DomPlugin", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, DomPlugin value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- start List<DomPlugin> mixins.
|
| - // DomPlugin is the element type.
|
| -
|
| - // From Iterable<DomPlugin>:
|
| -
|
| - Iterator<DomPlugin> get iterator {
|
| - // Note: NodeLists are not fixed size. And most probably length shouldn't
|
| - // be cached in both iterator _and_ forEach method. For now caching it
|
| - // for consistency.
|
| - return new FixedSizeListIterator<DomPlugin>(this);
|
| - }
|
| -
|
| - DomPlugin reduce(DomPlugin combine(DomPlugin value, DomPlugin element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - dynamic fold(dynamic initialValue,
|
| - dynamic combine(dynamic previousValue, DomPlugin element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - bool contains(DomPlugin element) => IterableMixinWorkaround.contains(this, element);
|
| -
|
| - void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(this, f);
|
| -
|
| - String join([String separator = ""]) =>
|
| - IterableMixinWorkaround.joinList(this, separator);
|
| -
|
| - Iterable map(f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.mapList(this, f);
|
| -
|
| - Iterable<DomPlugin> where(bool f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.where(this, f);
|
| -
|
| - Iterable expand(Iterable f(DomPlugin element)) =>
|
| - IterableMixinWorkaround.expand(this, f);
|
| -
|
| - bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f);
|
| -
|
| - bool any(bool f(DomPlugin element)) => IterableMixinWorkaround.any(this, f);
|
| -
|
| - List<DomPlugin> toList({ bool growable: true }) =>
|
| - new List<DomPlugin>.from(this, growable: growable);
|
| -
|
| - Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this);
|
| -
|
| - bool get isEmpty => this.length == 0;
|
| -
|
| - Iterable<DomPlugin> take(int n) => IterableMixinWorkaround.takeList(this, n);
|
| -
|
| - Iterable<DomPlugin> takeWhile(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<DomPlugin> skip(int n) => IterableMixinWorkaround.skipList(this, n);
|
| -
|
| - Iterable<DomPlugin> skipWhile(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.skipWhile(this, test);
|
| - }
|
| -
|
| - DomPlugin firstWhere(bool test(DomPlugin value), { DomPlugin orElse() }) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - DomPlugin lastWhere(bool test(DomPlugin value), {DomPlugin orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - DomPlugin singleWhere(bool test(DomPlugin value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| - DomPlugin elementAt(int index) {
|
| - return this[index];
|
| - }
|
| -
|
| - // From Collection<DomPlugin>:
|
| -
|
| - void add(DomPlugin value) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void addAll(Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - // From List<DomPlugin>:
|
| - void set length(int value) {
|
| - throw new UnsupportedError("Cannot resize immutable List.");
|
| - }
|
| -
|
| - void clear() {
|
| - throw new UnsupportedError("Cannot clear immutable List.");
|
| - }
|
| -
|
| - Iterable<DomPlugin> get reversed {
|
| - return IterableMixinWorkaround.reversedList(this);
|
| - }
|
| -
|
| - void sort([int compare(DomPlugin a, DomPlugin b)]) {
|
| - throw new UnsupportedError("Cannot sort immutable List.");
|
| - }
|
| -
|
| - int indexOf(DomPlugin element, [int start = 0]) =>
|
| - Lists.indexOf(this, element, start, this.length);
|
| -
|
| - int lastIndexOf(DomPlugin element, [int start]) {
|
| - if (start == null) start = length - 1;
|
| - return Lists.lastIndexOf(this, element, start);
|
| - }
|
| -
|
| - DomPlugin get first {
|
| - if (this.length > 0) return this[0];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomPlugin get last {
|
| - if (this.length > 0) return this[this.length - 1];
|
| - throw new StateError("No elements");
|
| - }
|
| -
|
| - DomPlugin get single {
|
| - if (length == 1) return this[0];
|
| - if (length == 0) throw new StateError("No elements");
|
| - throw new StateError("More than one element");
|
| - }
|
| -
|
| - void insert(int index, DomPlugin element) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void insertAll(int index, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot add to immutable List.");
|
| - }
|
| -
|
| - void setAll(int index, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - DomPlugin removeAt(int pos) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - DomPlugin removeLast() {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - bool remove(Object object) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void removeWhere(bool test(DomPlugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void retainWhere(bool test(DomPlugin element)) {
|
| - throw new UnsupportedError("Cannot remove from immutable List.");
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<DomPlugin> iterable, [int skipCount=0]) {
|
| - throw new UnsupportedError("Cannot setRange on immutable List.");
|
| - }
|
| -
|
| - void removeRange(int start, int end) {
|
| - throw new UnsupportedError("Cannot removeRange on immutable List.");
|
| - }
|
| -
|
| - void replaceRange(int start, int end, Iterable<DomPlugin> iterable) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - void fillRange(int start, int end, [DomPlugin fillValue]) {
|
| - throw new UnsupportedError("Cannot modify an immutable List.");
|
| - }
|
| -
|
| - Iterable<DomPlugin> getRange(int start, int end) =>
|
| - IterableMixinWorkaround.getRangeList(this, start, end);
|
| -
|
| - List<DomPlugin> sublist(int start, [int end]) {
|
| - if (end == null) end = length;
|
| - return Lists.getRange(this, start, end, <DomPlugin>[]);
|
| - }
|
| -
|
| - Map<int, DomPlugin> asMap() =>
|
| - IterableMixinWorkaround.asMapList(this);
|
| -
|
| - String toString() {
|
| - StringBuffer buffer = new StringBuffer('[');
|
| - buffer.writeAll(this, ', ');
|
| - buffer.write(']');
|
| - return buffer.toString();
|
| - }
|
| -
|
| - // -- end List<DomPlugin> mixins.
|
| -
|
| - @DomName('DOMPluginArray.item')
|
| - @DocsEditable
|
| - DomPlugin item(int index) native;
|
| -
|
| - @DomName('DOMPluginArray.namedItem')
|
| - @DocsEditable
|
| - DomPlugin 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('SecurityPolicy')
|
| -class DomSecurityPolicy native "SecurityPolicy" {
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsEval')
|
| - @DocsEditable
|
| - final bool allowsEval;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsInlineScript')
|
| - @DocsEditable
|
| - final bool allowsInlineScript;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsInlineStyle')
|
| - @DocsEditable
|
| - final bool allowsInlineStyle;
|
| -
|
| - @DomName('DOMSecurityPolicy.isActive')
|
| - @DocsEditable
|
| - final bool isActive;
|
| -
|
| - @DomName('DOMSecurityPolicy.reportURIs')
|
| - @DocsEditable
|
| - @Returns('DomStringList')
|
| - @Creates('DomStringList')
|
| - final List<String> reportURIs;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsConnectionTo')
|
| - @DocsEditable
|
| - bool allowsConnectionTo(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsFontFrom')
|
| - @DocsEditable
|
| - bool allowsFontFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsFormAction')
|
| - @DocsEditable
|
| - bool allowsFormAction(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsFrameFrom')
|
| - @DocsEditable
|
| - bool allowsFrameFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsImageFrom')
|
| - @DocsEditable
|
| - bool allowsImageFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsMediaFrom')
|
| - @DocsEditable
|
| - bool allowsMediaFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsObjectFrom')
|
| - @DocsEditable
|
| - bool allowsObjectFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsPluginType')
|
| - @DocsEditable
|
| - bool allowsPluginType(String type) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsScriptFrom')
|
| - @DocsEditable
|
| - bool allowsScriptFrom(String url) native;
|
| -
|
| - @DomName('DOMSecurityPolicy.allowsStyleFrom')
|
| - @DocsEditable
|
| - bool allowsStyleFrom(String url) 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('Selection')
|
| -class DomSelection native "Selection" {
|
| -
|
| - @DomName('DOMSelection.anchorNode')
|
| - @DocsEditable
|
| - final Node anchorNode;
|
| -
|
| - @DomName('DOMSelection.anchorOffset')
|
| - @DocsEditable
|
| - final int anchorOffset;
|
| -
|
| - @DomName('DOMSelection.baseNode')
|
| - @DocsEditable
|
| - final Node baseNode;
|
| -
|
| - @DomName('DOMSelection.baseOffset')
|
| - @DocsEditable
|
| - final int baseOffset;
|
| -
|
| - @DomName('DOMSelection.extentNode')
|
| - @DocsEditable
|
| - final Node extentNode;
|
| -
|
| - @DomName('DOMSelection.extentOffset')
|
| - @DocsEditable
|
| - final int extentOffset;
|
| -
|
| - @DomName('DOMSelection.focusNode')
|
| - @DocsEditable
|
| - final Node focusNode;
|
| -
|
| - @DomName('DOMSelection.focusOffset')
|
| - @DocsEditable
|
| - final int focusOffset;
|
| -
|
| - @DomName('DOMSelection.isCollapsed')
|
| - @DocsEditable
|
| - final bool isCollapsed;
|
| -
|
| - @DomName('DOMSelection.rangeCount')
|
| - @DocsEditable
|
| - final int rangeCount;
|
| -
|
| - @DomName('DOMSelection.type')
|
| - @DocsEditable
|
| - final String type;
|
| -
|
| - @DomName('DOMSelection.addRange')
|
| - @DocsEditable
|
| - void addRange(Range range) native;
|
| -
|
| - @DomName('DOMSelection.collapse')
|
| - @DocsEditable
|
| - void collapse(Node node, int index) native;
|
| -
|
| - @DomName('DOMSelection.collapseToEnd')
|
| - @DocsEditable
|
| - void collapseToEnd() native;
|
| -
|
| - @DomName('DOMSelection.collapseToStart')
|
| - @DocsEditable
|
| - void collapseToStart() native;
|
| -
|
| - @DomName('DOMSelection.containsNode')
|
| - @DocsEditable
|
| - bool containsNode(Node node, bool allowPartial) native;
|
| -
|
| - @DomName('DOMSelection.deleteFromDocument')
|
| - @DocsEditable
|
| - void deleteFromDocument() native;
|
| -
|
| - @DomName('DOMSelection.empty')
|
| - @DocsEditable
|
| - void empty() native;
|
| -
|
| - @DomName('DOMSelection.extend')
|
| - @DocsEditable
|
| - void extend(Node node, int offset) native;
|
| -
|
| - @DomName('DOMSelection.getRangeAt')
|
| - @DocsEditable
|
| - Range getRangeAt(int index) native;
|
| -
|
| - @DomName('DOMSelection.modify')
|
| - @DocsEditable
|
| - void modify(String alter, String direction, String granularity) native;
|
| -
|
| - @DomName('DOMSelection.removeAllRanges')
|
| - @DocsEditable
|
| - void removeAllRanges() native;
|
| -
|
| - @DomName('DOMSelection.selectAllChildren')
|
| - @DocsEditable
|
| - void selectAllChildren(Node node) native;
|
| -
|
| - @DomName('DOMSelection.setBaseAndExtent')
|
| - @DocsEditable
|
| - void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) native;
|
| -
|
| - @DomName('DOMSelection.setPosition')
|
| - @DocsEditable
|
| - void setPosition(Node node, int offset) native;
|
| -
|
| - @DomName('DOMSelection.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('DOMSettableTokenList')
|
| -class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" {
|
| -
|
| - @DomName('DOMSettableTokenList.value')
|
| - @DocsEditable
|
| - String value;
|
| -}
|
| -// 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('DOMStringList')
|
| -class DomStringList implements JavaScriptIndexingBehavior, List<String> native "DOMStringList" {
|
| -
|
| - @DomName('DOMStringList.length')
|
| - @DocsEditable
|
| - int get length => JS("int", "#.length", this);
|
| -
|
| - String operator[](int index) => JS("String", "#[#]", this, index);
|
| -
|
| - void operator[]=(int index, String value) {
|
| - throw new UnsupportedError("Cannot assign element of immutable List.");
|
| - }
|
| - // -- 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')
|
| - @DocsEditable
|
| - bool contains(String string) native;
|
| -
|
| - @DomName('DOMStringList.item')
|
| - @DocsEditable
|
| - String item(int index) native;
|
| -}
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -
|
| -@DomName('DOMStringMap')
|
| -abstract class DomStringMap {
|
| -}
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -
|
| -@DocsEditable
|
| -@DomName('DOMTokenList')
|
| -class DomTokenList native "DOMTokenList" {
|
| -
|
| - @DomName('DOMTokenList.length')
|
| - @DocsEditable
|
| - final int length;
|
| -
|
| - @DomName('DOMTokenList.contains')
|
| - @DocsEditable
|
| - bool contains(String token) native;
|
| -
|
| - @DomName('DOMTokenList.item')
|
| - @DocsEditable
|
| - String item(int index) native;
|
| -
|
| - @DomName('DOMTokenList.toString')
|
| - @DocsEditable
|
| - String toString() native;
|
| -
|
| - @DomName('DOMTokenList.toggle')
|
| - @DocsEditable
|
| - bool toggle(String token, [bool force]) 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.
|
| -
|
| -
|
| -class _ChildrenElementList extends ListBase<Element> {
|
| - // Raw Element.
|
| - final Element _element;
|
| - final HtmlCollection _childElements;
|
| -
|
| - _ChildrenElementList._wrap(Element element)
|
| - : _childElements = element.$dom_children,
|
| - _element = element;
|
| -
|
| - bool contains(Element element) => _childElements.contains(element);
|
| -
|
| -
|
| - bool get isEmpty {
|
| - return _element.$dom_firstElementChild == null;
|
| - }
|
| -
|
| - int get length {
|
| - return _childElements.length;
|
| - }
|
| -
|
| - Element operator [](int index) {
|
| - return _childElements[index];
|
| - }
|
| -
|
| - void operator []=(int index, Element value) {
|
| - _element.$dom_replaceChild(value, _childElements[index]);
|
| - }
|
| + void operator []=(int index, Element value) {
|
| + _element.$dom_replaceChild(value, _childElements[index]);
|
| + }
|
|
|
| void set length(int newLength) {
|
| // TODO(jacobr): remove children when length is reduced.
|
| @@ -14939,6 +14214,252 @@ class MeterElement extends Element native "HTMLMeterElement" {
|
|
|
|
|
| @DocsEditable
|
| +@DomName('MimeType')
|
| +class MimeType native "MimeType" {
|
| +
|
| + @DomName('DOMMimeType.description')
|
| + @DocsEditable
|
| + final String description;
|
| +
|
| + @DomName('DOMMimeType.enabledPlugin')
|
| + @DocsEditable
|
| + final Plugin enabledPlugin;
|
| +
|
| + @DomName('DOMMimeType.suffixes')
|
| + @DocsEditable
|
| + final String suffixes;
|
| +
|
| + @DomName('DOMMimeType.type')
|
| + @DocsEditable
|
| + final String type;
|
| +}
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +
|
| +@DocsEditable
|
| +@DomName('MimeTypeArray')
|
| +class MimeTypeArray implements JavaScriptIndexingBehavior, List<MimeType> native "MimeTypeArray" {
|
| +
|
| + @DomName('DOMMimeTypeArray.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
| +
|
| + MimeType operator[](int index) => JS("MimeType", "#[#]", this, index);
|
| +
|
| + void operator[]=(int index, MimeType value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| + }
|
| + // -- 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);
|
| + }
|
| +
|
| + 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);
|
| +
|
| + Iterable expand(Iterable f(MimeType element)) =>
|
| + IterableMixinWorkaround.expand(this, f);
|
| +
|
| + bool every(bool f(MimeType element)) => IterableMixinWorkaround.every(this, f);
|
| +
|
| + bool any(bool f(MimeType element)) => IterableMixinWorkaround.any(this, f);
|
| +
|
| + List<MimeType> toList({ bool growable: true }) =>
|
| + new List<MimeType>.from(this, growable: growable);
|
| +
|
| + 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" {
|
|
|
| @@ -15333,6 +14854,9 @@ class MutationRecord native "MutationRecord" {
|
|
|
| @DocsEditable
|
| @DomName('WebKitNamedFlow')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| class NamedFlow extends EventTarget native "WebKitNamedFlow" {
|
|
|
| @DomName('NamedFlow.firstEmptyRegionIndex')
|
| @@ -15384,6 +14908,30 @@ class NamedFlow extends EventTarget native "WebKitNamedFlow" {
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| +@DocsEditable
|
| +@DomName('WebKitNamedFlowCollection')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| +class NamedFlowCollection native "WebKitNamedFlowCollection" {
|
| +
|
| + @DomName('DOMNamedFlowCollection.length')
|
| + @DocsEditable
|
| + final int length;
|
| +
|
| + @DomName('DOMNamedFlowCollection.item')
|
| + @DocsEditable
|
| + NamedFlow item(int index) native;
|
| +
|
| + @DomName('DOMNamedFlowCollection.namedItem')
|
| + @DocsEditable
|
| + NamedFlow 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.
|
| +
|
| +
|
| @DomName('Navigator')
|
| class Navigator native "Navigator" {
|
|
|
| @@ -15485,7 +15033,7 @@ class Navigator native "Navigator" {
|
|
|
| @DomName('Navigator.mimeTypes')
|
| @DocsEditable
|
| - final DomMimeTypeArray mimeTypes;
|
| + final MimeTypeArray mimeTypes;
|
|
|
| @DomName('Navigator.onLine')
|
| @DocsEditable
|
| @@ -15497,7 +15045,7 @@ class Navigator native "Navigator" {
|
|
|
| @DomName('Navigator.plugins')
|
| @DocsEditable
|
| - final DomPluginArray plugins;
|
| + final PluginArray plugins;
|
|
|
| @DomName('Navigator.product')
|
| @DocsEditable
|
| @@ -16835,7 +16383,28 @@ class ParagraphElement extends Element native "HTMLParagraphElement" {
|
|
|
| @DomName('HTMLParagraphElement.HTMLParagraphElement')
|
| @DocsEditable
|
| - factory ParagraphElement() => document.$dom_createElement("p");
|
| + factory ParagraphElement() => document.$dom_createElement("p");
|
| +}
|
| +// 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('HTMLParamElement')
|
| +class ParamElement extends Element native "HTMLParamElement" {
|
| +
|
| + @DomName('HTMLParamElement.HTMLParamElement')
|
| + @DocsEditable
|
| + factory ParamElement() => document.$dom_createElement("param");
|
| +
|
| + @DomName('HTMLParamElement.name')
|
| + @DocsEditable
|
| + String name;
|
| +
|
| + @DomName('HTMLParamElement.value')
|
| + @DocsEditable
|
| + String value;
|
| }
|
| // 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
|
| @@ -16843,20 +16412,58 @@ class ParagraphElement extends Element native "HTMLParagraphElement" {
|
|
|
|
|
| @DocsEditable
|
| -@DomName('HTMLParamElement')
|
| -class ParamElement extends Element native "HTMLParamElement" {
|
| +@DomName('Path')
|
| +class Path native "Path" {
|
|
|
| - @DomName('HTMLParamElement.HTMLParamElement')
|
| + @DomName('DOMPath.DOMPath')
|
| @DocsEditable
|
| - factory ParamElement() => document.$dom_createElement("param");
|
| + factory Path([path_OR_text]) {
|
| + if (!?path_OR_text) {
|
| + return Path._create_1();
|
| + }
|
| + if ((path_OR_text is Path || path_OR_text == null)) {
|
| + return Path._create_2(path_OR_text);
|
| + }
|
| + if ((path_OR_text is String || path_OR_text == null)) {
|
| + return Path._create_3(path_OR_text);
|
| + }
|
| + throw new ArgumentError("Incorrect number or type of arguments");
|
| + }
|
| + static Path _create_1() => JS('Path', 'new Path()');
|
| + static Path _create_2(path_OR_text) => JS('Path', 'new Path(#)', path_OR_text);
|
| + static Path _create_3(path_OR_text) => JS('Path', 'new Path(#)', path_OR_text);
|
|
|
| - @DomName('HTMLParamElement.name')
|
| + @DomName('DOMPath.arc')
|
| @DocsEditable
|
| - String name;
|
| + void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) native;
|
|
|
| - @DomName('HTMLParamElement.value')
|
| + @DomName('DOMPath.arcTo')
|
| @DocsEditable
|
| - String value;
|
| + void arcTo(num x1, num y1, num x2, num y2, num radius) native;
|
| +
|
| + @DomName('DOMPath.bezierCurveTo')
|
| + @DocsEditable
|
| + void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) native;
|
| +
|
| + @DomName('DOMPath.closePath')
|
| + @DocsEditable
|
| + void closePath() native;
|
| +
|
| + @DomName('DOMPath.lineTo')
|
| + @DocsEditable
|
| + void lineTo(num x, num y) native;
|
| +
|
| + @DomName('DOMPath.moveTo')
|
| + @DocsEditable
|
| + void moveTo(num x, num y) native;
|
| +
|
| + @DomName('DOMPath.quadraticCurveTo')
|
| + @DocsEditable
|
| + void quadraticCurveTo(num cpx, num cpy, num x, num y) native;
|
| +
|
| + @DomName('DOMPath.rect')
|
| + @DocsEditable
|
| + void rect(num x, num y, num width, num height) 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
|
| @@ -17156,45 +16763,303 @@ class PerformanceTiming native "PerformanceTiming" {
|
| @DocsEditable
|
| final int loadEventEnd;
|
|
|
| - @DomName('PerformanceTiming.loadEventStart')
|
| - @DocsEditable
|
| - final int loadEventStart;
|
| + @DomName('PerformanceTiming.loadEventStart')
|
| + @DocsEditable
|
| + final int loadEventStart;
|
| +
|
| + @DomName('PerformanceTiming.navigationStart')
|
| + @DocsEditable
|
| + final int navigationStart;
|
| +
|
| + @DomName('PerformanceTiming.redirectEnd')
|
| + @DocsEditable
|
| + final int redirectEnd;
|
| +
|
| + @DomName('PerformanceTiming.redirectStart')
|
| + @DocsEditable
|
| + final int redirectStart;
|
| +
|
| + @DomName('PerformanceTiming.requestStart')
|
| + @DocsEditable
|
| + final int requestStart;
|
| +
|
| + @DomName('PerformanceTiming.responseEnd')
|
| + @DocsEditable
|
| + final int responseEnd;
|
| +
|
| + @DomName('PerformanceTiming.responseStart')
|
| + @DocsEditable
|
| + final int responseStart;
|
| +
|
| + @DomName('PerformanceTiming.secureConnectionStart')
|
| + @DocsEditable
|
| + final int secureConnectionStart;
|
| +
|
| + @DomName('PerformanceTiming.unloadEventEnd')
|
| + @DocsEditable
|
| + final int unloadEventEnd;
|
| +
|
| + @DomName('PerformanceTiming.unloadEventStart')
|
| + @DocsEditable
|
| + final int unloadEventStart;
|
| +}
|
| +// 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('Plugin')
|
| +class Plugin native "Plugin" {
|
| +
|
| + @DomName('DOMPlugin.description')
|
| + @DocsEditable
|
| + final String description;
|
| +
|
| + @DomName('DOMPlugin.filename')
|
| + @DocsEditable
|
| + final String filename;
|
| +
|
| + @DomName('DOMPlugin.length')
|
| + @DocsEditable
|
| + final int length;
|
| +
|
| + @DomName('DOMPlugin.name')
|
| + @DocsEditable
|
| + final String name;
|
| +
|
| + @DomName('DOMPlugin.item')
|
| + @DocsEditable
|
| + MimeType item(int index) native;
|
| +
|
| + @DomName('DOMPlugin.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('PluginArray')
|
| +class PluginArray implements JavaScriptIndexingBehavior, List<Plugin> native "PluginArray" {
|
| +
|
| + @DomName('DOMPluginArray.length')
|
| + @DocsEditable
|
| + int get length => JS("int", "#.length", this);
|
| +
|
| + Plugin operator[](int index) => JS("Plugin", "#[#]", this, index);
|
| +
|
| + void operator[]=(int index, Plugin value) {
|
| + throw new UnsupportedError("Cannot assign element of immutable List.");
|
| + }
|
| + // -- 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);
|
| + }
|
| +
|
| + 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);
|
| +
|
| + Iterable<Plugin> where(bool f(Plugin element)) =>
|
| + IterableMixinWorkaround.where(this, f);
|
| +
|
| + Iterable expand(Iterable f(Plugin element)) =>
|
| + IterableMixinWorkaround.expand(this, f);
|
| +
|
| + bool every(bool f(Plugin element)) => IterableMixinWorkaround.every(this, f);
|
| +
|
| + 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.");
|
| + }
|
|
|
| - @DomName('PerformanceTiming.navigationStart')
|
| - @DocsEditable
|
| - final int navigationStart;
|
| + void fillRange(int start, int end, [Plugin fillValue]) {
|
| + throw new UnsupportedError("Cannot modify an immutable List.");
|
| + }
|
|
|
| - @DomName('PerformanceTiming.redirectEnd')
|
| - @DocsEditable
|
| - final int redirectEnd;
|
| + Iterable<Plugin> getRange(int start, int end) =>
|
| + IterableMixinWorkaround.getRangeList(this, start, end);
|
|
|
| - @DomName('PerformanceTiming.redirectStart')
|
| - @DocsEditable
|
| - final int redirectStart;
|
| + List<Plugin> sublist(int start, [int end]) {
|
| + if (end == null) end = length;
|
| + return Lists.getRange(this, start, end, <Plugin>[]);
|
| + }
|
|
|
| - @DomName('PerformanceTiming.requestStart')
|
| - @DocsEditable
|
| - final int requestStart;
|
| + Map<int, Plugin> asMap() =>
|
| + IterableMixinWorkaround.asMapList(this);
|
|
|
| - @DomName('PerformanceTiming.responseEnd')
|
| - @DocsEditable
|
| - final int responseEnd;
|
| + String toString() {
|
| + StringBuffer buffer = new StringBuffer('[');
|
| + buffer.writeAll(this, ', ');
|
| + buffer.write(']');
|
| + return buffer.toString();
|
| + }
|
|
|
| - @DomName('PerformanceTiming.responseStart')
|
| - @DocsEditable
|
| - final int responseStart;
|
| + // -- end List<Plugin> mixins.
|
|
|
| - @DomName('PerformanceTiming.secureConnectionStart')
|
| + @DomName('DOMPluginArray.item')
|
| @DocsEditable
|
| - final int secureConnectionStart;
|
| + Plugin item(int index) native;
|
|
|
| - @DomName('PerformanceTiming.unloadEventEnd')
|
| + @DomName('DOMPluginArray.namedItem')
|
| @DocsEditable
|
| - final int unloadEventEnd;
|
| + Plugin namedItem(String name) native;
|
|
|
| - @DomName('PerformanceTiming.unloadEventStart')
|
| + @DomName('DOMPluginArray.refresh')
|
| @DocsEditable
|
| - final int unloadEventStart;
|
| + 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
|
| @@ -18364,6 +18229,77 @@ class ScriptProfileNode native "ScriptProfileNode" {
|
|
|
|
|
| @DocsEditable
|
| +@DomName('SecurityPolicy')
|
| +class SecurityPolicy native "SecurityPolicy" {
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsEval')
|
| + @DocsEditable
|
| + final bool allowsEval;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsInlineScript')
|
| + @DocsEditable
|
| + final bool allowsInlineScript;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsInlineStyle')
|
| + @DocsEditable
|
| + final bool allowsInlineStyle;
|
| +
|
| + @DomName('DOMSecurityPolicy.isActive')
|
| + @DocsEditable
|
| + final bool isActive;
|
| +
|
| + @DomName('DOMSecurityPolicy.reportURIs')
|
| + @DocsEditable
|
| + @Returns('DomStringList')
|
| + @Creates('DomStringList')
|
| + final List<String> reportURIs;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsConnectionTo')
|
| + @DocsEditable
|
| + bool allowsConnectionTo(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsFontFrom')
|
| + @DocsEditable
|
| + bool allowsFontFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsFormAction')
|
| + @DocsEditable
|
| + bool allowsFormAction(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsFrameFrom')
|
| + @DocsEditable
|
| + bool allowsFrameFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsImageFrom')
|
| + @DocsEditable
|
| + bool allowsImageFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsMediaFrom')
|
| + @DocsEditable
|
| + bool allowsMediaFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsObjectFrom')
|
| + @DocsEditable
|
| + bool allowsObjectFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsPluginType')
|
| + @DocsEditable
|
| + bool allowsPluginType(String type) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsScriptFrom')
|
| + @DocsEditable
|
| + bool allowsScriptFrom(String url) native;
|
| +
|
| + @DomName('DOMSecurityPolicy.allowsStyleFrom')
|
| + @DocsEditable
|
| + bool allowsStyleFrom(String url) 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('SecurityPolicyViolationEvent')
|
| class SecurityPolicyViolationEvent extends Event native "SecurityPolicyViolationEvent" {
|
|
|
| @@ -18515,6 +18451,119 @@ class SelectElement extends Element native "HTMLSelectElement" {
|
|
|
|
|
| @DocsEditable
|
| +@DomName('Selection')
|
| +class Selection native "Selection" {
|
| +
|
| + @DomName('DOMSelection.anchorNode')
|
| + @DocsEditable
|
| + final Node anchorNode;
|
| +
|
| + @DomName('DOMSelection.anchorOffset')
|
| + @DocsEditable
|
| + final int anchorOffset;
|
| +
|
| + @DomName('DOMSelection.baseNode')
|
| + @DocsEditable
|
| + final Node baseNode;
|
| +
|
| + @DomName('DOMSelection.baseOffset')
|
| + @DocsEditable
|
| + final int baseOffset;
|
| +
|
| + @DomName('DOMSelection.extentNode')
|
| + @DocsEditable
|
| + final Node extentNode;
|
| +
|
| + @DomName('DOMSelection.extentOffset')
|
| + @DocsEditable
|
| + final int extentOffset;
|
| +
|
| + @DomName('DOMSelection.focusNode')
|
| + @DocsEditable
|
| + final Node focusNode;
|
| +
|
| + @DomName('DOMSelection.focusOffset')
|
| + @DocsEditable
|
| + final int focusOffset;
|
| +
|
| + @DomName('DOMSelection.isCollapsed')
|
| + @DocsEditable
|
| + final bool isCollapsed;
|
| +
|
| + @DomName('DOMSelection.rangeCount')
|
| + @DocsEditable
|
| + final int rangeCount;
|
| +
|
| + @DomName('DOMSelection.type')
|
| + @DocsEditable
|
| + final String type;
|
| +
|
| + @DomName('DOMSelection.addRange')
|
| + @DocsEditable
|
| + void addRange(Range range) native;
|
| +
|
| + @DomName('DOMSelection.collapse')
|
| + @DocsEditable
|
| + void collapse(Node node, int index) native;
|
| +
|
| + @DomName('DOMSelection.collapseToEnd')
|
| + @DocsEditable
|
| + void collapseToEnd() native;
|
| +
|
| + @DomName('DOMSelection.collapseToStart')
|
| + @DocsEditable
|
| + void collapseToStart() native;
|
| +
|
| + @DomName('DOMSelection.containsNode')
|
| + @DocsEditable
|
| + bool containsNode(Node node, bool allowPartial) native;
|
| +
|
| + @DomName('DOMSelection.deleteFromDocument')
|
| + @DocsEditable
|
| + void deleteFromDocument() native;
|
| +
|
| + @DomName('DOMSelection.empty')
|
| + @DocsEditable
|
| + void empty() native;
|
| +
|
| + @DomName('DOMSelection.extend')
|
| + @DocsEditable
|
| + void extend(Node node, int offset) native;
|
| +
|
| + @DomName('DOMSelection.getRangeAt')
|
| + @DocsEditable
|
| + Range getRangeAt(int index) native;
|
| +
|
| + @DomName('DOMSelection.modify')
|
| + @DocsEditable
|
| + void modify(String alter, String direction, String granularity) native;
|
| +
|
| + @DomName('DOMSelection.removeAllRanges')
|
| + @DocsEditable
|
| + void removeAllRanges() native;
|
| +
|
| + @DomName('DOMSelection.selectAllChildren')
|
| + @DocsEditable
|
| + void selectAllChildren(Node node) native;
|
| +
|
| + @DomName('DOMSelection.setBaseAndExtent')
|
| + @DocsEditable
|
| + void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) native;
|
| +
|
| + @DomName('DOMSelection.setPosition')
|
| + @DocsEditable
|
| + void setPosition(Node node, int offset) native;
|
| +
|
| + @DomName('DOMSelection.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('HTMLShadowElement')
|
| @SupportedBrowser(SupportedBrowser.CHROME, '26')
|
| @Experimental
|
| @@ -18587,7 +18636,7 @@ class ShadowRoot extends DocumentFragment native "ShadowRoot" {
|
|
|
| @DomName('ShadowRoot.getSelection')
|
| @DocsEditable
|
| - DomSelection getSelection() native;
|
| + Selection getSelection() native;
|
|
|
| static bool get supported =>
|
| JS('bool', '!!(Element.prototype.webkitCreateShadowRoot)');
|
| @@ -21724,34 +21773,6 @@ typedef void VoidCallback();
|
|
|
|
|
| @DocsEditable
|
| -@DomName('WebKitCSSFilterRule')
|
| -class WebKitCssFilterRule extends CssRule native "WebKitCSSFilterRule" {
|
| -
|
| - @DomName('WebKitCSSFilterRule.style')
|
| - @DocsEditable
|
| - final CssStyleDeclaration style;
|
| -}
|
| -// 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('WebKitCSSRegionRule')
|
| -class WebKitCssRegionRule extends CssRule native "WebKitCSSRegionRule" {
|
| -
|
| - @DomName('WebKitCSSRegionRule.cssRules')
|
| - @DocsEditable
|
| - @Returns('_CssRuleList')
|
| - @Creates('_CssRuleList')
|
| - final List<CssRule> cssRules;
|
| -}
|
| -// 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
|
| /**
|
| * Use the WebSocket interface to connect to a WebSocket,
|
| * and to send and receive data on that WebSocket.
|
| @@ -22725,7 +22746,7 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
|
|
| @DomName('DOMWindow.getSelection')
|
| @DocsEditable
|
| - DomSelection getSelection() native;
|
| + Selection getSelection() native;
|
|
|
| @DomName('DOMWindow.matchMedia')
|
| @DocsEditable
|
| @@ -24281,6 +24302,9 @@ abstract class _DirectoryReaderSync native "DirectoryReaderSync" {
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| @Experimental
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.SAFARI)
|
| +@Experimental
|
| class _DomPoint native "WebKitPoint" {
|
|
|
| @DomName('DOMPoint.DOMPoint')
|
|
|