OLD | NEW |
1 library html; | 1 library html; |
2 | 2 |
3 import 'dart:collection'; | 3 import 'dart:collection'; |
4 import 'dart:html_common'; | 4 import 'dart:html_common'; |
5 import 'dart:indexed_db'; | 5 import 'dart:indexed_db'; |
6 import 'dart:isolate'; | 6 import 'dart:isolate'; |
7 import 'dart:json'; | 7 import 'dart:json'; |
8 import 'dart:svg' as svg; | 8 import 'dart:svg' as svg; |
9 import 'dart:web_audio' as web_audio; | 9 import 'dart:web_audio' as web_audio; |
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
(...skipping 5514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5525 | 5525 |
5526 /// @domName DirectoryReaderSync.readEntries; @docsEditable true | 5526 /// @domName DirectoryReaderSync.readEntries; @docsEditable true |
5527 @Returns('_EntryArraySync') @Creates('_EntryArraySync') | 5527 @Returns('_EntryArraySync') @Creates('_EntryArraySync') |
5528 List<EntrySync> readEntries() native; | 5528 List<EntrySync> readEntries() native; |
5529 } | 5529 } |
5530 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5530 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
5531 // for details. All rights reserved. Use of this source code is governed by a | 5531 // for details. All rights reserved. Use of this source code is governed by a |
5532 // BSD-style license that can be found in the LICENSE file. | 5532 // BSD-style license that can be found in the LICENSE file. |
5533 | 5533 |
5534 | 5534 |
5535 /** | |
5536 * Represents an HTML <div> element. | |
5537 * | |
5538 * The [DivElement] is a generic container for content and does not have any | |
5539 * special significance. It is functionally similar to [SpanElement]. | |
5540 * | |
5541 * The [DivElement] is a block-level element, as opposed to [SpanElement], | |
5542 * which is an inline-level element. | |
5543 * | |
5544 * Example usage: | |
5545 * | |
5546 * DivElement div = new DivElement(); | |
5547 * div.text = 'Here's my new DivElem | |
5548 * document.body.elements.add(elem); | |
5549 * | |
5550 * See also: | |
5551 * | |
5552 * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C. | |
5553 * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) f
rom W3C. | |
5554 * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes)
from W3C. | |
5555 */ | |
5556 /// @domName HTMLDivElement; @docsEditable true | 5535 /// @domName HTMLDivElement; @docsEditable true |
5557 class DivElement extends Element implements Element native "*HTMLDivElement" { | 5536 class DivElement extends Element implements Element native "*HTMLDivElement" { |
5558 | 5537 |
5559 factory DivElement() => document.$dom_createElement("div"); | 5538 factory DivElement() => document.$dom_createElement("div"); |
5560 } | 5539 } |
5561 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5540 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
5562 // for details. All rights reserved. Use of this source code is governed by a | 5541 // for details. All rights reserved. Use of this source code is governed by a |
5563 // BSD-style license that can be found in the LICENSE file. | 5542 // BSD-style license that can be found in the LICENSE file. |
5564 | 5543 |
5565 | 5544 |
(...skipping 18 matching lines...) Expand all Loading... |
5584 /// @domName Document.body; @docsEditable true | 5563 /// @domName Document.body; @docsEditable true |
5585 @JSName('body') | 5564 @JSName('body') |
5586 Element $dom_body; | 5565 Element $dom_body; |
5587 | 5566 |
5588 /// @domName Document.charset; @docsEditable true | 5567 /// @domName Document.charset; @docsEditable true |
5589 String charset; | 5568 String charset; |
5590 | 5569 |
5591 /// @domName Document.cookie; @docsEditable true | 5570 /// @domName Document.cookie; @docsEditable true |
5592 String cookie; | 5571 String cookie; |
5593 | 5572 |
5594 /// Returns the [Window] associated with the document. | |
5595 /// @domName Document.defaultView; @docsEditable true | 5573 /// @domName Document.defaultView; @docsEditable true |
5596 Window get window => _convertNativeToDart_Window(this._window); | 5574 Window get window => _convertNativeToDart_Window(this._window); |
5597 @JSName('defaultView') | 5575 @JSName('defaultView') |
5598 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') | 5576 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') |
5599 final dynamic _window; | 5577 final dynamic _window; |
5600 | 5578 |
5601 /// @domName Document.documentElement; @docsEditable true | 5579 /// @domName Document.documentElement; @docsEditable true |
5602 final Element documentElement; | 5580 final Element documentElement; |
5603 | 5581 |
5604 /// @domName Document.domain; @docsEditable true | 5582 /// @domName Document.domain; @docsEditable true |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6342 | 6320 |
6343 // From List<DomMimeType>: | 6321 // From List<DomMimeType>: |
6344 void set length(int value) { | 6322 void set length(int value) { |
6345 throw new UnsupportedError("Cannot resize immutable List."); | 6323 throw new UnsupportedError("Cannot resize immutable List."); |
6346 } | 6324 } |
6347 | 6325 |
6348 void clear() { | 6326 void clear() { |
6349 throw new UnsupportedError("Cannot clear immutable List."); | 6327 throw new UnsupportedError("Cannot clear immutable List."); |
6350 } | 6328 } |
6351 | 6329 |
6352 void sort([Comparator compare = Comparable.compare]) { | 6330 void sort([int compare(DomMimeType a, DomMimeType b)]) { |
6353 throw new UnsupportedError("Cannot sort immutable List."); | 6331 throw new UnsupportedError("Cannot sort immutable List."); |
6354 } | 6332 } |
6355 | 6333 |
6356 int indexOf(DomMimeType element, [int start = 0]) => | 6334 int indexOf(DomMimeType element, [int start = 0]) => |
6357 Lists.indexOf(this, element, start, this.length); | 6335 Lists.indexOf(this, element, start, this.length); |
6358 | 6336 |
6359 int lastIndexOf(DomMimeType element, [int start]) { | 6337 int lastIndexOf(DomMimeType element, [int start]) { |
6360 if (start == null) start = length - 1; | 6338 if (start == null) start = length - 1; |
6361 return Lists.lastIndexOf(this, element, start); | 6339 return Lists.lastIndexOf(this, element, start); |
6362 } | 6340 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6498 | 6476 |
6499 // From List<DomPlugin>: | 6477 // From List<DomPlugin>: |
6500 void set length(int value) { | 6478 void set length(int value) { |
6501 throw new UnsupportedError("Cannot resize immutable List."); | 6479 throw new UnsupportedError("Cannot resize immutable List."); |
6502 } | 6480 } |
6503 | 6481 |
6504 void clear() { | 6482 void clear() { |
6505 throw new UnsupportedError("Cannot clear immutable List."); | 6483 throw new UnsupportedError("Cannot clear immutable List."); |
6506 } | 6484 } |
6507 | 6485 |
6508 void sort([Comparator compare = Comparable.compare]) { | 6486 void sort([int compare(DomPlugin a, DomPlugin b)]) { |
6509 throw new UnsupportedError("Cannot sort immutable List."); | 6487 throw new UnsupportedError("Cannot sort immutable List."); |
6510 } | 6488 } |
6511 | 6489 |
6512 int indexOf(DomPlugin element, [int start = 0]) => | 6490 int indexOf(DomPlugin element, [int start = 0]) => |
6513 Lists.indexOf(this, element, start, this.length); | 6491 Lists.indexOf(this, element, start, this.length); |
6514 | 6492 |
6515 int lastIndexOf(DomPlugin element, [int start]) { | 6493 int lastIndexOf(DomPlugin element, [int start]) { |
6516 if (start == null) start = length - 1; | 6494 if (start == null) start = length - 1; |
6517 return Lists.lastIndexOf(this, element, start); | 6495 return Lists.lastIndexOf(this, element, start); |
6518 } | 6496 } |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6715 | 6693 |
6716 // From List<String>: | 6694 // From List<String>: |
6717 void set length(int value) { | 6695 void set length(int value) { |
6718 throw new UnsupportedError("Cannot resize immutable List."); | 6696 throw new UnsupportedError("Cannot resize immutable List."); |
6719 } | 6697 } |
6720 | 6698 |
6721 void clear() { | 6699 void clear() { |
6722 throw new UnsupportedError("Cannot clear immutable List."); | 6700 throw new UnsupportedError("Cannot clear immutable List."); |
6723 } | 6701 } |
6724 | 6702 |
6725 void sort([Comparator compare = Comparable.compare]) { | 6703 void sort([int compare(String a, String b)]) { |
6726 throw new UnsupportedError("Cannot sort immutable List."); | 6704 throw new UnsupportedError("Cannot sort immutable List."); |
6727 } | 6705 } |
6728 | 6706 |
6729 int indexOf(String element, [int start = 0]) => | 6707 int indexOf(String element, [int start = 0]) => |
6730 Lists.indexOf(this, element, start, this.length); | 6708 Lists.indexOf(this, element, start, this.length); |
6731 | 6709 |
6732 int lastIndexOf(String element, [int start]) { | 6710 int lastIndexOf(String element, [int start]) { |
6733 if (start == null) start = length - 1; | 6711 if (start == null) start = length - 1; |
6734 return Lists.lastIndexOf(this, element, start); | 6712 return Lists.lastIndexOf(this, element, start); |
6735 } | 6713 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6897 Element addLast(Element value) => add(value); | 6875 Element addLast(Element value) => add(value); |
6898 | 6876 |
6899 Iterator<Element> iterator() => _toList().iterator(); | 6877 Iterator<Element> iterator() => _toList().iterator(); |
6900 | 6878 |
6901 void addAll(Collection<Element> collection) { | 6879 void addAll(Collection<Element> collection) { |
6902 for (Element element in collection) { | 6880 for (Element element in collection) { |
6903 _element.$dom_appendChild(element); | 6881 _element.$dom_appendChild(element); |
6904 } | 6882 } |
6905 } | 6883 } |
6906 | 6884 |
6907 void sort([Comparator compare = Comparable.compare]) { | 6885 void sort([int compare(Element a, Element b)]) { |
6908 throw new UnsupportedError('TODO(jacobr): should we impl?'); | 6886 throw new UnsupportedError('TODO(jacobr): should we impl?'); |
6909 } | 6887 } |
6910 | 6888 |
6911 dynamic reduce(dynamic initialValue, | 6889 dynamic reduce(dynamic initialValue, |
6912 dynamic combine(dynamic previousValue, Element element)) { | 6890 dynamic combine(dynamic previousValue, Element element)) { |
6913 return Collections.reduce(this, initialValue, combine); | 6891 return Collections.reduce(this, initialValue, combine); |
6914 } | 6892 } |
6915 | 6893 |
6916 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { | 6894 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { |
6917 throw new UnimplementedError(); | 6895 throw new UnimplementedError(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7046 void addLast(Element value) { | 7024 void addLast(Element value) { |
7047 throw new UnsupportedError(''); | 7025 throw new UnsupportedError(''); |
7048 } | 7026 } |
7049 | 7027 |
7050 Iterator<Element> iterator() => new _FrozenElementListIterator(this); | 7028 Iterator<Element> iterator() => new _FrozenElementListIterator(this); |
7051 | 7029 |
7052 void addAll(Collection<Element> collection) { | 7030 void addAll(Collection<Element> collection) { |
7053 throw new UnsupportedError(''); | 7031 throw new UnsupportedError(''); |
7054 } | 7032 } |
7055 | 7033 |
7056 void sort([Comparator compare = Comparable.compare]) { | 7034 void sort([int compare(Element a, Element b)]) { |
7057 throw new UnsupportedError(''); | 7035 throw new UnsupportedError(''); |
7058 } | 7036 } |
7059 | 7037 |
7060 dynamic reduce(dynamic initialValue, | 7038 dynamic reduce(dynamic initialValue, |
7061 dynamic combine(dynamic previousValue, Element element)) { | 7039 dynamic combine(dynamic previousValue, Element element)) { |
7062 return Collections.reduce(this, initialValue, combine); | 7040 return Collections.reduce(this, initialValue, combine); |
7063 } | 7041 } |
7064 | 7042 |
7065 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { | 7043 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { |
7066 throw new UnsupportedError(''); | 7044 throw new UnsupportedError(''); |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8441 | 8419 |
8442 // From List<File>: | 8420 // From List<File>: |
8443 void set length(int value) { | 8421 void set length(int value) { |
8444 throw new UnsupportedError("Cannot resize immutable List."); | 8422 throw new UnsupportedError("Cannot resize immutable List."); |
8445 } | 8423 } |
8446 | 8424 |
8447 void clear() { | 8425 void clear() { |
8448 throw new UnsupportedError("Cannot clear immutable List."); | 8426 throw new UnsupportedError("Cannot clear immutable List."); |
8449 } | 8427 } |
8450 | 8428 |
8451 void sort([Comparator compare = Comparable.compare]) { | 8429 void sort([int compare(File a, File b)]) { |
8452 throw new UnsupportedError("Cannot sort immutable List."); | 8430 throw new UnsupportedError("Cannot sort immutable List."); |
8453 } | 8431 } |
8454 | 8432 |
8455 int indexOf(File element, [int start = 0]) => | 8433 int indexOf(File element, [int start = 0]) => |
8456 Lists.indexOf(this, element, start, this.length); | 8434 Lists.indexOf(this, element, start, this.length); |
8457 | 8435 |
8458 int lastIndexOf(File element, [int start]) { | 8436 int lastIndexOf(File element, [int start]) { |
8459 if (start == null) start = length - 1; | 8437 if (start == null) start = length - 1; |
8460 return Lists.lastIndexOf(this, element, start); | 8438 return Lists.lastIndexOf(this, element, start); |
8461 } | 8439 } |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8797 | 8775 |
8798 // From List<num>: | 8776 // From List<num>: |
8799 void set length(int value) { | 8777 void set length(int value) { |
8800 throw new UnsupportedError("Cannot resize immutable List."); | 8778 throw new UnsupportedError("Cannot resize immutable List."); |
8801 } | 8779 } |
8802 | 8780 |
8803 void clear() { | 8781 void clear() { |
8804 throw new UnsupportedError("Cannot clear immutable List."); | 8782 throw new UnsupportedError("Cannot clear immutable List."); |
8805 } | 8783 } |
8806 | 8784 |
8807 void sort([Comparator compare = Comparable.compare]) { | 8785 void sort([int compare(num a, num b)]) { |
8808 throw new UnsupportedError("Cannot sort immutable List."); | 8786 throw new UnsupportedError("Cannot sort immutable List."); |
8809 } | 8787 } |
8810 | 8788 |
8811 int indexOf(num element, [int start = 0]) => | 8789 int indexOf(num element, [int start = 0]) => |
8812 Lists.indexOf(this, element, start, this.length); | 8790 Lists.indexOf(this, element, start, this.length); |
8813 | 8791 |
8814 int lastIndexOf(num element, [int start]) { | 8792 int lastIndexOf(num element, [int start]) { |
8815 if (start == null) start = length - 1; | 8793 if (start == null) start = length - 1; |
8816 return Lists.lastIndexOf(this, element, start); | 8794 return Lists.lastIndexOf(this, element, start); |
8817 } | 8795 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8923 | 8901 |
8924 // From List<num>: | 8902 // From List<num>: |
8925 void set length(int value) { | 8903 void set length(int value) { |
8926 throw new UnsupportedError("Cannot resize immutable List."); | 8904 throw new UnsupportedError("Cannot resize immutable List."); |
8927 } | 8905 } |
8928 | 8906 |
8929 void clear() { | 8907 void clear() { |
8930 throw new UnsupportedError("Cannot clear immutable List."); | 8908 throw new UnsupportedError("Cannot clear immutable List."); |
8931 } | 8909 } |
8932 | 8910 |
8933 void sort([Comparator compare = Comparable.compare]) { | 8911 void sort([int compare(num a, num b)]) { |
8934 throw new UnsupportedError("Cannot sort immutable List."); | 8912 throw new UnsupportedError("Cannot sort immutable List."); |
8935 } | 8913 } |
8936 | 8914 |
8937 int indexOf(num element, [int start = 0]) => | 8915 int indexOf(num element, [int start = 0]) => |
8938 Lists.indexOf(this, element, start, this.length); | 8916 Lists.indexOf(this, element, start, this.length); |
8939 | 8917 |
8940 int lastIndexOf(num element, [int start]) { | 8918 int lastIndexOf(num element, [int start]) { |
8941 if (start == null) start = length - 1; | 8919 if (start == null) start = length - 1; |
8942 return Lists.lastIndexOf(this, element, start); | 8920 return Lists.lastIndexOf(this, element, start); |
8943 } | 8921 } |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9351 | 9329 |
9352 // From List<Node>: | 9330 // From List<Node>: |
9353 void set length(int value) { | 9331 void set length(int value) { |
9354 throw new UnsupportedError("Cannot resize immutable List."); | 9332 throw new UnsupportedError("Cannot resize immutable List."); |
9355 } | 9333 } |
9356 | 9334 |
9357 void clear() { | 9335 void clear() { |
9358 throw new UnsupportedError("Cannot clear immutable List."); | 9336 throw new UnsupportedError("Cannot clear immutable List."); |
9359 } | 9337 } |
9360 | 9338 |
9361 void sort([Comparator compare = Comparable.compare]) { | 9339 void sort([int compare(Node a, Node b)]) { |
9362 throw new UnsupportedError("Cannot sort immutable List."); | 9340 throw new UnsupportedError("Cannot sort immutable List."); |
9363 } | 9341 } |
9364 | 9342 |
9365 int indexOf(Node element, [int start = 0]) => | 9343 int indexOf(Node element, [int start = 0]) => |
9366 Lists.indexOf(this, element, start, this.length); | 9344 Lists.indexOf(this, element, start, this.length); |
9367 | 9345 |
9368 int lastIndexOf(Node element, [int start]) { | 9346 int lastIndexOf(Node element, [int start]) { |
9369 if (start == null) start = length - 1; | 9347 if (start == null) start = length - 1; |
9370 return Lists.lastIndexOf(this, element, start); | 9348 return Lists.lastIndexOf(this, element, start); |
9371 } | 9349 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9472 | 9450 |
9473 // From List<Node>: | 9451 // From List<Node>: |
9474 void set length(int value) { | 9452 void set length(int value) { |
9475 throw new UnsupportedError("Cannot resize immutable List."); | 9453 throw new UnsupportedError("Cannot resize immutable List."); |
9476 } | 9454 } |
9477 | 9455 |
9478 void clear() { | 9456 void clear() { |
9479 throw new UnsupportedError("Cannot clear immutable List."); | 9457 throw new UnsupportedError("Cannot clear immutable List."); |
9480 } | 9458 } |
9481 | 9459 |
9482 void sort([Comparator compare = Comparable.compare]) { | 9460 void sort([int compare(Node a, Node b)]) { |
9483 throw new UnsupportedError("Cannot sort immutable List."); | 9461 throw new UnsupportedError("Cannot sort immutable List."); |
9484 } | 9462 } |
9485 | 9463 |
9486 int indexOf(Node element, [int start = 0]) => | 9464 int indexOf(Node element, [int start = 0]) => |
9487 Lists.indexOf(this, element, start, this.length); | 9465 Lists.indexOf(this, element, start, this.length); |
9488 | 9466 |
9489 int lastIndexOf(Node element, [int start]) { | 9467 int lastIndexOf(Node element, [int start]) { |
9490 if (start == null) start = length - 1; | 9468 if (start == null) start = length - 1; |
9491 return Lists.lastIndexOf(this, element, start); | 9469 return Lists.lastIndexOf(this, element, start); |
9492 } | 9470 } |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10270 | 10248 |
10271 // From List<int>: | 10249 // From List<int>: |
10272 void set length(int value) { | 10250 void set length(int value) { |
10273 throw new UnsupportedError("Cannot resize immutable List."); | 10251 throw new UnsupportedError("Cannot resize immutable List."); |
10274 } | 10252 } |
10275 | 10253 |
10276 void clear() { | 10254 void clear() { |
10277 throw new UnsupportedError("Cannot clear immutable List."); | 10255 throw new UnsupportedError("Cannot clear immutable List."); |
10278 } | 10256 } |
10279 | 10257 |
10280 void sort([Comparator compare = Comparable.compare]) { | 10258 void sort([int compare(int a, int b)]) { |
10281 throw new UnsupportedError("Cannot sort immutable List."); | 10259 throw new UnsupportedError("Cannot sort immutable List."); |
10282 } | 10260 } |
10283 | 10261 |
10284 int indexOf(int element, [int start = 0]) => | 10262 int indexOf(int element, [int start = 0]) => |
10285 Lists.indexOf(this, element, start, this.length); | 10263 Lists.indexOf(this, element, start, this.length); |
10286 | 10264 |
10287 int lastIndexOf(int element, [int start]) { | 10265 int lastIndexOf(int element, [int start]) { |
10288 if (start == null) start = length - 1; | 10266 if (start == null) start = length - 1; |
10289 return Lists.lastIndexOf(this, element, start); | 10267 return Lists.lastIndexOf(this, element, start); |
10290 } | 10268 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10396 | 10374 |
10397 // From List<int>: | 10375 // From List<int>: |
10398 void set length(int value) { | 10376 void set length(int value) { |
10399 throw new UnsupportedError("Cannot resize immutable List."); | 10377 throw new UnsupportedError("Cannot resize immutable List."); |
10400 } | 10378 } |
10401 | 10379 |
10402 void clear() { | 10380 void clear() { |
10403 throw new UnsupportedError("Cannot clear immutable List."); | 10381 throw new UnsupportedError("Cannot clear immutable List."); |
10404 } | 10382 } |
10405 | 10383 |
10406 void sort([Comparator compare = Comparable.compare]) { | 10384 void sort([int compare(int a, int b)]) { |
10407 throw new UnsupportedError("Cannot sort immutable List."); | 10385 throw new UnsupportedError("Cannot sort immutable List."); |
10408 } | 10386 } |
10409 | 10387 |
10410 int indexOf(int element, [int start = 0]) => | 10388 int indexOf(int element, [int start = 0]) => |
10411 Lists.indexOf(this, element, start, this.length); | 10389 Lists.indexOf(this, element, start, this.length); |
10412 | 10390 |
10413 int lastIndexOf(int element, [int start]) { | 10391 int lastIndexOf(int element, [int start]) { |
10414 if (start == null) start = length - 1; | 10392 if (start == null) start = length - 1; |
10415 return Lists.lastIndexOf(this, element, start); | 10393 return Lists.lastIndexOf(this, element, start); |
10416 } | 10394 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10522 | 10500 |
10523 // From List<int>: | 10501 // From List<int>: |
10524 void set length(int value) { | 10502 void set length(int value) { |
10525 throw new UnsupportedError("Cannot resize immutable List."); | 10503 throw new UnsupportedError("Cannot resize immutable List."); |
10526 } | 10504 } |
10527 | 10505 |
10528 void clear() { | 10506 void clear() { |
10529 throw new UnsupportedError("Cannot clear immutable List."); | 10507 throw new UnsupportedError("Cannot clear immutable List."); |
10530 } | 10508 } |
10531 | 10509 |
10532 void sort([Comparator compare = Comparable.compare]) { | 10510 void sort([int compare(int a, int b)]) { |
10533 throw new UnsupportedError("Cannot sort immutable List."); | 10511 throw new UnsupportedError("Cannot sort immutable List."); |
10534 } | 10512 } |
10535 | 10513 |
10536 int indexOf(int element, [int start = 0]) => | 10514 int indexOf(int element, [int start = 0]) => |
10537 Lists.indexOf(this, element, start, this.length); | 10515 Lists.indexOf(this, element, start, this.length); |
10538 | 10516 |
10539 int lastIndexOf(int element, [int start]) { | 10517 int lastIndexOf(int element, [int start]) { |
10540 if (start == null) start = length - 1; | 10518 if (start == null) start = length - 1; |
10541 return Lists.lastIndexOf(this, element, start); | 10519 return Lists.lastIndexOf(this, element, start); |
10542 } | 10520 } |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12196 final int totalJSHeapSize; | 12174 final int totalJSHeapSize; |
12197 | 12175 |
12198 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true | 12176 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true |
12199 final int usedJSHeapSize; | 12177 final int usedJSHeapSize; |
12200 } | 12178 } |
12201 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12179 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12202 // for details. All rights reserved. Use of this source code is governed by a | 12180 // for details. All rights reserved. Use of this source code is governed by a |
12203 // BSD-style license that can be found in the LICENSE file. | 12181 // BSD-style license that can be found in the LICENSE file. |
12204 | 12182 |
12205 | 12183 |
12206 /** | |
12207 * An HTML <menu> element. | |
12208 * | |
12209 * A <menu> element represents an unordered list of menu commands. | |
12210 * | |
12211 * See also: | |
12212 * | |
12213 * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu)
from MDN. | |
12214 * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-e
lement) from the W3C. | |
12215 */ | |
12216 /// @domName HTMLMenuElement; @docsEditable true | 12184 /// @domName HTMLMenuElement; @docsEditable true |
12217 class MenuElement extends Element implements Element native "*HTMLMenuElement" { | 12185 class MenuElement extends Element implements Element native "*HTMLMenuElement" { |
12218 | 12186 |
12219 factory MenuElement() => document.$dom_createElement("menu"); | 12187 factory MenuElement() => document.$dom_createElement("menu"); |
12220 } | 12188 } |
12221 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12189 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12222 // for details. All rights reserved. Use of this source code is governed by a | 12190 // for details. All rights reserved. Use of this source code is governed by a |
12223 // BSD-style license that can be found in the LICENSE file. | 12191 // BSD-style license that can be found in the LICENSE file. |
12224 | 12192 |
12225 | 12193 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12747 | 12715 |
12748 // From List<Node>: | 12716 // From List<Node>: |
12749 void set length(int value) { | 12717 void set length(int value) { |
12750 throw new UnsupportedError("Cannot resize immutable List."); | 12718 throw new UnsupportedError("Cannot resize immutable List."); |
12751 } | 12719 } |
12752 | 12720 |
12753 void clear() { | 12721 void clear() { |
12754 throw new UnsupportedError("Cannot clear immutable List."); | 12722 throw new UnsupportedError("Cannot clear immutable List."); |
12755 } | 12723 } |
12756 | 12724 |
12757 void sort([Comparator compare = Comparable.compare]) { | 12725 void sort([int compare(Node a, Node b)]) { |
12758 throw new UnsupportedError("Cannot sort immutable List."); | 12726 throw new UnsupportedError("Cannot sort immutable List."); |
12759 } | 12727 } |
12760 | 12728 |
12761 int indexOf(Node element, [int start = 0]) => | 12729 int indexOf(Node element, [int start = 0]) => |
12762 Lists.indexOf(this, element, start, this.length); | 12730 Lists.indexOf(this, element, start, this.length); |
12763 | 12731 |
12764 int lastIndexOf(Node element, [int start]) { | 12732 int lastIndexOf(Node element, [int start]) { |
12765 if (start == null) start = length - 1; | 12733 if (start == null) start = length - 1; |
12766 return Lists.lastIndexOf(this, element, start); | 12734 return Lists.lastIndexOf(this, element, start); |
12767 } | 12735 } |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13008 bool every(bool f(Node element)) => Collections.every(this, f); | 12976 bool every(bool f(Node element)) => Collections.every(this, f); |
13009 | 12977 |
13010 bool some(bool f(Node element)) => Collections.some(this, f); | 12978 bool some(bool f(Node element)) => Collections.some(this, f); |
13011 | 12979 |
13012 bool get isEmpty => this.length == 0; | 12980 bool get isEmpty => this.length == 0; |
13013 | 12981 |
13014 // From List<Node>: | 12982 // From List<Node>: |
13015 | 12983 |
13016 // TODO(jacobr): this could be implemented for child node lists. | 12984 // TODO(jacobr): this could be implemented for child node lists. |
13017 // The exception we throw here is misleading. | 12985 // The exception we throw here is misleading. |
13018 void sort([Comparator compare = Comparable.compare]) { | 12986 void sort([int compare(Node a, Node b)]) { |
13019 throw new UnsupportedError("Cannot sort immutable List."); | 12987 throw new UnsupportedError("Cannot sort immutable List."); |
13020 } | 12988 } |
13021 | 12989 |
13022 int indexOf(Node element, [int start = 0]) => | 12990 int indexOf(Node element, [int start = 0]) => |
13023 Lists.indexOf(this, element, start, this.length); | 12991 Lists.indexOf(this, element, start, this.length); |
13024 | 12992 |
13025 int lastIndexOf(Node element, [int start = 0]) => | 12993 int lastIndexOf(Node element, [int start = 0]) => |
13026 Lists.lastIndexOf(this, element, start); | 12994 Lists.lastIndexOf(this, element, start); |
13027 | 12995 |
13028 // FIXME: implement these. | 12996 // FIXME: implement these. |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13362 | 13330 |
13363 // From List<Node>: | 13331 // From List<Node>: |
13364 void set length(int value) { | 13332 void set length(int value) { |
13365 throw new UnsupportedError("Cannot resize immutable List."); | 13333 throw new UnsupportedError("Cannot resize immutable List."); |
13366 } | 13334 } |
13367 | 13335 |
13368 void clear() { | 13336 void clear() { |
13369 throw new UnsupportedError("Cannot clear immutable List."); | 13337 throw new UnsupportedError("Cannot clear immutable List."); |
13370 } | 13338 } |
13371 | 13339 |
13372 void sort([Comparator compare = Comparable.compare]) { | 13340 void sort([int compare(Node a, Node b)]) { |
13373 throw new UnsupportedError("Cannot sort immutable List."); | 13341 throw new UnsupportedError("Cannot sort immutable List."); |
13374 } | 13342 } |
13375 | 13343 |
13376 int indexOf(Node element, [int start = 0]) => | 13344 int indexOf(Node element, [int start = 0]) => |
13377 Lists.indexOf(this, element, start, this.length); | 13345 Lists.indexOf(this, element, start, this.length); |
13378 | 13346 |
13379 int lastIndexOf(Node element, [int start]) { | 13347 int lastIndexOf(Node element, [int start]) { |
13380 if (start == null) start = length - 1; | 13348 if (start == null) start = length - 1; |
13381 return Lists.lastIndexOf(this, element, start); | 13349 return Lists.lastIndexOf(this, element, start); |
13382 } | 13350 } |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15275 | 15243 |
15276 // From List<SourceBuffer>: | 15244 // From List<SourceBuffer>: |
15277 void set length(int value) { | 15245 void set length(int value) { |
15278 throw new UnsupportedError("Cannot resize immutable List."); | 15246 throw new UnsupportedError("Cannot resize immutable List."); |
15279 } | 15247 } |
15280 | 15248 |
15281 void clear() { | 15249 void clear() { |
15282 throw new UnsupportedError("Cannot clear immutable List."); | 15250 throw new UnsupportedError("Cannot clear immutable List."); |
15283 } | 15251 } |
15284 | 15252 |
15285 void sort([Comparator compare = Comparable.compare]) { | 15253 void sort([int compare(SourceBuffer a, SourceBuffer b)]) { |
15286 throw new UnsupportedError("Cannot sort immutable List."); | 15254 throw new UnsupportedError("Cannot sort immutable List."); |
15287 } | 15255 } |
15288 | 15256 |
15289 int indexOf(SourceBuffer element, [int start = 0]) => | 15257 int indexOf(SourceBuffer element, [int start = 0]) => |
15290 Lists.indexOf(this, element, start, this.length); | 15258 Lists.indexOf(this, element, start, this.length); |
15291 | 15259 |
15292 int lastIndexOf(SourceBuffer element, [int start]) { | 15260 int lastIndexOf(SourceBuffer element, [int start]) { |
15293 if (start == null) start = length - 1; | 15261 if (start == null) start = length - 1; |
15294 return Lists.lastIndexOf(this, element, start); | 15262 return Lists.lastIndexOf(this, element, start); |
15295 } | 15263 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15448 | 15416 |
15449 // From List<SpeechGrammar>: | 15417 // From List<SpeechGrammar>: |
15450 void set length(int value) { | 15418 void set length(int value) { |
15451 throw new UnsupportedError("Cannot resize immutable List."); | 15419 throw new UnsupportedError("Cannot resize immutable List."); |
15452 } | 15420 } |
15453 | 15421 |
15454 void clear() { | 15422 void clear() { |
15455 throw new UnsupportedError("Cannot clear immutable List."); | 15423 throw new UnsupportedError("Cannot clear immutable List."); |
15456 } | 15424 } |
15457 | 15425 |
15458 void sort([Comparator compare = Comparable.compare]) { | 15426 void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) { |
15459 throw new UnsupportedError("Cannot sort immutable List."); | 15427 throw new UnsupportedError("Cannot sort immutable List."); |
15460 } | 15428 } |
15461 | 15429 |
15462 int indexOf(SpeechGrammar element, [int start = 0]) => | 15430 int indexOf(SpeechGrammar element, [int start = 0]) => |
15463 Lists.indexOf(this, element, start, this.length); | 15431 Lists.indexOf(this, element, start, this.length); |
15464 | 15432 |
15465 int lastIndexOf(SpeechGrammar element, [int start]) { | 15433 int lastIndexOf(SpeechGrammar element, [int start]) { |
15466 if (start == null) start = length - 1; | 15434 if (start == null) start = length - 1; |
15467 return Lists.lastIndexOf(this, element, start); | 15435 return Lists.lastIndexOf(this, element, start); |
15468 } | 15436 } |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15832 | 15800 |
15833 // From List<Map>: | 15801 // From List<Map>: |
15834 void set length(int value) { | 15802 void set length(int value) { |
15835 throw new UnsupportedError("Cannot resize immutable List."); | 15803 throw new UnsupportedError("Cannot resize immutable List."); |
15836 } | 15804 } |
15837 | 15805 |
15838 void clear() { | 15806 void clear() { |
15839 throw new UnsupportedError("Cannot clear immutable List."); | 15807 throw new UnsupportedError("Cannot clear immutable List."); |
15840 } | 15808 } |
15841 | 15809 |
15842 void sort([Comparator compare = Comparable.compare]) { | 15810 void sort([int compare(Map a, Map b)]) { |
15843 throw new UnsupportedError("Cannot sort immutable List."); | 15811 throw new UnsupportedError("Cannot sort immutable List."); |
15844 } | 15812 } |
15845 | 15813 |
15846 int indexOf(Map element, [int start = 0]) => | 15814 int indexOf(Map element, [int start = 0]) => |
15847 Lists.indexOf(this, element, start, this.length); | 15815 Lists.indexOf(this, element, start, this.length); |
15848 | 15816 |
15849 int lastIndexOf(Map element, [int start]) { | 15817 int lastIndexOf(Map element, [int start]) { |
15850 if (start == null) start = length - 1; | 15818 if (start == null) start = length - 1; |
15851 return Lists.lastIndexOf(this, element, start); | 15819 return Lists.lastIndexOf(this, element, start); |
15852 } | 15820 } |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16720 | 16688 |
16721 // From List<TextTrackCue>: | 16689 // From List<TextTrackCue>: |
16722 void set length(int value) { | 16690 void set length(int value) { |
16723 throw new UnsupportedError("Cannot resize immutable List."); | 16691 throw new UnsupportedError("Cannot resize immutable List."); |
16724 } | 16692 } |
16725 | 16693 |
16726 void clear() { | 16694 void clear() { |
16727 throw new UnsupportedError("Cannot clear immutable List."); | 16695 throw new UnsupportedError("Cannot clear immutable List."); |
16728 } | 16696 } |
16729 | 16697 |
16730 void sort([Comparator compare = Comparable.compare]) { | 16698 void sort([int compare(TextTrackCue a, TextTrackCue b)]) { |
16731 throw new UnsupportedError("Cannot sort immutable List."); | 16699 throw new UnsupportedError("Cannot sort immutable List."); |
16732 } | 16700 } |
16733 | 16701 |
16734 int indexOf(TextTrackCue element, [int start = 0]) => | 16702 int indexOf(TextTrackCue element, [int start = 0]) => |
16735 Lists.indexOf(this, element, start, this.length); | 16703 Lists.indexOf(this, element, start, this.length); |
16736 | 16704 |
16737 int lastIndexOf(TextTrackCue element, [int start]) { | 16705 int lastIndexOf(TextTrackCue element, [int start]) { |
16738 if (start == null) start = length - 1; | 16706 if (start == null) start = length - 1; |
16739 return Lists.lastIndexOf(this, element, start); | 16707 return Lists.lastIndexOf(this, element, start); |
16740 } | 16708 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16841 | 16809 |
16842 // From List<TextTrack>: | 16810 // From List<TextTrack>: |
16843 void set length(int value) { | 16811 void set length(int value) { |
16844 throw new UnsupportedError("Cannot resize immutable List."); | 16812 throw new UnsupportedError("Cannot resize immutable List."); |
16845 } | 16813 } |
16846 | 16814 |
16847 void clear() { | 16815 void clear() { |
16848 throw new UnsupportedError("Cannot clear immutable List."); | 16816 throw new UnsupportedError("Cannot clear immutable List."); |
16849 } | 16817 } |
16850 | 16818 |
16851 void sort([Comparator compare = Comparable.compare]) { | 16819 void sort([int compare(TextTrack a, TextTrack b)]) { |
16852 throw new UnsupportedError("Cannot sort immutable List."); | 16820 throw new UnsupportedError("Cannot sort immutable List."); |
16853 } | 16821 } |
16854 | 16822 |
16855 int indexOf(TextTrack element, [int start = 0]) => | 16823 int indexOf(TextTrack element, [int start = 0]) => |
16856 Lists.indexOf(this, element, start, this.length); | 16824 Lists.indexOf(this, element, start, this.length); |
16857 | 16825 |
16858 int lastIndexOf(TextTrack element, [int start]) { | 16826 int lastIndexOf(TextTrack element, [int start]) { |
16859 if (start == null) start = length - 1; | 16827 if (start == null) start = length - 1; |
16860 return Lists.lastIndexOf(this, element, start); | 16828 return Lists.lastIndexOf(this, element, start); |
16861 } | 16829 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17087 | 17055 |
17088 // From List<Touch>: | 17056 // From List<Touch>: |
17089 void set length(int value) { | 17057 void set length(int value) { |
17090 throw new UnsupportedError("Cannot resize immutable List."); | 17058 throw new UnsupportedError("Cannot resize immutable List."); |
17091 } | 17059 } |
17092 | 17060 |
17093 void clear() { | 17061 void clear() { |
17094 throw new UnsupportedError("Cannot clear immutable List."); | 17062 throw new UnsupportedError("Cannot clear immutable List."); |
17095 } | 17063 } |
17096 | 17064 |
17097 void sort([Comparator compare = Comparable.compare]) { | 17065 void sort([int compare(Touch a, Touch b)]) { |
17098 throw new UnsupportedError("Cannot sort immutable List."); | 17066 throw new UnsupportedError("Cannot sort immutable List."); |
17099 } | 17067 } |
17100 | 17068 |
17101 int indexOf(Touch element, [int start = 0]) => | 17069 int indexOf(Touch element, [int start = 0]) => |
17102 Lists.indexOf(this, element, start, this.length); | 17070 Lists.indexOf(this, element, start, this.length); |
17103 | 17071 |
17104 int lastIndexOf(Touch element, [int start]) { | 17072 int lastIndexOf(Touch element, [int start]) { |
17105 if (start == null) start = length - 1; | 17073 if (start == null) start = length - 1; |
17106 return Lists.lastIndexOf(this, element, start); | 17074 return Lists.lastIndexOf(this, element, start); |
17107 } | 17075 } |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17393 | 17361 |
17394 // From List<int>: | 17362 // From List<int>: |
17395 void set length(int value) { | 17363 void set length(int value) { |
17396 throw new UnsupportedError("Cannot resize immutable List."); | 17364 throw new UnsupportedError("Cannot resize immutable List."); |
17397 } | 17365 } |
17398 | 17366 |
17399 void clear() { | 17367 void clear() { |
17400 throw new UnsupportedError("Cannot clear immutable List."); | 17368 throw new UnsupportedError("Cannot clear immutable List."); |
17401 } | 17369 } |
17402 | 17370 |
17403 void sort([Comparator compare = Comparable.compare]) { | 17371 void sort([int compare(int a, int b)]) { |
17404 throw new UnsupportedError("Cannot sort immutable List."); | 17372 throw new UnsupportedError("Cannot sort immutable List."); |
17405 } | 17373 } |
17406 | 17374 |
17407 int indexOf(int element, [int start = 0]) => | 17375 int indexOf(int element, [int start = 0]) => |
17408 Lists.indexOf(this, element, start, this.length); | 17376 Lists.indexOf(this, element, start, this.length); |
17409 | 17377 |
17410 int lastIndexOf(int element, [int start]) { | 17378 int lastIndexOf(int element, [int start]) { |
17411 if (start == null) start = length - 1; | 17379 if (start == null) start = length - 1; |
17412 return Lists.lastIndexOf(this, element, start); | 17380 return Lists.lastIndexOf(this, element, start); |
17413 } | 17381 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17519 | 17487 |
17520 // From List<int>: | 17488 // From List<int>: |
17521 void set length(int value) { | 17489 void set length(int value) { |
17522 throw new UnsupportedError("Cannot resize immutable List."); | 17490 throw new UnsupportedError("Cannot resize immutable List."); |
17523 } | 17491 } |
17524 | 17492 |
17525 void clear() { | 17493 void clear() { |
17526 throw new UnsupportedError("Cannot clear immutable List."); | 17494 throw new UnsupportedError("Cannot clear immutable List."); |
17527 } | 17495 } |
17528 | 17496 |
17529 void sort([Comparator compare = Comparable.compare]) { | 17497 void sort([int compare(int a, int b)]) { |
17530 throw new UnsupportedError("Cannot sort immutable List."); | 17498 throw new UnsupportedError("Cannot sort immutable List."); |
17531 } | 17499 } |
17532 | 17500 |
17533 int indexOf(int element, [int start = 0]) => | 17501 int indexOf(int element, [int start = 0]) => |
17534 Lists.indexOf(this, element, start, this.length); | 17502 Lists.indexOf(this, element, start, this.length); |
17535 | 17503 |
17536 int lastIndexOf(int element, [int start]) { | 17504 int lastIndexOf(int element, [int start]) { |
17537 if (start == null) start = length - 1; | 17505 if (start == null) start = length - 1; |
17538 return Lists.lastIndexOf(this, element, start); | 17506 return Lists.lastIndexOf(this, element, start); |
17539 } | 17507 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17645 | 17613 |
17646 // From List<int>: | 17614 // From List<int>: |
17647 void set length(int value) { | 17615 void set length(int value) { |
17648 throw new UnsupportedError("Cannot resize immutable List."); | 17616 throw new UnsupportedError("Cannot resize immutable List."); |
17649 } | 17617 } |
17650 | 17618 |
17651 void clear() { | 17619 void clear() { |
17652 throw new UnsupportedError("Cannot clear immutable List."); | 17620 throw new UnsupportedError("Cannot clear immutable List."); |
17653 } | 17621 } |
17654 | 17622 |
17655 void sort([Comparator compare = Comparable.compare]) { | 17623 void sort([int compare(int a, int b)]) { |
17656 throw new UnsupportedError("Cannot sort immutable List."); | 17624 throw new UnsupportedError("Cannot sort immutable List."); |
17657 } | 17625 } |
17658 | 17626 |
17659 int indexOf(int element, [int start = 0]) => | 17627 int indexOf(int element, [int start = 0]) => |
17660 Lists.indexOf(this, element, start, this.length); | 17628 Lists.indexOf(this, element, start, this.length); |
17661 | 17629 |
17662 int lastIndexOf(int element, [int start]) { | 17630 int lastIndexOf(int element, [int start]) { |
17663 if (start == null) start = length - 1; | 17631 if (start == null) start = length - 1; |
17664 return Lists.lastIndexOf(this, element, start); | 17632 return Lists.lastIndexOf(this, element, start); |
17665 } | 17633 } |
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19847 | 19815 |
19848 // From List<ClientRect>: | 19816 // From List<ClientRect>: |
19849 void set length(int value) { | 19817 void set length(int value) { |
19850 throw new UnsupportedError("Cannot resize immutable List."); | 19818 throw new UnsupportedError("Cannot resize immutable List."); |
19851 } | 19819 } |
19852 | 19820 |
19853 void clear() { | 19821 void clear() { |
19854 throw new UnsupportedError("Cannot clear immutable List."); | 19822 throw new UnsupportedError("Cannot clear immutable List."); |
19855 } | 19823 } |
19856 | 19824 |
19857 void sort([Comparator compare = Comparable.compare]) { | 19825 void sort([int compare(ClientRect a, ClientRect b)]) { |
19858 throw new UnsupportedError("Cannot sort immutable List."); | 19826 throw new UnsupportedError("Cannot sort immutable List."); |
19859 } | 19827 } |
19860 | 19828 |
19861 int indexOf(ClientRect element, [int start = 0]) => | 19829 int indexOf(ClientRect element, [int start = 0]) => |
19862 Lists.indexOf(this, element, start, this.length); | 19830 Lists.indexOf(this, element, start, this.length); |
19863 | 19831 |
19864 int lastIndexOf(ClientRect element, [int start]) { | 19832 int lastIndexOf(ClientRect element, [int start]) { |
19865 if (start == null) start = length - 1; | 19833 if (start == null) start = length - 1; |
19866 return Lists.lastIndexOf(this, element, start); | 19834 return Lists.lastIndexOf(this, element, start); |
19867 } | 19835 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19970 | 19938 |
19971 // From List<CssRule>: | 19939 // From List<CssRule>: |
19972 void set length(int value) { | 19940 void set length(int value) { |
19973 throw new UnsupportedError("Cannot resize immutable List."); | 19941 throw new UnsupportedError("Cannot resize immutable List."); |
19974 } | 19942 } |
19975 | 19943 |
19976 void clear() { | 19944 void clear() { |
19977 throw new UnsupportedError("Cannot clear immutable List."); | 19945 throw new UnsupportedError("Cannot clear immutable List."); |
19978 } | 19946 } |
19979 | 19947 |
19980 void sort([Comparator compare = Comparable.compare]) { | 19948 void sort([int compare(CssRule a, CssRule b)]) { |
19981 throw new UnsupportedError("Cannot sort immutable List."); | 19949 throw new UnsupportedError("Cannot sort immutable List."); |
19982 } | 19950 } |
19983 | 19951 |
19984 int indexOf(CssRule element, [int start = 0]) => | 19952 int indexOf(CssRule element, [int start = 0]) => |
19985 Lists.indexOf(this, element, start, this.length); | 19953 Lists.indexOf(this, element, start, this.length); |
19986 | 19954 |
19987 int lastIndexOf(CssRule element, [int start]) { | 19955 int lastIndexOf(CssRule element, [int start]) { |
19988 if (start == null) start = length - 1; | 19956 if (start == null) start = length - 1; |
19989 return Lists.lastIndexOf(this, element, start); | 19957 return Lists.lastIndexOf(this, element, start); |
19990 } | 19958 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20084 | 20052 |
20085 // From List<CssValue>: | 20053 // From List<CssValue>: |
20086 void set length(int value) { | 20054 void set length(int value) { |
20087 throw new UnsupportedError("Cannot resize immutable List."); | 20055 throw new UnsupportedError("Cannot resize immutable List."); |
20088 } | 20056 } |
20089 | 20057 |
20090 void clear() { | 20058 void clear() { |
20091 throw new UnsupportedError("Cannot clear immutable List."); | 20059 throw new UnsupportedError("Cannot clear immutable List."); |
20092 } | 20060 } |
20093 | 20061 |
20094 void sort([Comparator compare = Comparable.compare]) { | 20062 void sort([int compare(CssValue a, CssValue b)]) { |
20095 throw new UnsupportedError("Cannot sort immutable List."); | 20063 throw new UnsupportedError("Cannot sort immutable List."); |
20096 } | 20064 } |
20097 | 20065 |
20098 int indexOf(CssValue element, [int start = 0]) => | 20066 int indexOf(CssValue element, [int start = 0]) => |
20099 Lists.indexOf(this, element, start, this.length); | 20067 Lists.indexOf(this, element, start, this.length); |
20100 | 20068 |
20101 int lastIndexOf(CssValue element, [int start]) { | 20069 int lastIndexOf(CssValue element, [int start]) { |
20102 if (start == null) start = length - 1; | 20070 if (start == null) start = length - 1; |
20103 return Lists.lastIndexOf(this, element, start); | 20071 return Lists.lastIndexOf(this, element, start); |
20104 } | 20072 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20224 | 20192 |
20225 // From List<Entry>: | 20193 // From List<Entry>: |
20226 void set length(int value) { | 20194 void set length(int value) { |
20227 throw new UnsupportedError("Cannot resize immutable List."); | 20195 throw new UnsupportedError("Cannot resize immutable List."); |
20228 } | 20196 } |
20229 | 20197 |
20230 void clear() { | 20198 void clear() { |
20231 throw new UnsupportedError("Cannot clear immutable List."); | 20199 throw new UnsupportedError("Cannot clear immutable List."); |
20232 } | 20200 } |
20233 | 20201 |
20234 void sort([Comparator compare = Comparable.compare]) { | 20202 void sort([int compare(Entry a, Entry b)]) { |
20235 throw new UnsupportedError("Cannot sort immutable List."); | 20203 throw new UnsupportedError("Cannot sort immutable List."); |
20236 } | 20204 } |
20237 | 20205 |
20238 int indexOf(Entry element, [int start = 0]) => | 20206 int indexOf(Entry element, [int start = 0]) => |
20239 Lists.indexOf(this, element, start, this.length); | 20207 Lists.indexOf(this, element, start, this.length); |
20240 | 20208 |
20241 int lastIndexOf(Entry element, [int start]) { | 20209 int lastIndexOf(Entry element, [int start]) { |
20242 if (start == null) start = length - 1; | 20210 if (start == null) start = length - 1; |
20243 return Lists.lastIndexOf(this, element, start); | 20211 return Lists.lastIndexOf(this, element, start); |
20244 } | 20212 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20338 | 20306 |
20339 // From List<EntrySync>: | 20307 // From List<EntrySync>: |
20340 void set length(int value) { | 20308 void set length(int value) { |
20341 throw new UnsupportedError("Cannot resize immutable List."); | 20309 throw new UnsupportedError("Cannot resize immutable List."); |
20342 } | 20310 } |
20343 | 20311 |
20344 void clear() { | 20312 void clear() { |
20345 throw new UnsupportedError("Cannot clear immutable List."); | 20313 throw new UnsupportedError("Cannot clear immutable List."); |
20346 } | 20314 } |
20347 | 20315 |
20348 void sort([Comparator compare = Comparable.compare]) { | 20316 void sort([int compare(EntrySync a, EntrySync b)]) { |
20349 throw new UnsupportedError("Cannot sort immutable List."); | 20317 throw new UnsupportedError("Cannot sort immutable List."); |
20350 } | 20318 } |
20351 | 20319 |
20352 int indexOf(EntrySync element, [int start = 0]) => | 20320 int indexOf(EntrySync element, [int start = 0]) => |
20353 Lists.indexOf(this, element, start, this.length); | 20321 Lists.indexOf(this, element, start, this.length); |
20354 | 20322 |
20355 int lastIndexOf(EntrySync element, [int start]) { | 20323 int lastIndexOf(EntrySync element, [int start]) { |
20356 if (start == null) start = length - 1; | 20324 if (start == null) start = length - 1; |
20357 return Lists.lastIndexOf(this, element, start); | 20325 return Lists.lastIndexOf(this, element, start); |
20358 } | 20326 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20490 | 20458 |
20491 // From List<Gamepad>: | 20459 // From List<Gamepad>: |
20492 void set length(int value) { | 20460 void set length(int value) { |
20493 throw new UnsupportedError("Cannot resize immutable List."); | 20461 throw new UnsupportedError("Cannot resize immutable List."); |
20494 } | 20462 } |
20495 | 20463 |
20496 void clear() { | 20464 void clear() { |
20497 throw new UnsupportedError("Cannot clear immutable List."); | 20465 throw new UnsupportedError("Cannot clear immutable List."); |
20498 } | 20466 } |
20499 | 20467 |
20500 void sort([Comparator compare = Comparable.compare]) { | 20468 void sort([int compare(Gamepad a, Gamepad b)]) { |
20501 throw new UnsupportedError("Cannot sort immutable List."); | 20469 throw new UnsupportedError("Cannot sort immutable List."); |
20502 } | 20470 } |
20503 | 20471 |
20504 int indexOf(Gamepad element, [int start = 0]) => | 20472 int indexOf(Gamepad element, [int start = 0]) => |
20505 Lists.indexOf(this, element, start, this.length); | 20473 Lists.indexOf(this, element, start, this.length); |
20506 | 20474 |
20507 int lastIndexOf(Gamepad element, [int start]) { | 20475 int lastIndexOf(Gamepad element, [int start]) { |
20508 if (start == null) start = length - 1; | 20476 if (start == null) start = length - 1; |
20509 return Lists.lastIndexOf(this, element, start); | 20477 return Lists.lastIndexOf(this, element, start); |
20510 } | 20478 } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20657 | 20625 |
20658 // From List<MediaStream>: | 20626 // From List<MediaStream>: |
20659 void set length(int value) { | 20627 void set length(int value) { |
20660 throw new UnsupportedError("Cannot resize immutable List."); | 20628 throw new UnsupportedError("Cannot resize immutable List."); |
20661 } | 20629 } |
20662 | 20630 |
20663 void clear() { | 20631 void clear() { |
20664 throw new UnsupportedError("Cannot clear immutable List."); | 20632 throw new UnsupportedError("Cannot clear immutable List."); |
20665 } | 20633 } |
20666 | 20634 |
20667 void sort([Comparator compare = Comparable.compare]) { | 20635 void sort([int compare(MediaStream a, MediaStream b)]) { |
20668 throw new UnsupportedError("Cannot sort immutable List."); | 20636 throw new UnsupportedError("Cannot sort immutable List."); |
20669 } | 20637 } |
20670 | 20638 |
20671 int indexOf(MediaStream element, [int start = 0]) => | 20639 int indexOf(MediaStream element, [int start = 0]) => |
20672 Lists.indexOf(this, element, start, this.length); | 20640 Lists.indexOf(this, element, start, this.length); |
20673 | 20641 |
20674 int lastIndexOf(MediaStream element, [int start]) { | 20642 int lastIndexOf(MediaStream element, [int start]) { |
20675 if (start == null) start = length - 1; | 20643 if (start == null) start = length - 1; |
20676 return Lists.lastIndexOf(this, element, start); | 20644 return Lists.lastIndexOf(this, element, start); |
20677 } | 20645 } |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20924 | 20892 |
20925 // From List<SpeechInputResult>: | 20893 // From List<SpeechInputResult>: |
20926 void set length(int value) { | 20894 void set length(int value) { |
20927 throw new UnsupportedError("Cannot resize immutable List."); | 20895 throw new UnsupportedError("Cannot resize immutable List."); |
20928 } | 20896 } |
20929 | 20897 |
20930 void clear() { | 20898 void clear() { |
20931 throw new UnsupportedError("Cannot clear immutable List."); | 20899 throw new UnsupportedError("Cannot clear immutable List."); |
20932 } | 20900 } |
20933 | 20901 |
20934 void sort([Comparator compare = Comparable.compare]) { | 20902 void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) { |
20935 throw new UnsupportedError("Cannot sort immutable List."); | 20903 throw new UnsupportedError("Cannot sort immutable List."); |
20936 } | 20904 } |
20937 | 20905 |
20938 int indexOf(SpeechInputResult element, [int start = 0]) => | 20906 int indexOf(SpeechInputResult element, [int start = 0]) => |
20939 Lists.indexOf(this, element, start, this.length); | 20907 Lists.indexOf(this, element, start, this.length); |
20940 | 20908 |
20941 int lastIndexOf(SpeechInputResult element, [int start]) { | 20909 int lastIndexOf(SpeechInputResult element, [int start]) { |
20942 if (start == null) start = length - 1; | 20910 if (start == null) start = length - 1; |
20943 return Lists.lastIndexOf(this, element, start); | 20911 return Lists.lastIndexOf(this, element, start); |
20944 } | 20912 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21047 | 21015 |
21048 // From List<SpeechRecognitionResult>: | 21016 // From List<SpeechRecognitionResult>: |
21049 void set length(int value) { | 21017 void set length(int value) { |
21050 throw new UnsupportedError("Cannot resize immutable List."); | 21018 throw new UnsupportedError("Cannot resize immutable List."); |
21051 } | 21019 } |
21052 | 21020 |
21053 void clear() { | 21021 void clear() { |
21054 throw new UnsupportedError("Cannot clear immutable List."); | 21022 throw new UnsupportedError("Cannot clear immutable List."); |
21055 } | 21023 } |
21056 | 21024 |
21057 void sort([Comparator compare = Comparable.compare]) { | 21025 void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)])
{ |
21058 throw new UnsupportedError("Cannot sort immutable List."); | 21026 throw new UnsupportedError("Cannot sort immutable List."); |
21059 } | 21027 } |
21060 | 21028 |
21061 int indexOf(SpeechRecognitionResult element, [int start = 0]) => | 21029 int indexOf(SpeechRecognitionResult element, [int start = 0]) => |
21062 Lists.indexOf(this, element, start, this.length); | 21030 Lists.indexOf(this, element, start, this.length); |
21063 | 21031 |
21064 int lastIndexOf(SpeechRecognitionResult element, [int start]) { | 21032 int lastIndexOf(SpeechRecognitionResult element, [int start]) { |
21065 if (start == null) start = length - 1; | 21033 if (start == null) start = length - 1; |
21066 return Lists.lastIndexOf(this, element, start); | 21034 return Lists.lastIndexOf(this, element, start); |
21067 } | 21035 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21161 | 21129 |
21162 // From List<StyleSheet>: | 21130 // From List<StyleSheet>: |
21163 void set length(int value) { | 21131 void set length(int value) { |
21164 throw new UnsupportedError("Cannot resize immutable List."); | 21132 throw new UnsupportedError("Cannot resize immutable List."); |
21165 } | 21133 } |
21166 | 21134 |
21167 void clear() { | 21135 void clear() { |
21168 throw new UnsupportedError("Cannot clear immutable List."); | 21136 throw new UnsupportedError("Cannot clear immutable List."); |
21169 } | 21137 } |
21170 | 21138 |
21171 void sort([Comparator compare = Comparable.compare]) { | 21139 void sort([int compare(StyleSheet a, StyleSheet b)]) { |
21172 throw new UnsupportedError("Cannot sort immutable List."); | 21140 throw new UnsupportedError("Cannot sort immutable List."); |
21173 } | 21141 } |
21174 | 21142 |
21175 int indexOf(StyleSheet element, [int start = 0]) => | 21143 int indexOf(StyleSheet element, [int start = 0]) => |
21176 Lists.indexOf(this, element, start, this.length); | 21144 Lists.indexOf(this, element, start, this.length); |
21177 | 21145 |
21178 int lastIndexOf(StyleSheet element, [int start]) { | 21146 int lastIndexOf(StyleSheet element, [int start]) { |
21179 if (start == null) start = length - 1; | 21147 if (start == null) start = length - 1; |
21180 return Lists.lastIndexOf(this, element, start); | 21148 return Lists.lastIndexOf(this, element, start); |
21181 } | 21149 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21299 | 21267 |
21300 // From List<Animation>: | 21268 // From List<Animation>: |
21301 void set length(int value) { | 21269 void set length(int value) { |
21302 throw new UnsupportedError("Cannot resize immutable List."); | 21270 throw new UnsupportedError("Cannot resize immutable List."); |
21303 } | 21271 } |
21304 | 21272 |
21305 void clear() { | 21273 void clear() { |
21306 throw new UnsupportedError("Cannot clear immutable List."); | 21274 throw new UnsupportedError("Cannot clear immutable List."); |
21307 } | 21275 } |
21308 | 21276 |
21309 void sort([Comparator compare = Comparable.compare]) { | 21277 void sort([int compare(Animation a, Animation b)]) { |
21310 throw new UnsupportedError("Cannot sort immutable List."); | 21278 throw new UnsupportedError("Cannot sort immutable List."); |
21311 } | 21279 } |
21312 | 21280 |
21313 int indexOf(Animation element, [int start = 0]) => | 21281 int indexOf(Animation element, [int start = 0]) => |
21314 Lists.indexOf(this, element, start, this.length); | 21282 Lists.indexOf(this, element, start, this.length); |
21315 | 21283 |
21316 int lastIndexOf(Animation element, [int start]) { | 21284 int lastIndexOf(Animation element, [int start]) { |
21317 if (start == null) start = length - 1; | 21285 if (start == null) start = length - 1; |
21318 return Lists.lastIndexOf(this, element, start); | 21286 return Lists.lastIndexOf(this, element, start); |
21319 } | 21287 } |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21953 } | 21921 } |
21954 | 21922 |
21955 void addLast(Element value) { | 21923 void addLast(Element value) { |
21956 add(value); | 21924 add(value); |
21957 } | 21925 } |
21958 | 21926 |
21959 bool contains(Element element) { | 21927 bool contains(Element element) { |
21960 return element is Element && _childNodes.contains(element); | 21928 return element is Element && _childNodes.contains(element); |
21961 } | 21929 } |
21962 | 21930 |
21963 void sort([Comparator compare = Comparable.compare]) { | 21931 void sort([int compare(Element a, Element b)]) { |
21964 throw new UnsupportedError('TODO(jacobr): should we impl?'); | 21932 throw new UnsupportedError('TODO(jacobr): should we impl?'); |
21965 } | 21933 } |
21966 | 21934 |
21967 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { | 21935 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { |
21968 throw new UnimplementedError(); | 21936 throw new UnimplementedError(); |
21969 } | 21937 } |
21970 | 21938 |
21971 void removeRange(int start, int rangeLength) { | 21939 void removeRange(int start, int rangeLength) { |
21972 _filtered.getRange(start, rangeLength).forEach((el) => el.remove()); | 21940 _filtered.getRange(start, rangeLength).forEach((el) => el.remove()); |
21973 } | 21941 } |
(...skipping 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24532 T next() { | 24500 T next() { |
24533 if (!hasNext) { | 24501 if (!hasNext) { |
24534 throw new StateError("No more elements"); | 24502 throw new StateError("No more elements"); |
24535 } | 24503 } |
24536 return _array[_pos++]; | 24504 return _array[_pos++]; |
24537 } | 24505 } |
24538 | 24506 |
24539 final List<T> _array; | 24507 final List<T> _array; |
24540 int _pos; | 24508 int _pos; |
24541 } | 24509 } |
OLD | NEW |