| 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 10327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10338 void setElements(Object array, [int offset = null]) native 'set'; | 10338 void setElements(Object array, [int offset = null]) native 'set'; |
| 10339 | 10339 |
| 10340 _Uint8ArrayJs subarray(int start, [int end = null]) native; | 10340 _Uint8ArrayJs subarray(int start, [int end = null]) native; |
| 10341 } | 10341 } |
| 10342 | 10342 |
| 10343 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray, L
ist<int> native "*Uint8ClampedArray" { | 10343 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray, L
ist<int> native "*Uint8ClampedArray" { |
| 10344 | 10344 |
| 10345 // Use implementation from Uint8Array. | 10345 // Use implementation from Uint8Array. |
| 10346 // final int length; | 10346 // final int length; |
| 10347 | 10347 |
| 10348 int operator[](int index) native "return this[index];"; |
| 10349 |
| 10350 void operator[]=(int index, int value) native "this[index] = value"; |
| 10351 // -- start List<int> mixins. |
| 10352 // int is the element type. |
| 10353 |
| 10354 // From Iterable<int>: |
| 10355 |
| 10356 Iterator<int> iterator() { |
| 10357 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 10358 // be cached in both iterator _and_ forEach method. For now caching it |
| 10359 // for consistency. |
| 10360 return new _FixedSizeListIterator<int>(this); |
| 10361 } |
| 10362 |
| 10363 // From Collection<int>: |
| 10364 |
| 10365 void add(int value) { |
| 10366 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10367 } |
| 10368 |
| 10369 void addLast(int value) { |
| 10370 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10371 } |
| 10372 |
| 10373 void addAll(Collection<int> collection) { |
| 10374 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10375 } |
| 10376 |
| 10377 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 10378 |
| 10379 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 10380 |
| 10381 Collection<int> filter(bool f(int element)) => |
| 10382 _Collections.filter(this, <int>[], f); |
| 10383 |
| 10384 bool every(bool f(int element)) => _Collections.every(this, f); |
| 10385 |
| 10386 bool some(bool f(int element)) => _Collections.some(this, f); |
| 10387 |
| 10388 bool isEmpty() => this.length == 0; |
| 10389 |
| 10390 // From List<int>: |
| 10391 |
| 10392 void sort(int compare(int a, int b)) { |
| 10393 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 10394 } |
| 10395 |
| 10396 int indexOf(int element, [int start = 0]) => |
| 10397 _Lists.indexOf(this, element, start, this.length); |
| 10398 |
| 10399 int lastIndexOf(int element, [int start]) { |
| 10400 if (start === null) start = length - 1; |
| 10401 return _Lists.lastIndexOf(this, element, start); |
| 10402 } |
| 10403 |
| 10404 int last() => this[length - 1]; |
| 10405 |
| 10406 int removeLast() { |
| 10407 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); |
| 10408 } |
| 10409 |
| 10410 // FIXME: implement these. |
| 10411 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { |
| 10412 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 10413 } |
| 10414 |
| 10415 void removeRange(int start, int rangeLength) { |
| 10416 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 10417 } |
| 10418 |
| 10419 void insertRange(int start, int rangeLength, [int initialValue]) { |
| 10420 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 10421 } |
| 10422 |
| 10423 List<int> getRange(int start, int rangeLength) => |
| 10424 _Lists.getRange(this, start, rangeLength, <int>[]); |
| 10425 |
| 10426 // -- end List<int> mixins. |
| 10427 |
| 10348 void setElements(Object array, [int offset = null]) native 'set'; | 10428 void setElements(Object array, [int offset = null]) native 'set'; |
| 10349 | 10429 |
| 10350 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; | 10430 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; |
| 10431 |
| 10432 // From ArrayBufferView |
| 10433 |
| 10434 // Use implementation from ArrayBufferView. |
| 10435 // final _ArrayBufferJs buffer; |
| 10436 |
| 10437 // Use implementation from ArrayBufferView. |
| 10438 // final int byteLength; |
| 10439 |
| 10440 // Use implementation from ArrayBufferView. |
| 10441 // final int byteOffset; |
| 10351 } | 10442 } |
| 10352 | 10443 |
| 10353 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { | 10444 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { |
| 10354 | 10445 |
| 10355 final bool customError; | 10446 final bool customError; |
| 10356 | 10447 |
| 10357 final bool patternMismatch; | 10448 final bool patternMismatch; |
| 10358 | 10449 |
| 10359 final bool rangeOverflow; | 10450 final bool rangeOverflow; |
| 10360 | 10451 |
| (...skipping 11994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22355 void setElements(Object array, [int offset]); | 22446 void setElements(Object array, [int offset]); |
| 22356 | 22447 |
| 22357 Uint8Array subarray(int start, [int end]); | 22448 Uint8Array subarray(int start, [int end]); |
| 22358 } | 22449 } |
| 22359 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22450 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 22360 // for details. All rights reserved. Use of this source code is governed by a | 22451 // for details. All rights reserved. Use of this source code is governed by a |
| 22361 // BSD-style license that can be found in the LICENSE file. | 22452 // BSD-style license that can be found in the LICENSE file. |
| 22362 | 22453 |
| 22363 // WARNING: Do not edit - generated code. | 22454 // WARNING: Do not edit - generated code. |
| 22364 | 22455 |
| 22365 interface Uint8ClampedArray extends Uint8Array default _TypedArrayFactoryProvide
r { | 22456 interface Uint8ClampedArray extends Uint8Array, List<int>, ArrayBufferView defau
lt _TypedArrayFactoryProvider { |
| 22366 | 22457 |
| 22367 Uint8ClampedArray(int length); | 22458 Uint8ClampedArray(int length); |
| 22368 | 22459 |
| 22369 Uint8ClampedArray.fromList(List<int> list); | 22460 Uint8ClampedArray.fromList(List<int> list); |
| 22370 | 22461 |
| 22371 Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length])
; | 22462 Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length])
; |
| 22372 | 22463 |
| 22373 final int length; | 22464 final int length; |
| 22374 | 22465 |
| 22375 void setElements(Object array, [int offset]); | 22466 void setElements(Object array, [int offset]); |
| (...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25203 if (length < 0) throw new IllegalArgumentException('length'); | 25294 if (length < 0) throw new IllegalArgumentException('length'); |
| 25204 if (start < 0) throw new IndexOutOfRangeException(start); | 25295 if (start < 0) throw new IndexOutOfRangeException(start); |
| 25205 int end = start + length; | 25296 int end = start + length; |
| 25206 if (end > a.length) throw new IndexOutOfRangeException(end); | 25297 if (end > a.length) throw new IndexOutOfRangeException(end); |
| 25207 for (int i = start; i < end; i++) { | 25298 for (int i = start; i < end; i++) { |
| 25208 accumulator.add(a[i]); | 25299 accumulator.add(a[i]); |
| 25209 } | 25300 } |
| 25210 return accumulator; | 25301 return accumulator; |
| 25211 } | 25302 } |
| 25212 } | 25303 } |
| OLD | NEW |