| OLD | NEW |
| 1 #library('dom'); | 1 #library('dom'); |
| 2 | 2 |
| 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 // DO NOT EDIT | 7 // DO NOT EDIT |
| 8 // Auto-generated Dart DOM library. | 8 // Auto-generated Dart DOM library. |
| 9 | 9 |
| 10 | 10 |
| (...skipping 10404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10415 List<int> getRange(int start, int rangeLength) => | 10415 List<int> getRange(int start, int rangeLength) => |
| 10416 _Lists.getRange(this, start, rangeLength, <int>[]); | 10416 _Lists.getRange(this, start, rangeLength, <int>[]); |
| 10417 | 10417 |
| 10418 // -- end List<int> mixins. | 10418 // -- end List<int> mixins. |
| 10419 | 10419 |
| 10420 void setElements(Object array, [int offset = null]) native 'set'; | 10420 void setElements(Object array, [int offset = null]) native 'set'; |
| 10421 | 10421 |
| 10422 _Uint8ArrayJs subarray(int start, [int end = null]) native; | 10422 _Uint8ArrayJs subarray(int start, [int end = null]) native; |
| 10423 } | 10423 } |
| 10424 | 10424 |
| 10425 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray, L
ist<int> native "*Uint8ClampedArray" { | 10425 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray na
tive "*Uint8ClampedArray" { |
| 10426 | 10426 |
| 10427 // Use implementation from Uint8Array. | 10427 // Use implementation from Uint8Array. |
| 10428 // final int length; | 10428 // final int length; |
| 10429 | 10429 |
| 10430 int operator[](int index) native "return this[index];"; | |
| 10431 | |
| 10432 void operator[]=(int index, int value) native "this[index] = value"; | |
| 10433 // -- start List<int> mixins. | |
| 10434 // int is the element type. | |
| 10435 | |
| 10436 // From Iterable<int>: | |
| 10437 | |
| 10438 Iterator<int> iterator() { | |
| 10439 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
| 10440 // be cached in both iterator _and_ forEach method. For now caching it | |
| 10441 // for consistency. | |
| 10442 return new _FixedSizeListIterator<int>(this); | |
| 10443 } | |
| 10444 | |
| 10445 // From Collection<int>: | |
| 10446 | |
| 10447 void add(int value) { | |
| 10448 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 10449 } | |
| 10450 | |
| 10451 void addLast(int value) { | |
| 10452 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 10453 } | |
| 10454 | |
| 10455 void addAll(Collection<int> collection) { | |
| 10456 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 10457 } | |
| 10458 | |
| 10459 void forEach(void f(int element)) => _Collections.forEach(this, f); | |
| 10460 | |
| 10461 Collection map(f(int element)) => _Collections.map(this, [], f); | |
| 10462 | |
| 10463 Collection<int> filter(bool f(int element)) => | |
| 10464 _Collections.filter(this, <int>[], f); | |
| 10465 | |
| 10466 bool every(bool f(int element)) => _Collections.every(this, f); | |
| 10467 | |
| 10468 bool some(bool f(int element)) => _Collections.some(this, f); | |
| 10469 | |
| 10470 bool isEmpty() => this.length == 0; | |
| 10471 | |
| 10472 // From List<int>: | |
| 10473 | |
| 10474 void sort(int compare(int a, int b)) { | |
| 10475 throw new UnsupportedOperationException("Cannot sort immutable List."); | |
| 10476 } | |
| 10477 | |
| 10478 int indexOf(int element, [int start = 0]) => | |
| 10479 _Lists.indexOf(this, element, start, this.length); | |
| 10480 | |
| 10481 int lastIndexOf(int element, [int start]) { | |
| 10482 if (start === null) start = length - 1; | |
| 10483 return _Lists.lastIndexOf(this, element, start); | |
| 10484 } | |
| 10485 | |
| 10486 int last() => this[length - 1]; | |
| 10487 | |
| 10488 int removeLast() { | |
| 10489 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
| 10490 } | |
| 10491 | |
| 10492 // FIXME: implement these. | |
| 10493 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { | |
| 10494 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); | |
| 10495 } | |
| 10496 | |
| 10497 void removeRange(int start, int rangeLength) { | |
| 10498 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | |
| 10499 } | |
| 10500 | |
| 10501 void insertRange(int start, int rangeLength, [int initialValue]) { | |
| 10502 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
| 10503 } | |
| 10504 | |
| 10505 List<int> getRange(int start, int rangeLength) => | |
| 10506 _Lists.getRange(this, start, rangeLength, <int>[]); | |
| 10507 | |
| 10508 // -- end List<int> mixins. | |
| 10509 | |
| 10510 void setElements(Object array, [int offset = null]) native 'set'; | 10430 void setElements(Object array, [int offset = null]) native 'set'; |
| 10511 | 10431 |
| 10512 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; | 10432 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; |
| 10513 | |
| 10514 // From ArrayBufferView | |
| 10515 | |
| 10516 // Use implementation from ArrayBufferView. | |
| 10517 // final _ArrayBufferJs buffer; | |
| 10518 | |
| 10519 // Use implementation from ArrayBufferView. | |
| 10520 // final int byteLength; | |
| 10521 | |
| 10522 // Use implementation from ArrayBufferView. | |
| 10523 // final int byteOffset; | |
| 10524 } | 10433 } |
| 10525 | 10434 |
| 10526 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { | 10435 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { |
| 10527 | 10436 |
| 10528 final bool customError; | 10437 final bool customError; |
| 10529 | 10438 |
| 10530 final bool patternMismatch; | 10439 final bool patternMismatch; |
| 10531 | 10440 |
| 10532 final bool rangeOverflow; | 10441 final bool rangeOverflow; |
| 10533 | 10442 |
| (...skipping 11994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22528 void setElements(Object array, [int offset]); | 22437 void setElements(Object array, [int offset]); |
| 22529 | 22438 |
| 22530 Uint8Array subarray(int start, [int end]); | 22439 Uint8Array subarray(int start, [int end]); |
| 22531 } | 22440 } |
| 22532 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22441 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 22533 // for details. All rights reserved. Use of this source code is governed by a | 22442 // for details. All rights reserved. Use of this source code is governed by a |
| 22534 // BSD-style license that can be found in the LICENSE file. | 22443 // BSD-style license that can be found in the LICENSE file. |
| 22535 | 22444 |
| 22536 // WARNING: Do not edit - generated code. | 22445 // WARNING: Do not edit - generated code. |
| 22537 | 22446 |
| 22538 interface Uint8ClampedArray extends Uint8Array, List<int>, ArrayBufferView defau
lt _TypedArrayFactoryProvider { | 22447 interface Uint8ClampedArray extends Uint8Array default _TypedArrayFactoryProvide
r { |
| 22539 | 22448 |
| 22540 Uint8ClampedArray(int length); | 22449 Uint8ClampedArray(int length); |
| 22541 | 22450 |
| 22542 Uint8ClampedArray.fromList(List<int> list); | 22451 Uint8ClampedArray.fromList(List<int> list); |
| 22543 | 22452 |
| 22544 Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length])
; | 22453 Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length])
; |
| 22545 | 22454 |
| 22546 final int length; | 22455 final int length; |
| 22547 | 22456 |
| 22548 void setElements(Object array, [int offset]); | 22457 void setElements(Object array, [int offset]); |
| (...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25376 if (length < 0) throw new IllegalArgumentException('length'); | 25285 if (length < 0) throw new IllegalArgumentException('length'); |
| 25377 if (start < 0) throw new IndexOutOfRangeException(start); | 25286 if (start < 0) throw new IndexOutOfRangeException(start); |
| 25378 int end = start + length; | 25287 int end = start + length; |
| 25379 if (end > a.length) throw new IndexOutOfRangeException(end); | 25288 if (end > a.length) throw new IndexOutOfRangeException(end); |
| 25380 for (int i = start; i < end; i++) { | 25289 for (int i = start; i < end; i++) { |
| 25381 accumulator.add(a[i]); | 25290 accumulator.add(a[i]); |
| 25382 } | 25291 } |
| 25383 return accumulator; | 25292 return accumulator; |
| 25384 } | 25293 } |
| 25385 } | 25294 } |
| OLD | NEW |