| OLD | NEW |
| 1 /// The Dart HTML library. | 1 /// The Dart HTML library. |
| 2 library dart.dom.html; | 2 library dart.dom.html; |
| 3 | 3 |
| 4 import 'dart:async'; | 4 import 'dart:async'; |
| 5 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 import 'dart:_collection-dev'; | 6 import 'dart:_collection-dev'; |
| 7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 8 import 'dart:indexed_db'; | 8 import 'dart:indexed_db'; |
| 9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 10 import 'dart:json' as json; | 10 import 'dart:json' as json; |
| (...skipping 6809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6820 | 6820 |
| 6821 | 6821 |
| 6822 @DocsEditable | 6822 @DocsEditable |
| 6823 @DomName('DOMStringList') | 6823 @DomName('DOMStringList') |
| 6824 class DomStringList extends Object with ListMixin<String>, ImmutableListMixin<St
ring> implements JavaScriptIndexingBehavior, List<String> native "DOMStringList"
{ | 6824 class DomStringList extends Object with ListMixin<String>, ImmutableListMixin<St
ring> implements JavaScriptIndexingBehavior, List<String> native "DOMStringList"
{ |
| 6825 | 6825 |
| 6826 @DomName('DOMStringList.length') | 6826 @DomName('DOMStringList.length') |
| 6827 @DocsEditable | 6827 @DocsEditable |
| 6828 int get length => JS("int", "#.length", this); | 6828 int get length => JS("int", "#.length", this); |
| 6829 | 6829 |
| 6830 String operator[](int index) => JS("String", "#[#]", this, index); | 6830 String operator[](int index) { |
| 6831 | 6831 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 6832 return JS("String", "#[#]", this, index); |
| 6833 } |
| 6832 void operator[]=(int index, String value) { | 6834 void operator[]=(int index, String value) { |
| 6833 throw new UnsupportedError("Cannot assign element of immutable List."); | 6835 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 6834 } | 6836 } |
| 6835 // -- start List<String> mixins. | 6837 // -- start List<String> mixins. |
| 6836 // String is the element type. | 6838 // String is the element type. |
| 6837 | 6839 |
| 6838 | 6840 |
| 6839 void set length(int value) { | 6841 void set length(int value) { |
| 6840 throw new UnsupportedError("Cannot resize immutable List."); | 6842 throw new UnsupportedError("Cannot resize immutable List."); |
| 6841 } | 6843 } |
| 6842 | 6844 |
| 6845 String get first { |
| 6846 if (this.length > 0) { |
| 6847 return JS('String', '#[0]', this); |
| 6848 } |
| 6849 throw new StateError("No elements"); |
| 6850 } |
| 6851 |
| 6852 String get last { |
| 6853 int len = this.length; |
| 6854 if (len > 0) { |
| 6855 return JS('String', '#[#]', this, len - 1); |
| 6856 } |
| 6857 throw new StateError("No elements"); |
| 6858 } |
| 6859 |
| 6860 String get single { |
| 6861 int len = this.length; |
| 6862 if (len == 1) { |
| 6863 return JS('String', '#[0]', this); |
| 6864 } |
| 6865 if (len == 0) throw new StateError("No elements"); |
| 6866 throw new StateError("More than one element"); |
| 6867 } |
| 6868 |
| 6869 String elementAt(int index) { |
| 6870 return this[index]; |
| 6871 } |
| 6872 |
| 6843 // -- end List<String> mixins. | 6873 // -- end List<String> mixins. |
| 6844 | 6874 |
| 6845 @DomName('DOMStringList.contains') | 6875 @DomName('DOMStringList.contains') |
| 6846 @DocsEditable | 6876 @DocsEditable |
| 6847 bool contains(String string) native; | 6877 bool contains(String string) native; |
| 6848 | 6878 |
| 6849 @DomName('DOMStringList.item') | 6879 @DomName('DOMStringList.item') |
| 6850 @DocsEditable | 6880 @DocsEditable |
| 6851 String item(int index) native; | 6881 String item(int index) native; |
| 6852 } | 6882 } |
| (...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9186 | 9216 |
| 9187 | 9217 |
| 9188 @DocsEditable | 9218 @DocsEditable |
| 9189 @DomName('FileList') | 9219 @DomName('FileList') |
| 9190 class FileList extends Object with ListMixin<File>, ImmutableListMixin<File> imp
lements JavaScriptIndexingBehavior, List<File> native "FileList" { | 9220 class FileList extends Object with ListMixin<File>, ImmutableListMixin<File> imp
lements JavaScriptIndexingBehavior, List<File> native "FileList" { |
| 9191 | 9221 |
| 9192 @DomName('FileList.length') | 9222 @DomName('FileList.length') |
| 9193 @DocsEditable | 9223 @DocsEditable |
| 9194 int get length => JS("int", "#.length", this); | 9224 int get length => JS("int", "#.length", this); |
| 9195 | 9225 |
| 9196 File operator[](int index) => JS("File", "#[#]", this, index); | 9226 File operator[](int index) { |
| 9197 | 9227 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 9228 return JS("File", "#[#]", this, index); |
| 9229 } |
| 9198 void operator[]=(int index, File value) { | 9230 void operator[]=(int index, File value) { |
| 9199 throw new UnsupportedError("Cannot assign element of immutable List."); | 9231 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 9200 } | 9232 } |
| 9201 // -- start List<File> mixins. | 9233 // -- start List<File> mixins. |
| 9202 // File is the element type. | 9234 // File is the element type. |
| 9203 | 9235 |
| 9204 | 9236 |
| 9205 void set length(int value) { | 9237 void set length(int value) { |
| 9206 throw new UnsupportedError("Cannot resize immutable List."); | 9238 throw new UnsupportedError("Cannot resize immutable List."); |
| 9207 } | 9239 } |
| 9208 | 9240 |
| 9241 File get first { |
| 9242 if (this.length > 0) { |
| 9243 return JS('File', '#[0]', this); |
| 9244 } |
| 9245 throw new StateError("No elements"); |
| 9246 } |
| 9247 |
| 9248 File get last { |
| 9249 int len = this.length; |
| 9250 if (len > 0) { |
| 9251 return JS('File', '#[#]', this, len - 1); |
| 9252 } |
| 9253 throw new StateError("No elements"); |
| 9254 } |
| 9255 |
| 9256 File get single { |
| 9257 int len = this.length; |
| 9258 if (len == 1) { |
| 9259 return JS('File', '#[0]', this); |
| 9260 } |
| 9261 if (len == 0) throw new StateError("No elements"); |
| 9262 throw new StateError("More than one element"); |
| 9263 } |
| 9264 |
| 9265 File elementAt(int index) { |
| 9266 return this[index]; |
| 9267 } |
| 9268 |
| 9209 // -- end List<File> mixins. | 9269 // -- end List<File> mixins. |
| 9210 | 9270 |
| 9211 @DomName('FileList.item') | 9271 @DomName('FileList.item') |
| 9212 @DocsEditable | 9272 @DocsEditable |
| 9213 File item(int index) native; | 9273 File item(int index) native; |
| 9214 } | 9274 } |
| 9215 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9275 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9216 // for details. All rights reserved. Use of this source code is governed by a | 9276 // for details. All rights reserved. Use of this source code is governed by a |
| 9217 // BSD-style license that can be found in the LICENSE file. | 9277 // BSD-style license that can be found in the LICENSE file. |
| 9218 | 9278 |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9983 | 10043 |
| 9984 | 10044 |
| 9985 @DocsEditable | 10045 @DocsEditable |
| 9986 @DomName('HTMLAllCollection') | 10046 @DomName('HTMLAllCollection') |
| 9987 class HtmlAllCollection extends Object with ListMixin<Node>, ImmutableListMixin<
Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollectio
n" { | 10047 class HtmlAllCollection extends Object with ListMixin<Node>, ImmutableListMixin<
Node> implements JavaScriptIndexingBehavior, List<Node> native "HTMLAllCollectio
n" { |
| 9988 | 10048 |
| 9989 @DomName('HTMLAllCollection.length') | 10049 @DomName('HTMLAllCollection.length') |
| 9990 @DocsEditable | 10050 @DocsEditable |
| 9991 int get length => JS("int", "#.length", this); | 10051 int get length => JS("int", "#.length", this); |
| 9992 | 10052 |
| 9993 Node operator[](int index) => JS("Node", "#[#]", this, index); | 10053 Node operator[](int index) { |
| 9994 | 10054 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 10055 return JS("Node", "#[#]", this, index); |
| 10056 } |
| 9995 void operator[]=(int index, Node value) { | 10057 void operator[]=(int index, Node value) { |
| 9996 throw new UnsupportedError("Cannot assign element of immutable List."); | 10058 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 9997 } | 10059 } |
| 9998 // -- start List<Node> mixins. | 10060 // -- start List<Node> mixins. |
| 9999 // Node is the element type. | 10061 // Node is the element type. |
| 10000 | 10062 |
| 10001 | 10063 |
| 10002 void set length(int value) { | 10064 void set length(int value) { |
| 10003 throw new UnsupportedError("Cannot resize immutable List."); | 10065 throw new UnsupportedError("Cannot resize immutable List."); |
| 10004 } | 10066 } |
| 10005 | 10067 |
| 10068 Node get first { |
| 10069 if (this.length > 0) { |
| 10070 return JS('Node', '#[0]', this); |
| 10071 } |
| 10072 throw new StateError("No elements"); |
| 10073 } |
| 10074 |
| 10075 Node get last { |
| 10076 int len = this.length; |
| 10077 if (len > 0) { |
| 10078 return JS('Node', '#[#]', this, len - 1); |
| 10079 } |
| 10080 throw new StateError("No elements"); |
| 10081 } |
| 10082 |
| 10083 Node get single { |
| 10084 int len = this.length; |
| 10085 if (len == 1) { |
| 10086 return JS('Node', '#[0]', this); |
| 10087 } |
| 10088 if (len == 0) throw new StateError("No elements"); |
| 10089 throw new StateError("More than one element"); |
| 10090 } |
| 10091 |
| 10092 Node elementAt(int index) { |
| 10093 return this[index]; |
| 10094 } |
| 10095 |
| 10006 // -- end List<Node> mixins. | 10096 // -- end List<Node> mixins. |
| 10007 | 10097 |
| 10008 @DomName('HTMLAllCollection.item') | 10098 @DomName('HTMLAllCollection.item') |
| 10009 @DocsEditable | 10099 @DocsEditable |
| 10010 Node item(int index) native; | 10100 Node item(int index) native; |
| 10011 | 10101 |
| 10012 @DomName('HTMLAllCollection.namedItem') | 10102 @DomName('HTMLAllCollection.namedItem') |
| 10013 @DocsEditable | 10103 @DocsEditable |
| 10014 Node namedItem(String name) native; | 10104 Node namedItem(String name) native; |
| 10015 | 10105 |
| 10016 @DomName('HTMLAllCollection.tags') | 10106 @DomName('HTMLAllCollection.tags') |
| 10017 @DocsEditable | 10107 @DocsEditable |
| 10018 @Returns('NodeList') | 10108 @Returns('NodeList') |
| 10019 @Creates('NodeList') | 10109 @Creates('NodeList') |
| 10020 List<Node> tags(String name) native; | 10110 List<Node> tags(String name) native; |
| 10021 } | 10111 } |
| 10022 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10112 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 10023 // for details. All rights reserved. Use of this source code is governed by a | 10113 // for details. All rights reserved. Use of this source code is governed by a |
| 10024 // BSD-style license that can be found in the LICENSE file. | 10114 // BSD-style license that can be found in the LICENSE file. |
| 10025 | 10115 |
| 10026 | 10116 |
| 10027 @DocsEditable | 10117 @DocsEditable |
| 10028 @DomName('HTMLCollection') | 10118 @DomName('HTMLCollection') |
| 10029 class HtmlCollection extends Object with ListMixin<Node>, ImmutableListMixin<Nod
e> implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" { | 10119 class HtmlCollection extends Object with ListMixin<Node>, ImmutableListMixin<Nod
e> implements JavaScriptIndexingBehavior, List<Node> native "HTMLCollection" { |
| 10030 | 10120 |
| 10031 @DomName('HTMLCollection.length') | 10121 @DomName('HTMLCollection.length') |
| 10032 @DocsEditable | 10122 @DocsEditable |
| 10033 int get length => JS("int", "#.length", this); | 10123 int get length => JS("int", "#.length", this); |
| 10034 | 10124 |
| 10035 Node operator[](int index) => JS("Node", "#[#]", this, index); | 10125 Node operator[](int index) { |
| 10036 | 10126 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 10127 return JS("Node", "#[#]", this, index); |
| 10128 } |
| 10037 void operator[]=(int index, Node value) { | 10129 void operator[]=(int index, Node value) { |
| 10038 throw new UnsupportedError("Cannot assign element of immutable List."); | 10130 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 10039 } | 10131 } |
| 10040 // -- start List<Node> mixins. | 10132 // -- start List<Node> mixins. |
| 10041 // Node is the element type. | 10133 // Node is the element type. |
| 10042 | 10134 |
| 10043 | 10135 |
| 10044 void set length(int value) { | 10136 void set length(int value) { |
| 10045 throw new UnsupportedError("Cannot resize immutable List."); | 10137 throw new UnsupportedError("Cannot resize immutable List."); |
| 10046 } | 10138 } |
| 10047 | 10139 |
| 10140 Node get first { |
| 10141 if (this.length > 0) { |
| 10142 return JS('Node', '#[0]', this); |
| 10143 } |
| 10144 throw new StateError("No elements"); |
| 10145 } |
| 10146 |
| 10147 Node get last { |
| 10148 int len = this.length; |
| 10149 if (len > 0) { |
| 10150 return JS('Node', '#[#]', this, len - 1); |
| 10151 } |
| 10152 throw new StateError("No elements"); |
| 10153 } |
| 10154 |
| 10155 Node get single { |
| 10156 int len = this.length; |
| 10157 if (len == 1) { |
| 10158 return JS('Node', '#[0]', this); |
| 10159 } |
| 10160 if (len == 0) throw new StateError("No elements"); |
| 10161 throw new StateError("More than one element"); |
| 10162 } |
| 10163 |
| 10164 Node elementAt(int index) { |
| 10165 return this[index]; |
| 10166 } |
| 10167 |
| 10048 // -- end List<Node> mixins. | 10168 // -- end List<Node> mixins. |
| 10049 | 10169 |
| 10050 @DomName('HTMLCollection.item') | 10170 @DomName('HTMLCollection.item') |
| 10051 @DocsEditable | 10171 @DocsEditable |
| 10052 Node item(int index) native; | 10172 Node item(int index) native; |
| 10053 | 10173 |
| 10054 @DomName('HTMLCollection.namedItem') | 10174 @DomName('HTMLCollection.namedItem') |
| 10055 @DocsEditable | 10175 @DocsEditable |
| 10056 Node namedItem(String name) native; | 10176 Node namedItem(String name) native; |
| 10057 } | 10177 } |
| (...skipping 3445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13503 | 13623 |
| 13504 | 13624 |
| 13505 @DocsEditable | 13625 @DocsEditable |
| 13506 @DomName('MimeTypeArray') | 13626 @DomName('MimeTypeArray') |
| 13507 class MimeTypeArray extends Object with ListMixin<MimeType>, ImmutableListMixin<
MimeType> implements JavaScriptIndexingBehavior, List<MimeType> native "MimeType
Array" { | 13627 class MimeTypeArray extends Object with ListMixin<MimeType>, ImmutableListMixin<
MimeType> implements JavaScriptIndexingBehavior, List<MimeType> native "MimeType
Array" { |
| 13508 | 13628 |
| 13509 @DomName('DOMMimeTypeArray.length') | 13629 @DomName('DOMMimeTypeArray.length') |
| 13510 @DocsEditable | 13630 @DocsEditable |
| 13511 int get length => JS("int", "#.length", this); | 13631 int get length => JS("int", "#.length", this); |
| 13512 | 13632 |
| 13513 MimeType operator[](int index) => JS("MimeType", "#[#]", this, index); | 13633 MimeType operator[](int index) { |
| 13514 | 13634 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 13635 return JS("MimeType", "#[#]", this, index); |
| 13636 } |
| 13515 void operator[]=(int index, MimeType value) { | 13637 void operator[]=(int index, MimeType value) { |
| 13516 throw new UnsupportedError("Cannot assign element of immutable List."); | 13638 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 13517 } | 13639 } |
| 13518 // -- start List<MimeType> mixins. | 13640 // -- start List<MimeType> mixins. |
| 13519 // MimeType is the element type. | 13641 // MimeType is the element type. |
| 13520 | 13642 |
| 13521 | 13643 |
| 13522 void set length(int value) { | 13644 void set length(int value) { |
| 13523 throw new UnsupportedError("Cannot resize immutable List."); | 13645 throw new UnsupportedError("Cannot resize immutable List."); |
| 13524 } | 13646 } |
| 13525 | 13647 |
| 13648 MimeType get first { |
| 13649 if (this.length > 0) { |
| 13650 return JS('MimeType', '#[0]', this); |
| 13651 } |
| 13652 throw new StateError("No elements"); |
| 13653 } |
| 13654 |
| 13655 MimeType get last { |
| 13656 int len = this.length; |
| 13657 if (len > 0) { |
| 13658 return JS('MimeType', '#[#]', this, len - 1); |
| 13659 } |
| 13660 throw new StateError("No elements"); |
| 13661 } |
| 13662 |
| 13663 MimeType get single { |
| 13664 int len = this.length; |
| 13665 if (len == 1) { |
| 13666 return JS('MimeType', '#[0]', this); |
| 13667 } |
| 13668 if (len == 0) throw new StateError("No elements"); |
| 13669 throw new StateError("More than one element"); |
| 13670 } |
| 13671 |
| 13672 MimeType elementAt(int index) { |
| 13673 return this[index]; |
| 13674 } |
| 13675 |
| 13526 // -- end List<MimeType> mixins. | 13676 // -- end List<MimeType> mixins. |
| 13527 | 13677 |
| 13528 @DomName('DOMMimeTypeArray.item') | 13678 @DomName('DOMMimeTypeArray.item') |
| 13529 @DocsEditable | 13679 @DocsEditable |
| 13530 MimeType item(int index) native; | 13680 MimeType item(int index) native; |
| 13531 | 13681 |
| 13532 @DomName('DOMMimeTypeArray.namedItem') | 13682 @DomName('DOMMimeTypeArray.namedItem') |
| 13533 @DocsEditable | 13683 @DocsEditable |
| 13534 MimeType namedItem(String name) native; | 13684 MimeType namedItem(String name) native; |
| 13535 } | 13685 } |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14755 | 14905 |
| 14756 | 14906 |
| 14757 @DocsEditable | 14907 @DocsEditable |
| 14758 @DomName('NodeList') | 14908 @DomName('NodeList') |
| 14759 class NodeList extends Object with ListMixin<Node>, ImmutableListMixin<Node> imp
lements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" { | 14909 class NodeList extends Object with ListMixin<Node>, ImmutableListMixin<Node> imp
lements JavaScriptIndexingBehavior, List<Node> native "NodeList,RadioNodeList" { |
| 14760 | 14910 |
| 14761 @DomName('NodeList.length') | 14911 @DomName('NodeList.length') |
| 14762 @DocsEditable | 14912 @DocsEditable |
| 14763 int get length => JS("int", "#.length", this); | 14913 int get length => JS("int", "#.length", this); |
| 14764 | 14914 |
| 14765 Node operator[](int index) => JS("Node", "#[#]", this, index); | 14915 Node operator[](int index) { |
| 14766 | 14916 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 14917 return JS("Node", "#[#]", this, index); |
| 14918 } |
| 14767 void operator[]=(int index, Node value) { | 14919 void operator[]=(int index, Node value) { |
| 14768 throw new UnsupportedError("Cannot assign element of immutable List."); | 14920 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 14769 } | 14921 } |
| 14770 // -- start List<Node> mixins. | 14922 // -- start List<Node> mixins. |
| 14771 // Node is the element type. | 14923 // Node is the element type. |
| 14772 | 14924 |
| 14773 | 14925 |
| 14774 void set length(int value) { | 14926 void set length(int value) { |
| 14775 throw new UnsupportedError("Cannot resize immutable List."); | 14927 throw new UnsupportedError("Cannot resize immutable List."); |
| 14776 } | 14928 } |
| 14777 | 14929 |
| 14930 Node get first { |
| 14931 if (this.length > 0) { |
| 14932 return JS('Node', '#[0]', this); |
| 14933 } |
| 14934 throw new StateError("No elements"); |
| 14935 } |
| 14936 |
| 14937 Node get last { |
| 14938 int len = this.length; |
| 14939 if (len > 0) { |
| 14940 return JS('Node', '#[#]', this, len - 1); |
| 14941 } |
| 14942 throw new StateError("No elements"); |
| 14943 } |
| 14944 |
| 14945 Node get single { |
| 14946 int len = this.length; |
| 14947 if (len == 1) { |
| 14948 return JS('Node', '#[0]', this); |
| 14949 } |
| 14950 if (len == 0) throw new StateError("No elements"); |
| 14951 throw new StateError("More than one element"); |
| 14952 } |
| 14953 |
| 14954 Node elementAt(int index) { |
| 14955 return this[index]; |
| 14956 } |
| 14957 |
| 14778 // -- end List<Node> mixins. | 14958 // -- end List<Node> mixins. |
| 14779 | 14959 |
| 14780 @JSName('item') | 14960 @JSName('item') |
| 14781 @DomName('NodeList.item') | 14961 @DomName('NodeList.item') |
| 14782 @DocsEditable | 14962 @DocsEditable |
| 14783 Node _item(int index) native; | 14963 Node _item(int index) native; |
| 14784 } | 14964 } |
| 14785 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14965 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14786 // for details. All rights reserved. Use of this source code is governed by a | 14966 // for details. All rights reserved. Use of this source code is governed by a |
| 14787 // BSD-style license that can be found in the LICENSE file. | 14967 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15736 | 15916 |
| 15737 | 15917 |
| 15738 @DocsEditable | 15918 @DocsEditable |
| 15739 @DomName('PluginArray') | 15919 @DomName('PluginArray') |
| 15740 class PluginArray extends Object with ListMixin<Plugin>, ImmutableListMixin<Plug
in> implements JavaScriptIndexingBehavior, List<Plugin> native "PluginArray" { | 15920 class PluginArray extends Object with ListMixin<Plugin>, ImmutableListMixin<Plug
in> implements JavaScriptIndexingBehavior, List<Plugin> native "PluginArray" { |
| 15741 | 15921 |
| 15742 @DomName('DOMPluginArray.length') | 15922 @DomName('DOMPluginArray.length') |
| 15743 @DocsEditable | 15923 @DocsEditable |
| 15744 int get length => JS("int", "#.length", this); | 15924 int get length => JS("int", "#.length", this); |
| 15745 | 15925 |
| 15746 Plugin operator[](int index) => JS("Plugin", "#[#]", this, index); | 15926 Plugin operator[](int index) { |
| 15747 | 15927 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 15928 return JS("Plugin", "#[#]", this, index); |
| 15929 } |
| 15748 void operator[]=(int index, Plugin value) { | 15930 void operator[]=(int index, Plugin value) { |
| 15749 throw new UnsupportedError("Cannot assign element of immutable List."); | 15931 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 15750 } | 15932 } |
| 15751 // -- start List<Plugin> mixins. | 15933 // -- start List<Plugin> mixins. |
| 15752 // Plugin is the element type. | 15934 // Plugin is the element type. |
| 15753 | 15935 |
| 15754 | 15936 |
| 15755 void set length(int value) { | 15937 void set length(int value) { |
| 15756 throw new UnsupportedError("Cannot resize immutable List."); | 15938 throw new UnsupportedError("Cannot resize immutable List."); |
| 15757 } | 15939 } |
| 15758 | 15940 |
| 15941 Plugin get first { |
| 15942 if (this.length > 0) { |
| 15943 return JS('Plugin', '#[0]', this); |
| 15944 } |
| 15945 throw new StateError("No elements"); |
| 15946 } |
| 15947 |
| 15948 Plugin get last { |
| 15949 int len = this.length; |
| 15950 if (len > 0) { |
| 15951 return JS('Plugin', '#[#]', this, len - 1); |
| 15952 } |
| 15953 throw new StateError("No elements"); |
| 15954 } |
| 15955 |
| 15956 Plugin get single { |
| 15957 int len = this.length; |
| 15958 if (len == 1) { |
| 15959 return JS('Plugin', '#[0]', this); |
| 15960 } |
| 15961 if (len == 0) throw new StateError("No elements"); |
| 15962 throw new StateError("More than one element"); |
| 15963 } |
| 15964 |
| 15965 Plugin elementAt(int index) { |
| 15966 return this[index]; |
| 15967 } |
| 15968 |
| 15759 // -- end List<Plugin> mixins. | 15969 // -- end List<Plugin> mixins. |
| 15760 | 15970 |
| 15761 @DomName('DOMPluginArray.item') | 15971 @DomName('DOMPluginArray.item') |
| 15762 @DocsEditable | 15972 @DocsEditable |
| 15763 Plugin item(int index) native; | 15973 Plugin item(int index) native; |
| 15764 | 15974 |
| 15765 @DomName('DOMPluginArray.namedItem') | 15975 @DomName('DOMPluginArray.namedItem') |
| 15766 @DocsEditable | 15976 @DocsEditable |
| 15767 Plugin namedItem(String name) native; | 15977 Plugin namedItem(String name) native; |
| 15768 | 15978 |
| (...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17391 | 17601 |
| 17392 | 17602 |
| 17393 @DocsEditable | 17603 @DocsEditable |
| 17394 @DomName('SourceBufferList') | 17604 @DomName('SourceBufferList') |
| 17395 class SourceBufferList extends EventTarget with ListMixin<SourceBuffer>, Immutab
leListMixin<SourceBuffer> implements JavaScriptIndexingBehavior, List<SourceBuff
er> native "SourceBufferList" { | 17605 class SourceBufferList extends EventTarget with ListMixin<SourceBuffer>, Immutab
leListMixin<SourceBuffer> implements JavaScriptIndexingBehavior, List<SourceBuff
er> native "SourceBufferList" { |
| 17396 | 17606 |
| 17397 @DomName('SourceBufferList.length') | 17607 @DomName('SourceBufferList.length') |
| 17398 @DocsEditable | 17608 @DocsEditable |
| 17399 int get length => JS("int", "#.length", this); | 17609 int get length => JS("int", "#.length", this); |
| 17400 | 17610 |
| 17401 SourceBuffer operator[](int index) => JS("SourceBuffer", "#[#]", this, index); | 17611 SourceBuffer operator[](int index) { |
| 17402 | 17612 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 17613 return JS("SourceBuffer", "#[#]", this, index); |
| 17614 } |
| 17403 void operator[]=(int index, SourceBuffer value) { | 17615 void operator[]=(int index, SourceBuffer value) { |
| 17404 throw new UnsupportedError("Cannot assign element of immutable List."); | 17616 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 17405 } | 17617 } |
| 17406 // -- start List<SourceBuffer> mixins. | 17618 // -- start List<SourceBuffer> mixins. |
| 17407 // SourceBuffer is the element type. | 17619 // SourceBuffer is the element type. |
| 17408 | 17620 |
| 17409 | 17621 |
| 17410 void set length(int value) { | 17622 void set length(int value) { |
| 17411 throw new UnsupportedError("Cannot resize immutable List."); | 17623 throw new UnsupportedError("Cannot resize immutable List."); |
| 17412 } | 17624 } |
| 17413 | 17625 |
| 17626 SourceBuffer get first { |
| 17627 if (this.length > 0) { |
| 17628 return JS('SourceBuffer', '#[0]', this); |
| 17629 } |
| 17630 throw new StateError("No elements"); |
| 17631 } |
| 17632 |
| 17633 SourceBuffer get last { |
| 17634 int len = this.length; |
| 17635 if (len > 0) { |
| 17636 return JS('SourceBuffer', '#[#]', this, len - 1); |
| 17637 } |
| 17638 throw new StateError("No elements"); |
| 17639 } |
| 17640 |
| 17641 SourceBuffer get single { |
| 17642 int len = this.length; |
| 17643 if (len == 1) { |
| 17644 return JS('SourceBuffer', '#[0]', this); |
| 17645 } |
| 17646 if (len == 0) throw new StateError("No elements"); |
| 17647 throw new StateError("More than one element"); |
| 17648 } |
| 17649 |
| 17650 SourceBuffer elementAt(int index) { |
| 17651 return this[index]; |
| 17652 } |
| 17653 |
| 17414 // -- end List<SourceBuffer> mixins. | 17654 // -- end List<SourceBuffer> mixins. |
| 17415 | 17655 |
| 17416 @JSName('addEventListener') | 17656 @JSName('addEventListener') |
| 17417 @DomName('SourceBufferList.addEventListener') | 17657 @DomName('SourceBufferList.addEventListener') |
| 17418 @DocsEditable | 17658 @DocsEditable |
| 17419 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 17659 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 17420 | 17660 |
| 17421 @DomName('SourceBufferList.dispatchEvent') | 17661 @DomName('SourceBufferList.dispatchEvent') |
| 17422 @DocsEditable | 17662 @DocsEditable |
| 17423 bool dispatchEvent(Event event) native; | 17663 bool dispatchEvent(Event event) native; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17506 @DocsEditable | 17746 @DocsEditable |
| 17507 factory SpeechGrammarList() { | 17747 factory SpeechGrammarList() { |
| 17508 return SpeechGrammarList._create_1(); | 17748 return SpeechGrammarList._create_1(); |
| 17509 } | 17749 } |
| 17510 static SpeechGrammarList _create_1() => JS('SpeechGrammarList', 'new SpeechGra
mmarList()'); | 17750 static SpeechGrammarList _create_1() => JS('SpeechGrammarList', 'new SpeechGra
mmarList()'); |
| 17511 | 17751 |
| 17512 @DomName('SpeechGrammarList.length') | 17752 @DomName('SpeechGrammarList.length') |
| 17513 @DocsEditable | 17753 @DocsEditable |
| 17514 int get length => JS("int", "#.length", this); | 17754 int get length => JS("int", "#.length", this); |
| 17515 | 17755 |
| 17516 SpeechGrammar operator[](int index) => JS("SpeechGrammar", "#[#]", this, index
); | 17756 SpeechGrammar operator[](int index) { |
| 17517 | 17757 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 17758 return JS("SpeechGrammar", "#[#]", this, index); |
| 17759 } |
| 17518 void operator[]=(int index, SpeechGrammar value) { | 17760 void operator[]=(int index, SpeechGrammar value) { |
| 17519 throw new UnsupportedError("Cannot assign element of immutable List."); | 17761 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 17520 } | 17762 } |
| 17521 // -- start List<SpeechGrammar> mixins. | 17763 // -- start List<SpeechGrammar> mixins. |
| 17522 // SpeechGrammar is the element type. | 17764 // SpeechGrammar is the element type. |
| 17523 | 17765 |
| 17524 | 17766 |
| 17525 void set length(int value) { | 17767 void set length(int value) { |
| 17526 throw new UnsupportedError("Cannot resize immutable List."); | 17768 throw new UnsupportedError("Cannot resize immutable List."); |
| 17527 } | 17769 } |
| 17528 | 17770 |
| 17771 SpeechGrammar get first { |
| 17772 if (this.length > 0) { |
| 17773 return JS('SpeechGrammar', '#[0]', this); |
| 17774 } |
| 17775 throw new StateError("No elements"); |
| 17776 } |
| 17777 |
| 17778 SpeechGrammar get last { |
| 17779 int len = this.length; |
| 17780 if (len > 0) { |
| 17781 return JS('SpeechGrammar', '#[#]', this, len - 1); |
| 17782 } |
| 17783 throw new StateError("No elements"); |
| 17784 } |
| 17785 |
| 17786 SpeechGrammar get single { |
| 17787 int len = this.length; |
| 17788 if (len == 1) { |
| 17789 return JS('SpeechGrammar', '#[0]', this); |
| 17790 } |
| 17791 if (len == 0) throw new StateError("No elements"); |
| 17792 throw new StateError("More than one element"); |
| 17793 } |
| 17794 |
| 17795 SpeechGrammar elementAt(int index) { |
| 17796 return this[index]; |
| 17797 } |
| 17798 |
| 17529 // -- end List<SpeechGrammar> mixins. | 17799 // -- end List<SpeechGrammar> mixins. |
| 17530 | 17800 |
| 17531 @DomName('SpeechGrammarList.addFromString') | 17801 @DomName('SpeechGrammarList.addFromString') |
| 17532 @DocsEditable | 17802 @DocsEditable |
| 17533 void addFromString(String string, [num weight]) native; | 17803 void addFromString(String string, [num weight]) native; |
| 17534 | 17804 |
| 17535 @DomName('SpeechGrammarList.addFromUri') | 17805 @DomName('SpeechGrammarList.addFromUri') |
| 17536 @DocsEditable | 17806 @DocsEditable |
| 17537 void addFromUri(String src, [num weight]) native; | 17807 void addFromUri(String src, [num weight]) native; |
| 17538 | 17808 |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18797 | 19067 |
| 18798 | 19068 |
| 18799 @DocsEditable | 19069 @DocsEditable |
| 18800 @DomName('TextTrackCueList') | 19070 @DomName('TextTrackCueList') |
| 18801 class TextTrackCueList extends Object with ListMixin<TextTrackCue>, ImmutableLis
tMixin<TextTrackCue> implements List<TextTrackCue>, JavaScriptIndexingBehavior n
ative "TextTrackCueList" { | 19071 class TextTrackCueList extends Object with ListMixin<TextTrackCue>, ImmutableLis
tMixin<TextTrackCue> implements List<TextTrackCue>, JavaScriptIndexingBehavior n
ative "TextTrackCueList" { |
| 18802 | 19072 |
| 18803 @DomName('TextTrackCueList.length') | 19073 @DomName('TextTrackCueList.length') |
| 18804 @DocsEditable | 19074 @DocsEditable |
| 18805 int get length => JS("int", "#.length", this); | 19075 int get length => JS("int", "#.length", this); |
| 18806 | 19076 |
| 18807 TextTrackCue operator[](int index) => JS("TextTrackCue", "#[#]", this, index); | 19077 TextTrackCue operator[](int index) { |
| 18808 | 19078 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 19079 return JS("TextTrackCue", "#[#]", this, index); |
| 19080 } |
| 18809 void operator[]=(int index, TextTrackCue value) { | 19081 void operator[]=(int index, TextTrackCue value) { |
| 18810 throw new UnsupportedError("Cannot assign element of immutable List."); | 19082 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 18811 } | 19083 } |
| 18812 // -- start List<TextTrackCue> mixins. | 19084 // -- start List<TextTrackCue> mixins. |
| 18813 // TextTrackCue is the element type. | 19085 // TextTrackCue is the element type. |
| 18814 | 19086 |
| 18815 | 19087 |
| 18816 void set length(int value) { | 19088 void set length(int value) { |
| 18817 throw new UnsupportedError("Cannot resize immutable List."); | 19089 throw new UnsupportedError("Cannot resize immutable List."); |
| 18818 } | 19090 } |
| 18819 | 19091 |
| 19092 TextTrackCue get first { |
| 19093 if (this.length > 0) { |
| 19094 return JS('TextTrackCue', '#[0]', this); |
| 19095 } |
| 19096 throw new StateError("No elements"); |
| 19097 } |
| 19098 |
| 19099 TextTrackCue get last { |
| 19100 int len = this.length; |
| 19101 if (len > 0) { |
| 19102 return JS('TextTrackCue', '#[#]', this, len - 1); |
| 19103 } |
| 19104 throw new StateError("No elements"); |
| 19105 } |
| 19106 |
| 19107 TextTrackCue get single { |
| 19108 int len = this.length; |
| 19109 if (len == 1) { |
| 19110 return JS('TextTrackCue', '#[0]', this); |
| 19111 } |
| 19112 if (len == 0) throw new StateError("No elements"); |
| 19113 throw new StateError("More than one element"); |
| 19114 } |
| 19115 |
| 19116 TextTrackCue elementAt(int index) { |
| 19117 return this[index]; |
| 19118 } |
| 19119 |
| 18820 // -- end List<TextTrackCue> mixins. | 19120 // -- end List<TextTrackCue> mixins. |
| 18821 | 19121 |
| 18822 @DomName('TextTrackCueList.getCueById') | 19122 @DomName('TextTrackCueList.getCueById') |
| 18823 @DocsEditable | 19123 @DocsEditable |
| 18824 TextTrackCue getCueById(String id) native; | 19124 TextTrackCue getCueById(String id) native; |
| 18825 | 19125 |
| 18826 @DomName('TextTrackCueList.item') | 19126 @DomName('TextTrackCueList.item') |
| 18827 @DocsEditable | 19127 @DocsEditable |
| 18828 TextTrackCue item(int index) native; | 19128 TextTrackCue item(int index) native; |
| 18829 } | 19129 } |
| 18830 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 19130 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18831 // for details. All rights reserved. Use of this source code is governed by a | 19131 // for details. All rights reserved. Use of this source code is governed by a |
| 18832 // BSD-style license that can be found in the LICENSE file. | 19132 // BSD-style license that can be found in the LICENSE file. |
| 18833 | 19133 |
| 18834 | 19134 |
| 18835 @DocsEditable | 19135 @DocsEditable |
| 18836 @DomName('TextTrackList') | 19136 @DomName('TextTrackList') |
| 18837 class TextTrackList extends EventTarget with ListMixin<TextTrack>, ImmutableList
Mixin<TextTrack> implements JavaScriptIndexingBehavior, List<TextTrack> native "
TextTrackList" { | 19137 class TextTrackList extends EventTarget with ListMixin<TextTrack>, ImmutableList
Mixin<TextTrack> implements JavaScriptIndexingBehavior, List<TextTrack> native "
TextTrackList" { |
| 18838 | 19138 |
| 18839 @DomName('TextTrackList.addtrackEvent') | 19139 @DomName('TextTrackList.addtrackEvent') |
| 18840 @DocsEditable | 19140 @DocsEditable |
| 18841 static const EventStreamProvider<TrackEvent> addTrackEvent = const EventStream
Provider<TrackEvent>('addtrack'); | 19141 static const EventStreamProvider<TrackEvent> addTrackEvent = const EventStream
Provider<TrackEvent>('addtrack'); |
| 18842 | 19142 |
| 18843 @DomName('TextTrackList.length') | 19143 @DomName('TextTrackList.length') |
| 18844 @DocsEditable | 19144 @DocsEditable |
| 18845 int get length => JS("int", "#.length", this); | 19145 int get length => JS("int", "#.length", this); |
| 18846 | 19146 |
| 18847 TextTrack operator[](int index) => JS("TextTrack", "#[#]", this, index); | 19147 TextTrack operator[](int index) { |
| 18848 | 19148 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 19149 return JS("TextTrack", "#[#]", this, index); |
| 19150 } |
| 18849 void operator[]=(int index, TextTrack value) { | 19151 void operator[]=(int index, TextTrack value) { |
| 18850 throw new UnsupportedError("Cannot assign element of immutable List."); | 19152 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 18851 } | 19153 } |
| 18852 // -- start List<TextTrack> mixins. | 19154 // -- start List<TextTrack> mixins. |
| 18853 // TextTrack is the element type. | 19155 // TextTrack is the element type. |
| 18854 | 19156 |
| 18855 | 19157 |
| 18856 void set length(int value) { | 19158 void set length(int value) { |
| 18857 throw new UnsupportedError("Cannot resize immutable List."); | 19159 throw new UnsupportedError("Cannot resize immutable List."); |
| 18858 } | 19160 } |
| 18859 | 19161 |
| 19162 TextTrack get first { |
| 19163 if (this.length > 0) { |
| 19164 return JS('TextTrack', '#[0]', this); |
| 19165 } |
| 19166 throw new StateError("No elements"); |
| 19167 } |
| 19168 |
| 19169 TextTrack get last { |
| 19170 int len = this.length; |
| 19171 if (len > 0) { |
| 19172 return JS('TextTrack', '#[#]', this, len - 1); |
| 19173 } |
| 19174 throw new StateError("No elements"); |
| 19175 } |
| 19176 |
| 19177 TextTrack get single { |
| 19178 int len = this.length; |
| 19179 if (len == 1) { |
| 19180 return JS('TextTrack', '#[0]', this); |
| 19181 } |
| 19182 if (len == 0) throw new StateError("No elements"); |
| 19183 throw new StateError("More than one element"); |
| 19184 } |
| 19185 |
| 19186 TextTrack elementAt(int index) { |
| 19187 return this[index]; |
| 19188 } |
| 19189 |
| 18860 // -- end List<TextTrack> mixins. | 19190 // -- end List<TextTrack> mixins. |
| 18861 | 19191 |
| 18862 @JSName('addEventListener') | 19192 @JSName('addEventListener') |
| 18863 @DomName('TextTrackList.addEventListener') | 19193 @DomName('TextTrackList.addEventListener') |
| 18864 @DocsEditable | 19194 @DocsEditable |
| 18865 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 19195 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 18866 | 19196 |
| 18867 @DomName('TextTrackList.dispatchEvent') | 19197 @DomName('TextTrackList.dispatchEvent') |
| 18868 @DocsEditable | 19198 @DocsEditable |
| 18869 bool dispatchEvent(Event evt) native; | 19199 bool dispatchEvent(Event evt) native; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19103 /// with touch enabled. See dartbug.com/8314. | 19433 /// with touch enabled. See dartbug.com/8314. |
| 19104 factory TouchList() => document.$dom_createTouchList(); | 19434 factory TouchList() => document.$dom_createTouchList(); |
| 19105 | 19435 |
| 19106 /// Checks if this type is supported on the current platform. | 19436 /// Checks if this type is supported on the current platform. |
| 19107 static bool get supported => JS('bool', '!!document.createTouchList'); | 19437 static bool get supported => JS('bool', '!!document.createTouchList'); |
| 19108 | 19438 |
| 19109 @DomName('TouchList.length') | 19439 @DomName('TouchList.length') |
| 19110 @DocsEditable | 19440 @DocsEditable |
| 19111 int get length => JS("int", "#.length", this); | 19441 int get length => JS("int", "#.length", this); |
| 19112 | 19442 |
| 19113 Touch operator[](int index) => JS("Touch", "#[#]", this, index); | 19443 Touch operator[](int index) { |
| 19114 | 19444 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 19445 return JS("Touch", "#[#]", this, index); |
| 19446 } |
| 19115 void operator[]=(int index, Touch value) { | 19447 void operator[]=(int index, Touch value) { |
| 19116 throw new UnsupportedError("Cannot assign element of immutable List."); | 19448 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 19117 } | 19449 } |
| 19118 // -- start List<Touch> mixins. | 19450 // -- start List<Touch> mixins. |
| 19119 // Touch is the element type. | 19451 // Touch is the element type. |
| 19120 | 19452 |
| 19121 | 19453 |
| 19122 void set length(int value) { | 19454 void set length(int value) { |
| 19123 throw new UnsupportedError("Cannot resize immutable List."); | 19455 throw new UnsupportedError("Cannot resize immutable List."); |
| 19124 } | 19456 } |
| 19125 | 19457 |
| 19458 Touch get first { |
| 19459 if (this.length > 0) { |
| 19460 return JS('Touch', '#[0]', this); |
| 19461 } |
| 19462 throw new StateError("No elements"); |
| 19463 } |
| 19464 |
| 19465 Touch get last { |
| 19466 int len = this.length; |
| 19467 if (len > 0) { |
| 19468 return JS('Touch', '#[#]', this, len - 1); |
| 19469 } |
| 19470 throw new StateError("No elements"); |
| 19471 } |
| 19472 |
| 19473 Touch get single { |
| 19474 int len = this.length; |
| 19475 if (len == 1) { |
| 19476 return JS('Touch', '#[0]', this); |
| 19477 } |
| 19478 if (len == 0) throw new StateError("No elements"); |
| 19479 throw new StateError("More than one element"); |
| 19480 } |
| 19481 |
| 19482 Touch elementAt(int index) { |
| 19483 return this[index]; |
| 19484 } |
| 19485 |
| 19126 // -- end List<Touch> mixins. | 19486 // -- end List<Touch> mixins. |
| 19127 | 19487 |
| 19128 @DomName('TouchList.item') | 19488 @DomName('TouchList.item') |
| 19129 @DocsEditable | 19489 @DocsEditable |
| 19130 Touch item(int index) native; | 19490 Touch item(int index) native; |
| 19131 | 19491 |
| 19132 } | 19492 } |
| 19133 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 19493 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 19134 // for details. All rights reserved. Use of this source code is governed by a | 19494 // for details. All rights reserved. Use of this source code is governed by a |
| 19135 // BSD-style license that can be found in the LICENSE file. | 19495 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21391 | 21751 |
| 21392 | 21752 |
| 21393 @DocsEditable | 21753 @DocsEditable |
| 21394 @DomName('ClientRectList') | 21754 @DomName('ClientRectList') |
| 21395 class _ClientRectList extends Object with ListMixin<Rect>, ImmutableListMixin<Re
ct> implements JavaScriptIndexingBehavior, List<Rect> native "ClientRectList" { | 21755 class _ClientRectList extends Object with ListMixin<Rect>, ImmutableListMixin<Re
ct> implements JavaScriptIndexingBehavior, List<Rect> native "ClientRectList" { |
| 21396 | 21756 |
| 21397 @DomName('ClientRectList.length') | 21757 @DomName('ClientRectList.length') |
| 21398 @DocsEditable | 21758 @DocsEditable |
| 21399 int get length => JS("int", "#.length", this); | 21759 int get length => JS("int", "#.length", this); |
| 21400 | 21760 |
| 21401 Rect operator[](int index) => JS("Rect", "#[#]", this, index); | 21761 Rect operator[](int index) { |
| 21402 | 21762 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 21763 return JS("Rect", "#[#]", this, index); |
| 21764 } |
| 21403 void operator[]=(int index, Rect value) { | 21765 void operator[]=(int index, Rect value) { |
| 21404 throw new UnsupportedError("Cannot assign element of immutable List."); | 21766 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21405 } | 21767 } |
| 21406 // -- start List<Rect> mixins. | 21768 // -- start List<Rect> mixins. |
| 21407 // Rect is the element type. | 21769 // Rect is the element type. |
| 21408 | 21770 |
| 21409 | 21771 |
| 21410 void set length(int value) { | 21772 void set length(int value) { |
| 21411 throw new UnsupportedError("Cannot resize immutable List."); | 21773 throw new UnsupportedError("Cannot resize immutable List."); |
| 21412 } | 21774 } |
| 21413 | 21775 |
| 21776 Rect get first { |
| 21777 if (this.length > 0) { |
| 21778 return JS('Rect', '#[0]', this); |
| 21779 } |
| 21780 throw new StateError("No elements"); |
| 21781 } |
| 21782 |
| 21783 Rect get last { |
| 21784 int len = this.length; |
| 21785 if (len > 0) { |
| 21786 return JS('Rect', '#[#]', this, len - 1); |
| 21787 } |
| 21788 throw new StateError("No elements"); |
| 21789 } |
| 21790 |
| 21791 Rect get single { |
| 21792 int len = this.length; |
| 21793 if (len == 1) { |
| 21794 return JS('Rect', '#[0]', this); |
| 21795 } |
| 21796 if (len == 0) throw new StateError("No elements"); |
| 21797 throw new StateError("More than one element"); |
| 21798 } |
| 21799 |
| 21800 Rect elementAt(int index) { |
| 21801 return this[index]; |
| 21802 } |
| 21803 |
| 21414 // -- end List<Rect> mixins. | 21804 // -- end List<Rect> mixins. |
| 21415 | 21805 |
| 21416 @DomName('ClientRectList.item') | 21806 @DomName('ClientRectList.item') |
| 21417 @DocsEditable | 21807 @DocsEditable |
| 21418 Rect item(int index) native; | 21808 Rect item(int index) native; |
| 21419 } | 21809 } |
| 21420 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21810 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21421 // for details. All rights reserved. Use of this source code is governed by a | 21811 // for details. All rights reserved. Use of this source code is governed by a |
| 21422 // BSD-style license that can be found in the LICENSE file. | 21812 // BSD-style license that can be found in the LICENSE file. |
| 21423 | 21813 |
| 21424 | 21814 |
| 21425 @DocsEditable | 21815 @DocsEditable |
| 21426 @DomName('Counter') | 21816 @DomName('Counter') |
| 21427 abstract class _Counter native "Counter" { | 21817 abstract class _Counter native "Counter" { |
| 21428 } | 21818 } |
| 21429 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21819 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21430 // for details. All rights reserved. Use of this source code is governed by a | 21820 // for details. All rights reserved. Use of this source code is governed by a |
| 21431 // BSD-style license that can be found in the LICENSE file. | 21821 // BSD-style license that can be found in the LICENSE file. |
| 21432 | 21822 |
| 21433 | 21823 |
| 21434 @DocsEditable | 21824 @DocsEditable |
| 21435 @DomName('CSSRuleList') | 21825 @DomName('CSSRuleList') |
| 21436 class _CssRuleList extends Object with ListMixin<CssRule>, ImmutableListMixin<Cs
sRule> implements JavaScriptIndexingBehavior, List<CssRule> native "CSSRuleList"
{ | 21826 class _CssRuleList extends Object with ListMixin<CssRule>, ImmutableListMixin<Cs
sRule> implements JavaScriptIndexingBehavior, List<CssRule> native "CSSRuleList"
{ |
| 21437 | 21827 |
| 21438 @DomName('CSSRuleList.length') | 21828 @DomName('CSSRuleList.length') |
| 21439 @DocsEditable | 21829 @DocsEditable |
| 21440 int get length => JS("int", "#.length", this); | 21830 int get length => JS("int", "#.length", this); |
| 21441 | 21831 |
| 21442 CssRule operator[](int index) => JS("CssRule", "#[#]", this, index); | 21832 CssRule operator[](int index) { |
| 21443 | 21833 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 21834 return JS("CssRule", "#[#]", this, index); |
| 21835 } |
| 21444 void operator[]=(int index, CssRule value) { | 21836 void operator[]=(int index, CssRule value) { |
| 21445 throw new UnsupportedError("Cannot assign element of immutable List."); | 21837 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21446 } | 21838 } |
| 21447 // -- start List<CssRule> mixins. | 21839 // -- start List<CssRule> mixins. |
| 21448 // CssRule is the element type. | 21840 // CssRule is the element type. |
| 21449 | 21841 |
| 21450 | 21842 |
| 21451 void set length(int value) { | 21843 void set length(int value) { |
| 21452 throw new UnsupportedError("Cannot resize immutable List."); | 21844 throw new UnsupportedError("Cannot resize immutable List."); |
| 21453 } | 21845 } |
| 21454 | 21846 |
| 21847 CssRule get first { |
| 21848 if (this.length > 0) { |
| 21849 return JS('CssRule', '#[0]', this); |
| 21850 } |
| 21851 throw new StateError("No elements"); |
| 21852 } |
| 21853 |
| 21854 CssRule get last { |
| 21855 int len = this.length; |
| 21856 if (len > 0) { |
| 21857 return JS('CssRule', '#[#]', this, len - 1); |
| 21858 } |
| 21859 throw new StateError("No elements"); |
| 21860 } |
| 21861 |
| 21862 CssRule get single { |
| 21863 int len = this.length; |
| 21864 if (len == 1) { |
| 21865 return JS('CssRule', '#[0]', this); |
| 21866 } |
| 21867 if (len == 0) throw new StateError("No elements"); |
| 21868 throw new StateError("More than one element"); |
| 21869 } |
| 21870 |
| 21871 CssRule elementAt(int index) { |
| 21872 return this[index]; |
| 21873 } |
| 21874 |
| 21455 // -- end List<CssRule> mixins. | 21875 // -- end List<CssRule> mixins. |
| 21456 | 21876 |
| 21457 @DomName('CSSRuleList.item') | 21877 @DomName('CSSRuleList.item') |
| 21458 @DocsEditable | 21878 @DocsEditable |
| 21459 CssRule item(int index) native; | 21879 CssRule item(int index) native; |
| 21460 } | 21880 } |
| 21461 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21881 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21462 // for details. All rights reserved. Use of this source code is governed by a | 21882 // for details. All rights reserved. Use of this source code is governed by a |
| 21463 // BSD-style license that can be found in the LICENSE file. | 21883 // BSD-style license that can be found in the LICENSE file. |
| 21464 | 21884 |
| 21465 | 21885 |
| 21466 @DocsEditable | 21886 @DocsEditable |
| 21467 @DomName('CSSValueList') | 21887 @DomName('CSSValueList') |
| 21468 class _CssValueList extends _CSSValue with ListMixin<_CSSValue>, ImmutableListMi
xin<_CSSValue> implements JavaScriptIndexingBehavior, List<_CSSValue> native "CS
SValueList" { | 21888 class _CssValueList extends _CSSValue with ListMixin<_CSSValue>, ImmutableListMi
xin<_CSSValue> implements JavaScriptIndexingBehavior, List<_CSSValue> native "CS
SValueList" { |
| 21469 | 21889 |
| 21470 @DomName('CSSValueList.length') | 21890 @DomName('CSSValueList.length') |
| 21471 @DocsEditable | 21891 @DocsEditable |
| 21472 int get length => JS("int", "#.length", this); | 21892 int get length => JS("int", "#.length", this); |
| 21473 | 21893 |
| 21474 _CSSValue operator[](int index) => JS("_CSSValue", "#[#]", this, index); | 21894 _CSSValue operator[](int index) { |
| 21475 | 21895 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 21896 return JS("_CSSValue", "#[#]", this, index); |
| 21897 } |
| 21476 void operator[]=(int index, _CSSValue value) { | 21898 void operator[]=(int index, _CSSValue value) { |
| 21477 throw new UnsupportedError("Cannot assign element of immutable List."); | 21899 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21478 } | 21900 } |
| 21479 // -- start List<_CSSValue> mixins. | 21901 // -- start List<_CSSValue> mixins. |
| 21480 // _CSSValue is the element type. | 21902 // _CSSValue is the element type. |
| 21481 | 21903 |
| 21482 | 21904 |
| 21483 void set length(int value) { | 21905 void set length(int value) { |
| 21484 throw new UnsupportedError("Cannot resize immutable List."); | 21906 throw new UnsupportedError("Cannot resize immutable List."); |
| 21485 } | 21907 } |
| 21486 | 21908 |
| 21909 _CSSValue get first { |
| 21910 if (this.length > 0) { |
| 21911 return JS('_CSSValue', '#[0]', this); |
| 21912 } |
| 21913 throw new StateError("No elements"); |
| 21914 } |
| 21915 |
| 21916 _CSSValue get last { |
| 21917 int len = this.length; |
| 21918 if (len > 0) { |
| 21919 return JS('_CSSValue', '#[#]', this, len - 1); |
| 21920 } |
| 21921 throw new StateError("No elements"); |
| 21922 } |
| 21923 |
| 21924 _CSSValue get single { |
| 21925 int len = this.length; |
| 21926 if (len == 1) { |
| 21927 return JS('_CSSValue', '#[0]', this); |
| 21928 } |
| 21929 if (len == 0) throw new StateError("No elements"); |
| 21930 throw new StateError("More than one element"); |
| 21931 } |
| 21932 |
| 21933 _CSSValue elementAt(int index) { |
| 21934 return this[index]; |
| 21935 } |
| 21936 |
| 21487 // -- end List<_CSSValue> mixins. | 21937 // -- end List<_CSSValue> mixins. |
| 21488 | 21938 |
| 21489 @DomName('CSSValueList.item') | 21939 @DomName('CSSValueList.item') |
| 21490 @DocsEditable | 21940 @DocsEditable |
| 21491 _CSSValue item(int index) native; | 21941 _CSSValue item(int index) native; |
| 21492 } | 21942 } |
| 21493 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21943 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21494 // for details. All rights reserved. Use of this source code is governed by a | 21944 // for details. All rights reserved. Use of this source code is governed by a |
| 21495 // BSD-style license that can be found in the LICENSE file. | 21945 // BSD-style license that can be found in the LICENSE file. |
| 21496 | 21946 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21588 | 22038 |
| 21589 | 22039 |
| 21590 @DocsEditable | 22040 @DocsEditable |
| 21591 @DomName('EntryArray') | 22041 @DomName('EntryArray') |
| 21592 class _EntryArray extends Object with ListMixin<Entry>, ImmutableListMixin<Entry
> implements JavaScriptIndexingBehavior, List<Entry> native "EntryArray" { | 22042 class _EntryArray extends Object with ListMixin<Entry>, ImmutableListMixin<Entry
> implements JavaScriptIndexingBehavior, List<Entry> native "EntryArray" { |
| 21593 | 22043 |
| 21594 @DomName('EntryArray.length') | 22044 @DomName('EntryArray.length') |
| 21595 @DocsEditable | 22045 @DocsEditable |
| 21596 int get length => JS("int", "#.length", this); | 22046 int get length => JS("int", "#.length", this); |
| 21597 | 22047 |
| 21598 Entry operator[](int index) => JS("Entry", "#[#]", this, index); | 22048 Entry operator[](int index) { |
| 21599 | 22049 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22050 return JS("Entry", "#[#]", this, index); |
| 22051 } |
| 21600 void operator[]=(int index, Entry value) { | 22052 void operator[]=(int index, Entry value) { |
| 21601 throw new UnsupportedError("Cannot assign element of immutable List."); | 22053 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21602 } | 22054 } |
| 21603 // -- start List<Entry> mixins. | 22055 // -- start List<Entry> mixins. |
| 21604 // Entry is the element type. | 22056 // Entry is the element type. |
| 21605 | 22057 |
| 21606 | 22058 |
| 21607 void set length(int value) { | 22059 void set length(int value) { |
| 21608 throw new UnsupportedError("Cannot resize immutable List."); | 22060 throw new UnsupportedError("Cannot resize immutable List."); |
| 21609 } | 22061 } |
| 21610 | 22062 |
| 22063 Entry get first { |
| 22064 if (this.length > 0) { |
| 22065 return JS('Entry', '#[0]', this); |
| 22066 } |
| 22067 throw new StateError("No elements"); |
| 22068 } |
| 22069 |
| 22070 Entry get last { |
| 22071 int len = this.length; |
| 22072 if (len > 0) { |
| 22073 return JS('Entry', '#[#]', this, len - 1); |
| 22074 } |
| 22075 throw new StateError("No elements"); |
| 22076 } |
| 22077 |
| 22078 Entry get single { |
| 22079 int len = this.length; |
| 22080 if (len == 1) { |
| 22081 return JS('Entry', '#[0]', this); |
| 22082 } |
| 22083 if (len == 0) throw new StateError("No elements"); |
| 22084 throw new StateError("More than one element"); |
| 22085 } |
| 22086 |
| 22087 Entry elementAt(int index) { |
| 22088 return this[index]; |
| 22089 } |
| 22090 |
| 21611 // -- end List<Entry> mixins. | 22091 // -- end List<Entry> mixins. |
| 21612 | 22092 |
| 21613 @DomName('EntryArray.item') | 22093 @DomName('EntryArray.item') |
| 21614 @DocsEditable | 22094 @DocsEditable |
| 21615 Entry item(int index) native; | 22095 Entry item(int index) native; |
| 21616 } | 22096 } |
| 21617 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22097 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21618 // for details. All rights reserved. Use of this source code is governed by a | 22098 // for details. All rights reserved. Use of this source code is governed by a |
| 21619 // BSD-style license that can be found in the LICENSE file. | 22099 // BSD-style license that can be found in the LICENSE file. |
| 21620 | 22100 |
| 21621 | 22101 |
| 21622 @DocsEditable | 22102 @DocsEditable |
| 21623 @DomName('EntryArraySync') | 22103 @DomName('EntryArraySync') |
| 21624 class _EntryArraySync extends Object with ListMixin<_EntrySync>, ImmutableListMi
xin<_EntrySync> implements JavaScriptIndexingBehavior, List<_EntrySync> native "
EntryArraySync" { | 22104 class _EntryArraySync extends Object with ListMixin<_EntrySync>, ImmutableListMi
xin<_EntrySync> implements JavaScriptIndexingBehavior, List<_EntrySync> native "
EntryArraySync" { |
| 21625 | 22105 |
| 21626 @DomName('EntryArraySync.length') | 22106 @DomName('EntryArraySync.length') |
| 21627 @DocsEditable | 22107 @DocsEditable |
| 21628 int get length => JS("int", "#.length", this); | 22108 int get length => JS("int", "#.length", this); |
| 21629 | 22109 |
| 21630 _EntrySync operator[](int index) => JS("_EntrySync", "#[#]", this, index); | 22110 _EntrySync operator[](int index) { |
| 21631 | 22111 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22112 return JS("_EntrySync", "#[#]", this, index); |
| 22113 } |
| 21632 void operator[]=(int index, _EntrySync value) { | 22114 void operator[]=(int index, _EntrySync value) { |
| 21633 throw new UnsupportedError("Cannot assign element of immutable List."); | 22115 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21634 } | 22116 } |
| 21635 // -- start List<_EntrySync> mixins. | 22117 // -- start List<_EntrySync> mixins. |
| 21636 // _EntrySync is the element type. | 22118 // _EntrySync is the element type. |
| 21637 | 22119 |
| 21638 | 22120 |
| 21639 void set length(int value) { | 22121 void set length(int value) { |
| 21640 throw new UnsupportedError("Cannot resize immutable List."); | 22122 throw new UnsupportedError("Cannot resize immutable List."); |
| 21641 } | 22123 } |
| 21642 | 22124 |
| 22125 _EntrySync get first { |
| 22126 if (this.length > 0) { |
| 22127 return JS('_EntrySync', '#[0]', this); |
| 22128 } |
| 22129 throw new StateError("No elements"); |
| 22130 } |
| 22131 |
| 22132 _EntrySync get last { |
| 22133 int len = this.length; |
| 22134 if (len > 0) { |
| 22135 return JS('_EntrySync', '#[#]', this, len - 1); |
| 22136 } |
| 22137 throw new StateError("No elements"); |
| 22138 } |
| 22139 |
| 22140 _EntrySync get single { |
| 22141 int len = this.length; |
| 22142 if (len == 1) { |
| 22143 return JS('_EntrySync', '#[0]', this); |
| 22144 } |
| 22145 if (len == 0) throw new StateError("No elements"); |
| 22146 throw new StateError("More than one element"); |
| 22147 } |
| 22148 |
| 22149 _EntrySync elementAt(int index) { |
| 22150 return this[index]; |
| 22151 } |
| 22152 |
| 21643 // -- end List<_EntrySync> mixins. | 22153 // -- end List<_EntrySync> mixins. |
| 21644 | 22154 |
| 21645 @DomName('EntryArraySync.item') | 22155 @DomName('EntryArraySync.item') |
| 21646 @DocsEditable | 22156 @DocsEditable |
| 21647 _EntrySync item(int index) native; | 22157 _EntrySync item(int index) native; |
| 21648 } | 22158 } |
| 21649 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22159 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21650 // for details. All rights reserved. Use of this source code is governed by a | 22160 // for details. All rights reserved. Use of this source code is governed by a |
| 21651 // BSD-style license that can be found in the LICENSE file. | 22161 // BSD-style license that can be found in the LICENSE file. |
| 21652 | 22162 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21695 | 22205 |
| 21696 | 22206 |
| 21697 @DocsEditable | 22207 @DocsEditable |
| 21698 @DomName('GamepadList') | 22208 @DomName('GamepadList') |
| 21699 class _GamepadList extends Object with ListMixin<Gamepad>, ImmutableListMixin<Ga
mepad> implements JavaScriptIndexingBehavior, List<Gamepad> native "GamepadList"
{ | 22209 class _GamepadList extends Object with ListMixin<Gamepad>, ImmutableListMixin<Ga
mepad> implements JavaScriptIndexingBehavior, List<Gamepad> native "GamepadList"
{ |
| 21700 | 22210 |
| 21701 @DomName('GamepadList.length') | 22211 @DomName('GamepadList.length') |
| 21702 @DocsEditable | 22212 @DocsEditable |
| 21703 int get length => JS("int", "#.length", this); | 22213 int get length => JS("int", "#.length", this); |
| 21704 | 22214 |
| 21705 Gamepad operator[](int index) => JS("Gamepad", "#[#]", this, index); | 22215 Gamepad operator[](int index) { |
| 21706 | 22216 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22217 return JS("Gamepad", "#[#]", this, index); |
| 22218 } |
| 21707 void operator[]=(int index, Gamepad value) { | 22219 void operator[]=(int index, Gamepad value) { |
| 21708 throw new UnsupportedError("Cannot assign element of immutable List."); | 22220 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21709 } | 22221 } |
| 21710 // -- start List<Gamepad> mixins. | 22222 // -- start List<Gamepad> mixins. |
| 21711 // Gamepad is the element type. | 22223 // Gamepad is the element type. |
| 21712 | 22224 |
| 21713 | 22225 |
| 21714 void set length(int value) { | 22226 void set length(int value) { |
| 21715 throw new UnsupportedError("Cannot resize immutable List."); | 22227 throw new UnsupportedError("Cannot resize immutable List."); |
| 21716 } | 22228 } |
| 21717 | 22229 |
| 22230 Gamepad get first { |
| 22231 if (this.length > 0) { |
| 22232 return JS('Gamepad', '#[0]', this); |
| 22233 } |
| 22234 throw new StateError("No elements"); |
| 22235 } |
| 22236 |
| 22237 Gamepad get last { |
| 22238 int len = this.length; |
| 22239 if (len > 0) { |
| 22240 return JS('Gamepad', '#[#]', this, len - 1); |
| 22241 } |
| 22242 throw new StateError("No elements"); |
| 22243 } |
| 22244 |
| 22245 Gamepad get single { |
| 22246 int len = this.length; |
| 22247 if (len == 1) { |
| 22248 return JS('Gamepad', '#[0]', this); |
| 22249 } |
| 22250 if (len == 0) throw new StateError("No elements"); |
| 22251 throw new StateError("More than one element"); |
| 22252 } |
| 22253 |
| 22254 Gamepad elementAt(int index) { |
| 22255 return this[index]; |
| 22256 } |
| 22257 |
| 21718 // -- end List<Gamepad> mixins. | 22258 // -- end List<Gamepad> mixins. |
| 21719 | 22259 |
| 21720 @DomName('GamepadList.item') | 22260 @DomName('GamepadList.item') |
| 21721 @DocsEditable | 22261 @DocsEditable |
| 21722 Gamepad item(int index) native; | 22262 Gamepad item(int index) native; |
| 21723 } | 22263 } |
| 21724 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22264 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21725 // for details. All rights reserved. Use of this source code is governed by a | 22265 // for details. All rights reserved. Use of this source code is governed by a |
| 21726 // BSD-style license that can be found in the LICENSE file. | 22266 // BSD-style license that can be found in the LICENSE file. |
| 21727 | 22267 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21790 | 22330 |
| 21791 | 22331 |
| 21792 @DocsEditable | 22332 @DocsEditable |
| 21793 @DomName('NamedNodeMap') | 22333 @DomName('NamedNodeMap') |
| 21794 class _NamedNodeMap extends Object with ListMixin<Node>, ImmutableListMixin<Node
> implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap" { | 22334 class _NamedNodeMap extends Object with ListMixin<Node>, ImmutableListMixin<Node
> implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap" { |
| 21795 | 22335 |
| 21796 @DomName('NamedNodeMap.length') | 22336 @DomName('NamedNodeMap.length') |
| 21797 @DocsEditable | 22337 @DocsEditable |
| 21798 int get length => JS("int", "#.length", this); | 22338 int get length => JS("int", "#.length", this); |
| 21799 | 22339 |
| 21800 Node operator[](int index) => JS("Node", "#[#]", this, index); | 22340 Node operator[](int index) { |
| 21801 | 22341 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22342 return JS("Node", "#[#]", this, index); |
| 22343 } |
| 21802 void operator[]=(int index, Node value) { | 22344 void operator[]=(int index, Node value) { |
| 21803 throw new UnsupportedError("Cannot assign element of immutable List."); | 22345 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21804 } | 22346 } |
| 21805 // -- start List<Node> mixins. | 22347 // -- start List<Node> mixins. |
| 21806 // Node is the element type. | 22348 // Node is the element type. |
| 21807 | 22349 |
| 21808 | 22350 |
| 21809 void set length(int value) { | 22351 void set length(int value) { |
| 21810 throw new UnsupportedError("Cannot resize immutable List."); | 22352 throw new UnsupportedError("Cannot resize immutable List."); |
| 21811 } | 22353 } |
| 21812 | 22354 |
| 22355 Node get first { |
| 22356 if (this.length > 0) { |
| 22357 return JS('Node', '#[0]', this); |
| 22358 } |
| 22359 throw new StateError("No elements"); |
| 22360 } |
| 22361 |
| 22362 Node get last { |
| 22363 int len = this.length; |
| 22364 if (len > 0) { |
| 22365 return JS('Node', '#[#]', this, len - 1); |
| 22366 } |
| 22367 throw new StateError("No elements"); |
| 22368 } |
| 22369 |
| 22370 Node get single { |
| 22371 int len = this.length; |
| 22372 if (len == 1) { |
| 22373 return JS('Node', '#[0]', this); |
| 22374 } |
| 22375 if (len == 0) throw new StateError("No elements"); |
| 22376 throw new StateError("More than one element"); |
| 22377 } |
| 22378 |
| 22379 Node elementAt(int index) { |
| 22380 return this[index]; |
| 22381 } |
| 22382 |
| 21813 // -- end List<Node> mixins. | 22383 // -- end List<Node> mixins. |
| 21814 | 22384 |
| 21815 @DomName('NamedNodeMap.getNamedItem') | 22385 @DomName('NamedNodeMap.getNamedItem') |
| 21816 @DocsEditable | 22386 @DocsEditable |
| 21817 Node getNamedItem(String name) native; | 22387 Node getNamedItem(String name) native; |
| 21818 | 22388 |
| 21819 @DomName('NamedNodeMap.getNamedItemNS') | 22389 @DomName('NamedNodeMap.getNamedItemNS') |
| 21820 @DocsEditable | 22390 @DocsEditable |
| 21821 Node getNamedItemNS(String namespaceURI, String localName) native; | 22391 Node getNamedItemNS(String namespaceURI, String localName) native; |
| 21822 | 22392 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21911 | 22481 |
| 21912 | 22482 |
| 21913 @DocsEditable | 22483 @DocsEditable |
| 21914 @DomName('SpeechInputResultList') | 22484 @DomName('SpeechInputResultList') |
| 21915 class _SpeechInputResultList extends Object with ListMixin<SpeechInputResult>, I
mmutableListMixin<SpeechInputResult> implements JavaScriptIndexingBehavior, List
<SpeechInputResult> native "SpeechInputResultList" { | 22485 class _SpeechInputResultList extends Object with ListMixin<SpeechInputResult>, I
mmutableListMixin<SpeechInputResult> implements JavaScriptIndexingBehavior, List
<SpeechInputResult> native "SpeechInputResultList" { |
| 21916 | 22486 |
| 21917 @DomName('SpeechInputResultList.length') | 22487 @DomName('SpeechInputResultList.length') |
| 21918 @DocsEditable | 22488 @DocsEditable |
| 21919 int get length => JS("int", "#.length", this); | 22489 int get length => JS("int", "#.length", this); |
| 21920 | 22490 |
| 21921 SpeechInputResult operator[](int index) => JS("SpeechInputResult", "#[#]", thi
s, index); | 22491 SpeechInputResult operator[](int index) { |
| 21922 | 22492 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22493 return JS("SpeechInputResult", "#[#]", this, index); |
| 22494 } |
| 21923 void operator[]=(int index, SpeechInputResult value) { | 22495 void operator[]=(int index, SpeechInputResult value) { |
| 21924 throw new UnsupportedError("Cannot assign element of immutable List."); | 22496 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21925 } | 22497 } |
| 21926 // -- start List<SpeechInputResult> mixins. | 22498 // -- start List<SpeechInputResult> mixins. |
| 21927 // SpeechInputResult is the element type. | 22499 // SpeechInputResult is the element type. |
| 21928 | 22500 |
| 21929 | 22501 |
| 21930 void set length(int value) { | 22502 void set length(int value) { |
| 21931 throw new UnsupportedError("Cannot resize immutable List."); | 22503 throw new UnsupportedError("Cannot resize immutable List."); |
| 21932 } | 22504 } |
| 21933 | 22505 |
| 22506 SpeechInputResult get first { |
| 22507 if (this.length > 0) { |
| 22508 return JS('SpeechInputResult', '#[0]', this); |
| 22509 } |
| 22510 throw new StateError("No elements"); |
| 22511 } |
| 22512 |
| 22513 SpeechInputResult get last { |
| 22514 int len = this.length; |
| 22515 if (len > 0) { |
| 22516 return JS('SpeechInputResult', '#[#]', this, len - 1); |
| 22517 } |
| 22518 throw new StateError("No elements"); |
| 22519 } |
| 22520 |
| 22521 SpeechInputResult get single { |
| 22522 int len = this.length; |
| 22523 if (len == 1) { |
| 22524 return JS('SpeechInputResult', '#[0]', this); |
| 22525 } |
| 22526 if (len == 0) throw new StateError("No elements"); |
| 22527 throw new StateError("More than one element"); |
| 22528 } |
| 22529 |
| 22530 SpeechInputResult elementAt(int index) { |
| 22531 return this[index]; |
| 22532 } |
| 22533 |
| 21934 // -- end List<SpeechInputResult> mixins. | 22534 // -- end List<SpeechInputResult> mixins. |
| 21935 | 22535 |
| 21936 @DomName('SpeechInputResultList.item') | 22536 @DomName('SpeechInputResultList.item') |
| 21937 @DocsEditable | 22537 @DocsEditable |
| 21938 SpeechInputResult item(int index) native; | 22538 SpeechInputResult item(int index) native; |
| 21939 } | 22539 } |
| 21940 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22540 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21941 // for details. All rights reserved. Use of this source code is governed by a | 22541 // for details. All rights reserved. Use of this source code is governed by a |
| 21942 // BSD-style license that can be found in the LICENSE file. | 22542 // BSD-style license that can be found in the LICENSE file. |
| 21943 | 22543 |
| 21944 | 22544 |
| 21945 @DocsEditable | 22545 @DocsEditable |
| 21946 @DomName('SpeechRecognitionResultList') | 22546 @DomName('SpeechRecognitionResultList') |
| 21947 class _SpeechRecognitionResultList extends Object with ListMixin<SpeechRecogniti
onResult>, ImmutableListMixin<SpeechRecognitionResult> implements JavaScriptInde
xingBehavior, List<SpeechRecognitionResult> native "SpeechRecognitionResultList"
{ | 22547 class _SpeechRecognitionResultList extends Object with ListMixin<SpeechRecogniti
onResult>, ImmutableListMixin<SpeechRecognitionResult> implements JavaScriptInde
xingBehavior, List<SpeechRecognitionResult> native "SpeechRecognitionResultList"
{ |
| 21948 | 22548 |
| 21949 @DomName('SpeechRecognitionResultList.length') | 22549 @DomName('SpeechRecognitionResultList.length') |
| 21950 @DocsEditable | 22550 @DocsEditable |
| 21951 int get length => JS("int", "#.length", this); | 22551 int get length => JS("int", "#.length", this); |
| 21952 | 22552 |
| 21953 SpeechRecognitionResult operator[](int index) => JS("SpeechRecognitionResult",
"#[#]", this, index); | 22553 SpeechRecognitionResult operator[](int index) { |
| 21954 | 22554 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22555 return JS("SpeechRecognitionResult", "#[#]", this, index); |
| 22556 } |
| 21955 void operator[]=(int index, SpeechRecognitionResult value) { | 22557 void operator[]=(int index, SpeechRecognitionResult value) { |
| 21956 throw new UnsupportedError("Cannot assign element of immutable List."); | 22558 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21957 } | 22559 } |
| 21958 // -- start List<SpeechRecognitionResult> mixins. | 22560 // -- start List<SpeechRecognitionResult> mixins. |
| 21959 // SpeechRecognitionResult is the element type. | 22561 // SpeechRecognitionResult is the element type. |
| 21960 | 22562 |
| 21961 | 22563 |
| 21962 void set length(int value) { | 22564 void set length(int value) { |
| 21963 throw new UnsupportedError("Cannot resize immutable List."); | 22565 throw new UnsupportedError("Cannot resize immutable List."); |
| 21964 } | 22566 } |
| 21965 | 22567 |
| 22568 SpeechRecognitionResult get first { |
| 22569 if (this.length > 0) { |
| 22570 return JS('SpeechRecognitionResult', '#[0]', this); |
| 22571 } |
| 22572 throw new StateError("No elements"); |
| 22573 } |
| 22574 |
| 22575 SpeechRecognitionResult get last { |
| 22576 int len = this.length; |
| 22577 if (len > 0) { |
| 22578 return JS('SpeechRecognitionResult', '#[#]', this, len - 1); |
| 22579 } |
| 22580 throw new StateError("No elements"); |
| 22581 } |
| 22582 |
| 22583 SpeechRecognitionResult get single { |
| 22584 int len = this.length; |
| 22585 if (len == 1) { |
| 22586 return JS('SpeechRecognitionResult', '#[0]', this); |
| 22587 } |
| 22588 if (len == 0) throw new StateError("No elements"); |
| 22589 throw new StateError("More than one element"); |
| 22590 } |
| 22591 |
| 22592 SpeechRecognitionResult elementAt(int index) { |
| 22593 return this[index]; |
| 22594 } |
| 22595 |
| 21966 // -- end List<SpeechRecognitionResult> mixins. | 22596 // -- end List<SpeechRecognitionResult> mixins. |
| 21967 | 22597 |
| 21968 @DomName('SpeechRecognitionResultList.item') | 22598 @DomName('SpeechRecognitionResultList.item') |
| 21969 @DocsEditable | 22599 @DocsEditable |
| 21970 SpeechRecognitionResult item(int index) native; | 22600 SpeechRecognitionResult item(int index) native; |
| 21971 } | 22601 } |
| 21972 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22602 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21973 // for details. All rights reserved. Use of this source code is governed by a | 22603 // for details. All rights reserved. Use of this source code is governed by a |
| 21974 // BSD-style license that can be found in the LICENSE file. | 22604 // BSD-style license that can be found in the LICENSE file. |
| 21975 | 22605 |
| 21976 | 22606 |
| 21977 @DocsEditable | 22607 @DocsEditable |
| 21978 @DomName('StyleSheetList') | 22608 @DomName('StyleSheetList') |
| 21979 class _StyleSheetList extends Object with ListMixin<StyleSheet>, ImmutableListMi
xin<StyleSheet> implements JavaScriptIndexingBehavior, List<StyleSheet> native "
StyleSheetList" { | 22609 class _StyleSheetList extends Object with ListMixin<StyleSheet>, ImmutableListMi
xin<StyleSheet> implements JavaScriptIndexingBehavior, List<StyleSheet> native "
StyleSheetList" { |
| 21980 | 22610 |
| 21981 @DomName('StyleSheetList.length') | 22611 @DomName('StyleSheetList.length') |
| 21982 @DocsEditable | 22612 @DocsEditable |
| 21983 int get length => JS("int", "#.length", this); | 22613 int get length => JS("int", "#.length", this); |
| 21984 | 22614 |
| 21985 StyleSheet operator[](int index) => JS("StyleSheet", "#[#]", this, index); | 22615 StyleSheet operator[](int index) { |
| 21986 | 22616 if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length)) thro
w new RangeError.range(index, 0, length); |
| 22617 return JS("StyleSheet", "#[#]", this, index); |
| 22618 } |
| 21987 void operator[]=(int index, StyleSheet value) { | 22619 void operator[]=(int index, StyleSheet value) { |
| 21988 throw new UnsupportedError("Cannot assign element of immutable List."); | 22620 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 21989 } | 22621 } |
| 21990 // -- start List<StyleSheet> mixins. | 22622 // -- start List<StyleSheet> mixins. |
| 21991 // StyleSheet is the element type. | 22623 // StyleSheet is the element type. |
| 21992 | 22624 |
| 21993 | 22625 |
| 21994 void set length(int value) { | 22626 void set length(int value) { |
| 21995 throw new UnsupportedError("Cannot resize immutable List."); | 22627 throw new UnsupportedError("Cannot resize immutable List."); |
| 21996 } | 22628 } |
| 21997 | 22629 |
| 22630 StyleSheet get first { |
| 22631 if (this.length > 0) { |
| 22632 return JS('StyleSheet', '#[0]', this); |
| 22633 } |
| 22634 throw new StateError("No elements"); |
| 22635 } |
| 22636 |
| 22637 StyleSheet get last { |
| 22638 int len = this.length; |
| 22639 if (len > 0) { |
| 22640 return JS('StyleSheet', '#[#]', this, len - 1); |
| 22641 } |
| 22642 throw new StateError("No elements"); |
| 22643 } |
| 22644 |
| 22645 StyleSheet get single { |
| 22646 int len = this.length; |
| 22647 if (len == 1) { |
| 22648 return JS('StyleSheet', '#[0]', this); |
| 22649 } |
| 22650 if (len == 0) throw new StateError("No elements"); |
| 22651 throw new StateError("More than one element"); |
| 22652 } |
| 22653 |
| 22654 StyleSheet elementAt(int index) { |
| 22655 return this[index]; |
| 22656 } |
| 22657 |
| 21998 // -- end List<StyleSheet> mixins. | 22658 // -- end List<StyleSheet> mixins. |
| 21999 | 22659 |
| 22000 @DomName('StyleSheetList.item') | 22660 @DomName('StyleSheetList.item') |
| 22001 @DocsEditable | 22661 @DocsEditable |
| 22002 StyleSheet item(int index) native; | 22662 StyleSheet item(int index) native; |
| 22003 } | 22663 } |
| 22004 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22664 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 22005 // for details. All rights reserved. Use of this source code is governed by a | 22665 // for details. All rights reserved. Use of this source code is governed by a |
| 22006 // BSD-style license that can be found in the LICENSE file. | 22666 // BSD-style license that can be found in the LICENSE file. |
| 22007 | 22667 |
| (...skipping 3565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25573 _position = nextPosition; | 26233 _position = nextPosition; |
| 25574 return true; | 26234 return true; |
| 25575 } | 26235 } |
| 25576 _current = null; | 26236 _current = null; |
| 25577 _position = _array.length; | 26237 _position = _array.length; |
| 25578 return false; | 26238 return false; |
| 25579 } | 26239 } |
| 25580 | 26240 |
| 25581 T get current => _current; | 26241 T get current => _current; |
| 25582 } | 26242 } |
| OLD | NEW |