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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 void addColorStop(num offset, String color) native; | 581 void addColorStop(num offset, String color) native; |
582 } | 582 } |
583 | 583 |
584 class CanvasPatternJs extends DOMTypeJs implements CanvasPattern native "*Canvas
Pattern" { | 584 class CanvasPatternJs extends DOMTypeJs implements CanvasPattern native "*Canvas
Pattern" { |
585 } | 585 } |
586 | 586 |
587 class CanvasPixelArrayJs extends DOMTypeJs implements CanvasPixelArray native "*
CanvasPixelArray" { | 587 class CanvasPixelArrayJs extends DOMTypeJs implements CanvasPixelArray native "*
CanvasPixelArray" { |
588 | 588 |
589 int get length() native "return this.length;"; | 589 int get length() native "return this.length;"; |
590 | 590 |
591 int operator[](int index) native; | 591 int operator[](int index) native "return this[index];"; |
592 | 592 |
593 void operator[]=(int index, int value) native; | 593 void operator[]=(int index, int value) native "this[index] = value"; |
| 594 // -- start List<int> mixins. |
| 595 // int is the element type. |
| 596 |
| 597 // From Iterable<int>: |
| 598 |
| 599 Iterator<int> iterator() { |
| 600 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 601 // be cached in both iterator _and_ forEach method. For now caching it |
| 602 // for consistency. |
| 603 return new _FixedSizeListIterator<int>(this); |
| 604 } |
| 605 |
| 606 // From Collection<int>: |
| 607 |
| 608 void add(int value) { |
| 609 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 610 } |
| 611 |
| 612 void addLast(int value) { |
| 613 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 614 } |
| 615 |
| 616 void addAll(Collection<int> collection) { |
| 617 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 618 } |
| 619 |
| 620 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 621 |
| 622 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 623 |
| 624 Collection<int> filter(bool f(int element)) => |
| 625 _Collections.filter(this, <int>[], f); |
| 626 |
| 627 bool every(bool f(int element)) => _Collections.every(this, f); |
| 628 |
| 629 bool some(bool f(int element)) => _Collections.some(this, f); |
| 630 |
| 631 bool isEmpty() => this.length == 0; |
| 632 |
| 633 // From List<int>: |
| 634 |
| 635 void sort(int compare(int a, int b)) { |
| 636 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 637 } |
| 638 |
| 639 int indexOf(int element, [int start = 0]) => |
| 640 _Lists.indexOf(this, element, start, this.length); |
| 641 |
| 642 int lastIndexOf(int element, [int start = 0]) => |
| 643 _Lists.lastIndexOf(this, element, start); |
| 644 |
| 645 int last() => this[length - 1]; |
| 646 |
| 647 // FIXME: implement thesee. |
| 648 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 649 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 650 } |
| 651 void removeRange(int start, int length) { |
| 652 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 653 } |
| 654 void insertRange(int start, int length, [int initialValue]) { |
| 655 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 656 } |
| 657 List<int> getRange(int start, int length) => |
| 658 _Lists.getRange(this, start, length, <int>[]); |
| 659 |
| 660 // -- end List<int> mixins. |
594 } | 661 } |
595 | 662 |
596 class CanvasRenderingContextJs extends DOMTypeJs implements CanvasRenderingConte
xt native "*CanvasRenderingContext" { | 663 class CanvasRenderingContextJs extends DOMTypeJs implements CanvasRenderingConte
xt native "*CanvasRenderingContext" { |
597 | 664 |
598 HTMLCanvasElementJs get canvas() native "return this.canvas;"; | 665 HTMLCanvasElementJs get canvas() native "return this.canvas;"; |
599 } | 666 } |
600 | 667 |
601 class CanvasRenderingContext2DJs extends CanvasRenderingContextJs implements Can
vasRenderingContext2D native "*CanvasRenderingContext2D" { | 668 class CanvasRenderingContext2DJs extends CanvasRenderingContextJs implements Can
vasRenderingContext2D native "*CanvasRenderingContext2D" { |
602 | 669 |
603 Dynamic get fillStyle() native "return this.fillStyle;"; | 670 Dynamic get fillStyle() native "return this.fillStyle;"; |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 factory Float32Array.fromList(List<num> list) => _construct(list); | 2456 factory Float32Array.fromList(List<num> list) => _construct(list); |
2390 | 2457 |
2391 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 2458 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
2392 | 2459 |
2393 static _construct(arg) native 'return new Float32Array(arg);'; | 2460 static _construct(arg) native 'return new Float32Array(arg);'; |
2394 | 2461 |
2395 static final int BYTES_PER_ELEMENT = 4; | 2462 static final int BYTES_PER_ELEMENT = 4; |
2396 | 2463 |
2397 int get length() native "return this.length;"; | 2464 int get length() native "return this.length;"; |
2398 | 2465 |
2399 num operator[](int index) native; | 2466 num operator[](int index) native "return this[index];"; |
2400 | 2467 |
2401 void operator[]=(int index, num value) native; | 2468 void operator[]=(int index, num value) native "this[index] = value"; |
| 2469 // -- start List<num> mixins. |
| 2470 // num is the element type. |
| 2471 |
| 2472 // From Iterable<num>: |
| 2473 |
| 2474 Iterator<num> iterator() { |
| 2475 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 2476 // be cached in both iterator _and_ forEach method. For now caching it |
| 2477 // for consistency. |
| 2478 return new _FixedSizeListIterator<num>(this); |
| 2479 } |
| 2480 |
| 2481 // From Collection<num>: |
| 2482 |
| 2483 void add(num value) { |
| 2484 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2485 } |
| 2486 |
| 2487 void addLast(num value) { |
| 2488 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2489 } |
| 2490 |
| 2491 void addAll(Collection<num> collection) { |
| 2492 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2493 } |
| 2494 |
| 2495 void forEach(void f(num element)) => _Collections.forEach(this, f); |
| 2496 |
| 2497 Collection map(f(num element)) => _Collections.map(this, [], f); |
| 2498 |
| 2499 Collection<num> filter(bool f(num element)) => |
| 2500 _Collections.filter(this, <num>[], f); |
| 2501 |
| 2502 bool every(bool f(num element)) => _Collections.every(this, f); |
| 2503 |
| 2504 bool some(bool f(num element)) => _Collections.some(this, f); |
| 2505 |
| 2506 bool isEmpty() => this.length == 0; |
| 2507 |
| 2508 // From List<num>: |
| 2509 |
| 2510 void sort(int compare(num a, num b)) { |
| 2511 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 2512 } |
| 2513 |
| 2514 int indexOf(num element, [int start = 0]) => |
| 2515 _Lists.indexOf(this, element, start, this.length); |
| 2516 |
| 2517 int lastIndexOf(num element, [int start = 0]) => |
| 2518 _Lists.lastIndexOf(this, element, start); |
| 2519 |
| 2520 num last() => this[length - 1]; |
| 2521 |
| 2522 // FIXME: implement thesee. |
| 2523 void setRange(int start, int length, List<num> from, [int startFrom]) { |
| 2524 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 2525 } |
| 2526 void removeRange(int start, int length) { |
| 2527 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 2528 } |
| 2529 void insertRange(int start, int length, [num initialValue]) { |
| 2530 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 2531 } |
| 2532 List<num> getRange(int start, int length) => |
| 2533 _Lists.getRange(this, start, length, <num>[]); |
| 2534 |
| 2535 // -- end List<num> mixins. |
2402 | 2536 |
2403 void setElements(Object array, [int offset = null]) native; | 2537 void setElements(Object array, [int offset = null]) native; |
2404 | 2538 |
2405 Float32ArrayJs subarray(int start, [int end = null]) native; | 2539 Float32ArrayJs subarray(int start, [int end = null]) native; |
2406 } | 2540 } |
2407 | 2541 |
2408 class Float64ArrayJs extends ArrayBufferViewJs implements Float64Array, List<num
> native "*Float64Array" { | 2542 class Float64ArrayJs extends ArrayBufferViewJs implements Float64Array, List<num
> native "*Float64Array" { |
2409 | 2543 |
2410 factory Float64Array(int length) => _construct(length); | 2544 factory Float64Array(int length) => _construct(length); |
2411 | 2545 |
2412 factory Float64Array.fromList(List<num> list) => _construct(list); | 2546 factory Float64Array.fromList(List<num> list) => _construct(list); |
2413 | 2547 |
2414 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 2548 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
2415 | 2549 |
2416 static _construct(arg) native 'return new Float64Array(arg);'; | 2550 static _construct(arg) native 'return new Float64Array(arg);'; |
2417 | 2551 |
2418 static final int BYTES_PER_ELEMENT = 8; | 2552 static final int BYTES_PER_ELEMENT = 8; |
2419 | 2553 |
2420 int get length() native "return this.length;"; | 2554 int get length() native "return this.length;"; |
2421 | 2555 |
2422 num operator[](int index) native; | 2556 num operator[](int index) native "return this[index];"; |
2423 | 2557 |
2424 void operator[]=(int index, num value) native; | 2558 void operator[]=(int index, num value) native "this[index] = value"; |
| 2559 // -- start List<num> mixins. |
| 2560 // num is the element type. |
| 2561 |
| 2562 // From Iterable<num>: |
| 2563 |
| 2564 Iterator<num> iterator() { |
| 2565 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 2566 // be cached in both iterator _and_ forEach method. For now caching it |
| 2567 // for consistency. |
| 2568 return new _FixedSizeListIterator<num>(this); |
| 2569 } |
| 2570 |
| 2571 // From Collection<num>: |
| 2572 |
| 2573 void add(num value) { |
| 2574 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2575 } |
| 2576 |
| 2577 void addLast(num value) { |
| 2578 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2579 } |
| 2580 |
| 2581 void addAll(Collection<num> collection) { |
| 2582 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2583 } |
| 2584 |
| 2585 void forEach(void f(num element)) => _Collections.forEach(this, f); |
| 2586 |
| 2587 Collection map(f(num element)) => _Collections.map(this, [], f); |
| 2588 |
| 2589 Collection<num> filter(bool f(num element)) => |
| 2590 _Collections.filter(this, <num>[], f); |
| 2591 |
| 2592 bool every(bool f(num element)) => _Collections.every(this, f); |
| 2593 |
| 2594 bool some(bool f(num element)) => _Collections.some(this, f); |
| 2595 |
| 2596 bool isEmpty() => this.length == 0; |
| 2597 |
| 2598 // From List<num>: |
| 2599 |
| 2600 void sort(int compare(num a, num b)) { |
| 2601 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 2602 } |
| 2603 |
| 2604 int indexOf(num element, [int start = 0]) => |
| 2605 _Lists.indexOf(this, element, start, this.length); |
| 2606 |
| 2607 int lastIndexOf(num element, [int start = 0]) => |
| 2608 _Lists.lastIndexOf(this, element, start); |
| 2609 |
| 2610 num last() => this[length - 1]; |
| 2611 |
| 2612 // FIXME: implement thesee. |
| 2613 void setRange(int start, int length, List<num> from, [int startFrom]) { |
| 2614 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 2615 } |
| 2616 void removeRange(int start, int length) { |
| 2617 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 2618 } |
| 2619 void insertRange(int start, int length, [num initialValue]) { |
| 2620 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 2621 } |
| 2622 List<num> getRange(int start, int length) => |
| 2623 _Lists.getRange(this, start, length, <num>[]); |
| 2624 |
| 2625 // -- end List<num> mixins. |
2425 | 2626 |
2426 void setElements(Object array, [int offset = null]) native; | 2627 void setElements(Object array, [int offset = null]) native; |
2427 | 2628 |
2428 Float64ArrayJs subarray(int start, [int end = null]) native; | 2629 Float64ArrayJs subarray(int start, [int end = null]) native; |
2429 } | 2630 } |
2430 | 2631 |
2431 class GeolocationJs extends DOMTypeJs implements Geolocation native "*Geolocatio
n" { | 2632 class GeolocationJs extends DOMTypeJs implements Geolocation native "*Geolocatio
n" { |
2432 | 2633 |
2433 void clearWatch(int watchId) native; | 2634 void clearWatch(int watchId) native; |
2434 | 2635 |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 | 2965 |
2765 Object getContext(String contextId) native; | 2966 Object getContext(String contextId) native; |
2766 | 2967 |
2767 String toDataURL(String type) native; | 2968 String toDataURL(String type) native; |
2768 } | 2969 } |
2769 | 2970 |
2770 class HTMLCollectionJs extends DOMTypeJs implements HTMLCollection native "*HTML
Collection" { | 2971 class HTMLCollectionJs extends DOMTypeJs implements HTMLCollection native "*HTML
Collection" { |
2771 | 2972 |
2772 int get length() native "return this.length;"; | 2973 int get length() native "return this.length;"; |
2773 | 2974 |
2774 NodeJs operator[](int index) native; | 2975 NodeJs operator[](int index) native "return this[index];"; |
2775 | 2976 |
2776 void operator[]=(int index, NodeJs value) { | 2977 void operator[]=(int index, NodeJs value) { |
2777 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 2978 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
2778 } | 2979 } |
| 2980 // -- start List<Node> mixins. |
| 2981 // Node is the element type. |
| 2982 |
| 2983 // From Iterable<Node>: |
| 2984 |
| 2985 Iterator<Node> iterator() { |
| 2986 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 2987 // be cached in both iterator _and_ forEach method. For now caching it |
| 2988 // for consistency. |
| 2989 return new _FixedSizeListIterator<Node>(this); |
| 2990 } |
| 2991 |
| 2992 // From Collection<Node>: |
| 2993 |
| 2994 void add(Node value) { |
| 2995 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 2996 } |
| 2997 |
| 2998 void addLast(Node value) { |
| 2999 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 3000 } |
| 3001 |
| 3002 void addAll(Collection<Node> collection) { |
| 3003 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 3004 } |
| 3005 |
| 3006 void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| 3007 |
| 3008 Collection map(f(Node element)) => _Collections.map(this, [], f); |
| 3009 |
| 3010 Collection<Node> filter(bool f(Node element)) => |
| 3011 _Collections.filter(this, <Node>[], f); |
| 3012 |
| 3013 bool every(bool f(Node element)) => _Collections.every(this, f); |
| 3014 |
| 3015 bool some(bool f(Node element)) => _Collections.some(this, f); |
| 3016 |
| 3017 bool isEmpty() => this.length == 0; |
| 3018 |
| 3019 // From List<Node>: |
| 3020 |
| 3021 void sort(int compare(Node a, Node b)) { |
| 3022 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 3023 } |
| 3024 |
| 3025 int indexOf(Node element, [int start = 0]) => |
| 3026 _Lists.indexOf(this, element, start, this.length); |
| 3027 |
| 3028 int lastIndexOf(Node element, [int start = 0]) => |
| 3029 _Lists.lastIndexOf(this, element, start); |
| 3030 |
| 3031 Node last() => this[length - 1]; |
| 3032 |
| 3033 // FIXME: implement thesee. |
| 3034 void setRange(int start, int length, List<Node> from, [int startFrom]) { |
| 3035 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 3036 } |
| 3037 void removeRange(int start, int length) { |
| 3038 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 3039 } |
| 3040 void insertRange(int start, int length, [Node initialValue]) { |
| 3041 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 3042 } |
| 3043 List<Node> getRange(int start, int length) => |
| 3044 _Lists.getRange(this, start, length, <Node>[]); |
| 3045 |
| 3046 // -- end List<Node> mixins. |
2779 | 3047 |
2780 NodeJs item(int index) native; | 3048 NodeJs item(int index) native; |
2781 | 3049 |
2782 NodeJs namedItem(String name) native; | 3050 NodeJs namedItem(String name) native; |
2783 } | 3051 } |
2784 | 3052 |
2785 class HTMLDListElementJs extends HTMLElementJs implements HTMLDListElement nativ
e "*HTMLDListElement" { | 3053 class HTMLDListElementJs extends HTMLElementJs implements HTMLDListElement nativ
e "*HTMLDListElement" { |
2786 | 3054 |
2787 bool get compact() native "return this.compact;"; | 3055 bool get compact() native "return this.compact;"; |
2788 | 3056 |
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5108 factory Int16Array.fromList(List<int> list) => _construct(list); | 5376 factory Int16Array.fromList(List<int> list) => _construct(list); |
5109 | 5377 |
5110 factory Int16Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 5378 factory Int16Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
5111 | 5379 |
5112 static _construct(arg) native 'return new Int16Array(arg);'; | 5380 static _construct(arg) native 'return new Int16Array(arg);'; |
5113 | 5381 |
5114 static final int BYTES_PER_ELEMENT = 2; | 5382 static final int BYTES_PER_ELEMENT = 2; |
5115 | 5383 |
5116 int get length() native "return this.length;"; | 5384 int get length() native "return this.length;"; |
5117 | 5385 |
5118 int operator[](int index) native; | 5386 int operator[](int index) native "return this[index];"; |
5119 | 5387 |
5120 void operator[]=(int index, int value) native; | 5388 void operator[]=(int index, int value) native "this[index] = value"; |
| 5389 // -- start List<int> mixins. |
| 5390 // int is the element type. |
| 5391 |
| 5392 // From Iterable<int>: |
| 5393 |
| 5394 Iterator<int> iterator() { |
| 5395 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 5396 // be cached in both iterator _and_ forEach method. For now caching it |
| 5397 // for consistency. |
| 5398 return new _FixedSizeListIterator<int>(this); |
| 5399 } |
| 5400 |
| 5401 // From Collection<int>: |
| 5402 |
| 5403 void add(int value) { |
| 5404 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5405 } |
| 5406 |
| 5407 void addLast(int value) { |
| 5408 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5409 } |
| 5410 |
| 5411 void addAll(Collection<int> collection) { |
| 5412 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5413 } |
| 5414 |
| 5415 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 5416 |
| 5417 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 5418 |
| 5419 Collection<int> filter(bool f(int element)) => |
| 5420 _Collections.filter(this, <int>[], f); |
| 5421 |
| 5422 bool every(bool f(int element)) => _Collections.every(this, f); |
| 5423 |
| 5424 bool some(bool f(int element)) => _Collections.some(this, f); |
| 5425 |
| 5426 bool isEmpty() => this.length == 0; |
| 5427 |
| 5428 // From List<int>: |
| 5429 |
| 5430 void sort(int compare(int a, int b)) { |
| 5431 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 5432 } |
| 5433 |
| 5434 int indexOf(int element, [int start = 0]) => |
| 5435 _Lists.indexOf(this, element, start, this.length); |
| 5436 |
| 5437 int lastIndexOf(int element, [int start = 0]) => |
| 5438 _Lists.lastIndexOf(this, element, start); |
| 5439 |
| 5440 int last() => this[length - 1]; |
| 5441 |
| 5442 // FIXME: implement thesee. |
| 5443 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 5444 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 5445 } |
| 5446 void removeRange(int start, int length) { |
| 5447 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 5448 } |
| 5449 void insertRange(int start, int length, [int initialValue]) { |
| 5450 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 5451 } |
| 5452 List<int> getRange(int start, int length) => |
| 5453 _Lists.getRange(this, start, length, <int>[]); |
| 5454 |
| 5455 // -- end List<int> mixins. |
5121 | 5456 |
5122 void setElements(Object array, [int offset = null]) native; | 5457 void setElements(Object array, [int offset = null]) native; |
5123 | 5458 |
5124 Int16ArrayJs subarray(int start, [int end = null]) native; | 5459 Int16ArrayJs subarray(int start, [int end = null]) native; |
5125 } | 5460 } |
5126 | 5461 |
5127 class Int32ArrayJs extends ArrayBufferViewJs implements Int32Array, List<int> na
tive "*Int32Array" { | 5462 class Int32ArrayJs extends ArrayBufferViewJs implements Int32Array, List<int> na
tive "*Int32Array" { |
5128 | 5463 |
5129 factory Int32Array(int length) => _construct(length); | 5464 factory Int32Array(int length) => _construct(length); |
5130 | 5465 |
5131 factory Int32Array.fromList(List<int> list) => _construct(list); | 5466 factory Int32Array.fromList(List<int> list) => _construct(list); |
5132 | 5467 |
5133 factory Int32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 5468 factory Int32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
5134 | 5469 |
5135 static _construct(arg) native 'return new Int32Array(arg);'; | 5470 static _construct(arg) native 'return new Int32Array(arg);'; |
5136 | 5471 |
5137 static final int BYTES_PER_ELEMENT = 4; | 5472 static final int BYTES_PER_ELEMENT = 4; |
5138 | 5473 |
5139 int get length() native "return this.length;"; | 5474 int get length() native "return this.length;"; |
5140 | 5475 |
5141 int operator[](int index) native; | 5476 int operator[](int index) native "return this[index];"; |
5142 | 5477 |
5143 void operator[]=(int index, int value) native; | 5478 void operator[]=(int index, int value) native "this[index] = value"; |
| 5479 // -- start List<int> mixins. |
| 5480 // int is the element type. |
| 5481 |
| 5482 // From Iterable<int>: |
| 5483 |
| 5484 Iterator<int> iterator() { |
| 5485 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 5486 // be cached in both iterator _and_ forEach method. For now caching it |
| 5487 // for consistency. |
| 5488 return new _FixedSizeListIterator<int>(this); |
| 5489 } |
| 5490 |
| 5491 // From Collection<int>: |
| 5492 |
| 5493 void add(int value) { |
| 5494 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5495 } |
| 5496 |
| 5497 void addLast(int value) { |
| 5498 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5499 } |
| 5500 |
| 5501 void addAll(Collection<int> collection) { |
| 5502 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5503 } |
| 5504 |
| 5505 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 5506 |
| 5507 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 5508 |
| 5509 Collection<int> filter(bool f(int element)) => |
| 5510 _Collections.filter(this, <int>[], f); |
| 5511 |
| 5512 bool every(bool f(int element)) => _Collections.every(this, f); |
| 5513 |
| 5514 bool some(bool f(int element)) => _Collections.some(this, f); |
| 5515 |
| 5516 bool isEmpty() => this.length == 0; |
| 5517 |
| 5518 // From List<int>: |
| 5519 |
| 5520 void sort(int compare(int a, int b)) { |
| 5521 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 5522 } |
| 5523 |
| 5524 int indexOf(int element, [int start = 0]) => |
| 5525 _Lists.indexOf(this, element, start, this.length); |
| 5526 |
| 5527 int lastIndexOf(int element, [int start = 0]) => |
| 5528 _Lists.lastIndexOf(this, element, start); |
| 5529 |
| 5530 int last() => this[length - 1]; |
| 5531 |
| 5532 // FIXME: implement thesee. |
| 5533 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 5534 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 5535 } |
| 5536 void removeRange(int start, int length) { |
| 5537 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 5538 } |
| 5539 void insertRange(int start, int length, [int initialValue]) { |
| 5540 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 5541 } |
| 5542 List<int> getRange(int start, int length) => |
| 5543 _Lists.getRange(this, start, length, <int>[]); |
| 5544 |
| 5545 // -- end List<int> mixins. |
5144 | 5546 |
5145 void setElements(Object array, [int offset = null]) native; | 5547 void setElements(Object array, [int offset = null]) native; |
5146 | 5548 |
5147 Int32ArrayJs subarray(int start, [int end = null]) native; | 5549 Int32ArrayJs subarray(int start, [int end = null]) native; |
5148 } | 5550 } |
5149 | 5551 |
5150 class Int8ArrayJs extends ArrayBufferViewJs implements Int8Array, List<int> nati
ve "*Int8Array" { | 5552 class Int8ArrayJs extends ArrayBufferViewJs implements Int8Array, List<int> nati
ve "*Int8Array" { |
5151 | 5553 |
5152 factory Int8Array(int length) => _construct(length); | 5554 factory Int8Array(int length) => _construct(length); |
5153 | 5555 |
5154 factory Int8Array.fromList(List<int> list) => _construct(list); | 5556 factory Int8Array.fromList(List<int> list) => _construct(list); |
5155 | 5557 |
5156 factory Int8Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 5558 factory Int8Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
5157 | 5559 |
5158 static _construct(arg) native 'return new Int8Array(arg);'; | 5560 static _construct(arg) native 'return new Int8Array(arg);'; |
5159 | 5561 |
5160 static final int BYTES_PER_ELEMENT = 1; | 5562 static final int BYTES_PER_ELEMENT = 1; |
5161 | 5563 |
5162 int get length() native "return this.length;"; | 5564 int get length() native "return this.length;"; |
5163 | 5565 |
5164 int operator[](int index) native; | 5566 int operator[](int index) native "return this[index];"; |
5165 | 5567 |
5166 void operator[]=(int index, int value) native; | 5568 void operator[]=(int index, int value) native "this[index] = value"; |
| 5569 // -- start List<int> mixins. |
| 5570 // int is the element type. |
| 5571 |
| 5572 // From Iterable<int>: |
| 5573 |
| 5574 Iterator<int> iterator() { |
| 5575 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 5576 // be cached in both iterator _and_ forEach method. For now caching it |
| 5577 // for consistency. |
| 5578 return new _FixedSizeListIterator<int>(this); |
| 5579 } |
| 5580 |
| 5581 // From Collection<int>: |
| 5582 |
| 5583 void add(int value) { |
| 5584 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5585 } |
| 5586 |
| 5587 void addLast(int value) { |
| 5588 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5589 } |
| 5590 |
| 5591 void addAll(Collection<int> collection) { |
| 5592 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5593 } |
| 5594 |
| 5595 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 5596 |
| 5597 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 5598 |
| 5599 Collection<int> filter(bool f(int element)) => |
| 5600 _Collections.filter(this, <int>[], f); |
| 5601 |
| 5602 bool every(bool f(int element)) => _Collections.every(this, f); |
| 5603 |
| 5604 bool some(bool f(int element)) => _Collections.some(this, f); |
| 5605 |
| 5606 bool isEmpty() => this.length == 0; |
| 5607 |
| 5608 // From List<int>: |
| 5609 |
| 5610 void sort(int compare(int a, int b)) { |
| 5611 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 5612 } |
| 5613 |
| 5614 int indexOf(int element, [int start = 0]) => |
| 5615 _Lists.indexOf(this, element, start, this.length); |
| 5616 |
| 5617 int lastIndexOf(int element, [int start = 0]) => |
| 5618 _Lists.lastIndexOf(this, element, start); |
| 5619 |
| 5620 int last() => this[length - 1]; |
| 5621 |
| 5622 // FIXME: implement thesee. |
| 5623 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 5624 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 5625 } |
| 5626 void removeRange(int start, int length) { |
| 5627 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 5628 } |
| 5629 void insertRange(int start, int length, [int initialValue]) { |
| 5630 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 5631 } |
| 5632 List<int> getRange(int start, int length) => |
| 5633 _Lists.getRange(this, start, length, <int>[]); |
| 5634 |
| 5635 // -- end List<int> mixins. |
5167 | 5636 |
5168 void setElements(Object array, [int offset = null]) native; | 5637 void setElements(Object array, [int offset = null]) native; |
5169 | 5638 |
5170 Int8ArrayJs subarray(int start, [int end = null]) native; | 5639 Int8ArrayJs subarray(int start, [int end = null]) native; |
5171 } | 5640 } |
5172 | 5641 |
5173 class JavaScriptAudioNodeJs extends AudioNodeJs implements JavaScriptAudioNode n
ative "*JavaScriptAudioNode" { | 5642 class JavaScriptAudioNodeJs extends AudioNodeJs implements JavaScriptAudioNode n
ative "*JavaScriptAudioNode" { |
5174 | 5643 |
5175 int get bufferSize() native "return this.bufferSize;"; | 5644 int get bufferSize() native "return this.bufferSize;"; |
5176 | 5645 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5343 } | 5812 } |
5344 | 5813 |
5345 class MediaListJs extends DOMTypeJs implements MediaList native "*MediaList" { | 5814 class MediaListJs extends DOMTypeJs implements MediaList native "*MediaList" { |
5346 | 5815 |
5347 int get length() native "return this.length;"; | 5816 int get length() native "return this.length;"; |
5348 | 5817 |
5349 String get mediaText() native "return this.mediaText;"; | 5818 String get mediaText() native "return this.mediaText;"; |
5350 | 5819 |
5351 void set mediaText(String value) native "this.mediaText = value;"; | 5820 void set mediaText(String value) native "this.mediaText = value;"; |
5352 | 5821 |
5353 String operator[](int index) native; | 5822 String operator[](int index) native "return this[index];"; |
5354 | 5823 |
5355 void operator[]=(int index, String value) { | 5824 void operator[]=(int index, String value) { |
5356 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 5825 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
5357 } | 5826 } |
| 5827 // -- start List<String> mixins. |
| 5828 // String is the element type. |
| 5829 |
| 5830 // From Iterable<String>: |
| 5831 |
| 5832 Iterator<String> iterator() { |
| 5833 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 5834 // be cached in both iterator _and_ forEach method. For now caching it |
| 5835 // for consistency. |
| 5836 return new _FixedSizeListIterator<String>(this); |
| 5837 } |
| 5838 |
| 5839 // From Collection<String>: |
| 5840 |
| 5841 void add(String value) { |
| 5842 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5843 } |
| 5844 |
| 5845 void addLast(String value) { |
| 5846 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5847 } |
| 5848 |
| 5849 void addAll(Collection<String> collection) { |
| 5850 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 5851 } |
| 5852 |
| 5853 void forEach(void f(String element)) => _Collections.forEach(this, f); |
| 5854 |
| 5855 Collection map(f(String element)) => _Collections.map(this, [], f); |
| 5856 |
| 5857 Collection<String> filter(bool f(String element)) => |
| 5858 _Collections.filter(this, <String>[], f); |
| 5859 |
| 5860 bool every(bool f(String element)) => _Collections.every(this, f); |
| 5861 |
| 5862 bool some(bool f(String element)) => _Collections.some(this, f); |
| 5863 |
| 5864 bool isEmpty() => this.length == 0; |
| 5865 |
| 5866 // From List<String>: |
| 5867 |
| 5868 void sort(int compare(String a, String b)) { |
| 5869 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 5870 } |
| 5871 |
| 5872 int indexOf(String element, [int start = 0]) => |
| 5873 _Lists.indexOf(this, element, start, this.length); |
| 5874 |
| 5875 int lastIndexOf(String element, [int start = 0]) => |
| 5876 _Lists.lastIndexOf(this, element, start); |
| 5877 |
| 5878 String last() => this[length - 1]; |
| 5879 |
| 5880 // FIXME: implement thesee. |
| 5881 void setRange(int start, int length, List<String> from, [int startFrom]) { |
| 5882 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 5883 } |
| 5884 void removeRange(int start, int length) { |
| 5885 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 5886 } |
| 5887 void insertRange(int start, int length, [String initialValue]) { |
| 5888 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 5889 } |
| 5890 List<String> getRange(int start, int length) => |
| 5891 _Lists.getRange(this, start, length, <String>[]); |
| 5892 |
| 5893 // -- end List<String> mixins. |
5358 | 5894 |
5359 void appendMedium(String newMedium) native; | 5895 void appendMedium(String newMedium) native; |
5360 | 5896 |
5361 void deleteMedium(String oldMedium) native; | 5897 void deleteMedium(String oldMedium) native; |
5362 | 5898 |
5363 String item(int index) native; | 5899 String item(int index) native; |
5364 } | 5900 } |
5365 | 5901 |
5366 class MediaQueryListJs extends DOMTypeJs implements MediaQueryList native "*Medi
aQueryList" { | 5902 class MediaQueryListJs extends DOMTypeJs implements MediaQueryList native "*Medi
aQueryList" { |
5367 | 5903 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5519 | 6055 |
5520 NodeJs get target() native "return this.target;"; | 6056 NodeJs get target() native "return this.target;"; |
5521 | 6057 |
5522 String get type() native "return this.type;"; | 6058 String get type() native "return this.type;"; |
5523 } | 6059 } |
5524 | 6060 |
5525 class NamedNodeMapJs extends DOMTypeJs implements NamedNodeMap native "*NamedNod
eMap" { | 6061 class NamedNodeMapJs extends DOMTypeJs implements NamedNodeMap native "*NamedNod
eMap" { |
5526 | 6062 |
5527 int get length() native "return this.length;"; | 6063 int get length() native "return this.length;"; |
5528 | 6064 |
5529 NodeJs operator[](int index) native; | 6065 NodeJs operator[](int index) native "return this[index];"; |
5530 | 6066 |
5531 void operator[]=(int index, NodeJs value) { | 6067 void operator[]=(int index, NodeJs value) { |
5532 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 6068 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
5533 } | 6069 } |
| 6070 // -- start List<Node> mixins. |
| 6071 // Node is the element type. |
| 6072 |
| 6073 // From Iterable<Node>: |
| 6074 |
| 6075 Iterator<Node> iterator() { |
| 6076 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 6077 // be cached in both iterator _and_ forEach method. For now caching it |
| 6078 // for consistency. |
| 6079 return new _FixedSizeListIterator<Node>(this); |
| 6080 } |
| 6081 |
| 6082 // From Collection<Node>: |
| 6083 |
| 6084 void add(Node value) { |
| 6085 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6086 } |
| 6087 |
| 6088 void addLast(Node value) { |
| 6089 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6090 } |
| 6091 |
| 6092 void addAll(Collection<Node> collection) { |
| 6093 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6094 } |
| 6095 |
| 6096 void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| 6097 |
| 6098 Collection map(f(Node element)) => _Collections.map(this, [], f); |
| 6099 |
| 6100 Collection<Node> filter(bool f(Node element)) => |
| 6101 _Collections.filter(this, <Node>[], f); |
| 6102 |
| 6103 bool every(bool f(Node element)) => _Collections.every(this, f); |
| 6104 |
| 6105 bool some(bool f(Node element)) => _Collections.some(this, f); |
| 6106 |
| 6107 bool isEmpty() => this.length == 0; |
| 6108 |
| 6109 // From List<Node>: |
| 6110 |
| 6111 void sort(int compare(Node a, Node b)) { |
| 6112 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 6113 } |
| 6114 |
| 6115 int indexOf(Node element, [int start = 0]) => |
| 6116 _Lists.indexOf(this, element, start, this.length); |
| 6117 |
| 6118 int lastIndexOf(Node element, [int start = 0]) => |
| 6119 _Lists.lastIndexOf(this, element, start); |
| 6120 |
| 6121 Node last() => this[length - 1]; |
| 6122 |
| 6123 // FIXME: implement thesee. |
| 6124 void setRange(int start, int length, List<Node> from, [int startFrom]) { |
| 6125 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 6126 } |
| 6127 void removeRange(int start, int length) { |
| 6128 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 6129 } |
| 6130 void insertRange(int start, int length, [Node initialValue]) { |
| 6131 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 6132 } |
| 6133 List<Node> getRange(int start, int length) => |
| 6134 _Lists.getRange(this, start, length, <Node>[]); |
| 6135 |
| 6136 // -- end List<Node> mixins. |
5534 | 6137 |
5535 NodeJs getNamedItem(String name) native; | 6138 NodeJs getNamedItem(String name) native; |
5536 | 6139 |
5537 NodeJs getNamedItemNS(String namespaceURI, String localName) native; | 6140 NodeJs getNamedItemNS(String namespaceURI, String localName) native; |
5538 | 6141 |
5539 NodeJs item(int index) native; | 6142 NodeJs item(int index) native; |
5540 | 6143 |
5541 NodeJs removeNamedItem(String name) native; | 6144 NodeJs removeNamedItem(String name) native; |
5542 | 6145 |
5543 NodeJs removeNamedItemNS(String namespaceURI, String localName) native; | 6146 NodeJs removeNamedItemNS(String namespaceURI, String localName) native; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5758 | 6361 |
5759 NodeJs nextNode() native; | 6362 NodeJs nextNode() native; |
5760 | 6363 |
5761 NodeJs previousNode() native; | 6364 NodeJs previousNode() native; |
5762 } | 6365 } |
5763 | 6366 |
5764 class NodeListJs extends DOMTypeJs implements NodeList native "*NodeList" { | 6367 class NodeListJs extends DOMTypeJs implements NodeList native "*NodeList" { |
5765 | 6368 |
5766 int get length() native "return this.length;"; | 6369 int get length() native "return this.length;"; |
5767 | 6370 |
5768 NodeJs operator[](int index) native; | 6371 NodeJs operator[](int index) native "return this[index];"; |
5769 | 6372 |
5770 void operator[]=(int index, NodeJs value) { | 6373 void operator[]=(int index, NodeJs value) { |
5771 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 6374 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
5772 } | 6375 } |
| 6376 // -- start List<Node> mixins. |
| 6377 // Node is the element type. |
| 6378 |
| 6379 // From Iterable<Node>: |
| 6380 |
| 6381 Iterator<Node> iterator() { |
| 6382 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 6383 // be cached in both iterator _and_ forEach method. For now caching it |
| 6384 // for consistency. |
| 6385 return new _FixedSizeListIterator<Node>(this); |
| 6386 } |
| 6387 |
| 6388 // From Collection<Node>: |
| 6389 |
| 6390 void add(Node value) { |
| 6391 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6392 } |
| 6393 |
| 6394 void addLast(Node value) { |
| 6395 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6396 } |
| 6397 |
| 6398 void addAll(Collection<Node> collection) { |
| 6399 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 6400 } |
| 6401 |
| 6402 void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| 6403 |
| 6404 Collection map(f(Node element)) => _Collections.map(this, [], f); |
| 6405 |
| 6406 Collection<Node> filter(bool f(Node element)) => |
| 6407 _Collections.filter(this, <Node>[], f); |
| 6408 |
| 6409 bool every(bool f(Node element)) => _Collections.every(this, f); |
| 6410 |
| 6411 bool some(bool f(Node element)) => _Collections.some(this, f); |
| 6412 |
| 6413 bool isEmpty() => this.length == 0; |
| 6414 |
| 6415 // From List<Node>: |
| 6416 |
| 6417 void sort(int compare(Node a, Node b)) { |
| 6418 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 6419 } |
| 6420 |
| 6421 int indexOf(Node element, [int start = 0]) => |
| 6422 _Lists.indexOf(this, element, start, this.length); |
| 6423 |
| 6424 int lastIndexOf(Node element, [int start = 0]) => |
| 6425 _Lists.lastIndexOf(this, element, start); |
| 6426 |
| 6427 Node last() => this[length - 1]; |
| 6428 |
| 6429 // FIXME: implement thesee. |
| 6430 void setRange(int start, int length, List<Node> from, [int startFrom]) { |
| 6431 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 6432 } |
| 6433 void removeRange(int start, int length) { |
| 6434 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 6435 } |
| 6436 void insertRange(int start, int length, [Node initialValue]) { |
| 6437 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 6438 } |
| 6439 List<Node> getRange(int start, int length) => |
| 6440 _Lists.getRange(this, start, length, <Node>[]); |
| 6441 |
| 6442 // -- end List<Node> mixins. |
5773 | 6443 |
5774 NodeJs item(int index) native; | 6444 NodeJs item(int index) native; |
5775 } | 6445 } |
5776 | 6446 |
5777 class NodeSelectorJs extends DOMTypeJs implements NodeSelector native "*NodeSele
ctor" { | 6447 class NodeSelectorJs extends DOMTypeJs implements NodeSelector native "*NodeSele
ctor" { |
5778 | 6448 |
5779 ElementJs querySelector(String selectors) native; | 6449 ElementJs querySelector(String selectors) native; |
5780 | 6450 |
5781 NodeListJs querySelectorAll(String selectors) native; | 6451 NodeListJs querySelectorAll(String selectors) native; |
5782 } | 6452 } |
(...skipping 4157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9940 | 10610 |
9941 String get title() native "return this.title;"; | 10611 String get title() native "return this.title;"; |
9942 | 10612 |
9943 String get type() native "return this.type;"; | 10613 String get type() native "return this.type;"; |
9944 } | 10614 } |
9945 | 10615 |
9946 class StyleSheetListJs extends DOMTypeJs implements StyleSheetList native "*Styl
eSheetList" { | 10616 class StyleSheetListJs extends DOMTypeJs implements StyleSheetList native "*Styl
eSheetList" { |
9947 | 10617 |
9948 int get length() native "return this.length;"; | 10618 int get length() native "return this.length;"; |
9949 | 10619 |
9950 StyleSheetJs operator[](int index) native; | 10620 StyleSheetJs operator[](int index) native "return this[index];"; |
9951 | 10621 |
9952 void operator[]=(int index, StyleSheetJs value) { | 10622 void operator[]=(int index, StyleSheetJs value) { |
9953 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 10623 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
9954 } | 10624 } |
| 10625 // -- start List<StyleSheet> mixins. |
| 10626 // StyleSheet is the element type. |
| 10627 |
| 10628 // From Iterable<StyleSheet>: |
| 10629 |
| 10630 Iterator<StyleSheet> iterator() { |
| 10631 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 10632 // be cached in both iterator _and_ forEach method. For now caching it |
| 10633 // for consistency. |
| 10634 return new _FixedSizeListIterator<StyleSheet>(this); |
| 10635 } |
| 10636 |
| 10637 // From Collection<StyleSheet>: |
| 10638 |
| 10639 void add(StyleSheet value) { |
| 10640 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10641 } |
| 10642 |
| 10643 void addLast(StyleSheet value) { |
| 10644 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10645 } |
| 10646 |
| 10647 void addAll(Collection<StyleSheet> collection) { |
| 10648 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10649 } |
| 10650 |
| 10651 void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f); |
| 10652 |
| 10653 Collection map(f(StyleSheet element)) => _Collections.map(this, [], f); |
| 10654 |
| 10655 Collection<StyleSheet> filter(bool f(StyleSheet element)) => |
| 10656 _Collections.filter(this, <StyleSheet>[], f); |
| 10657 |
| 10658 bool every(bool f(StyleSheet element)) => _Collections.every(this, f); |
| 10659 |
| 10660 bool some(bool f(StyleSheet element)) => _Collections.some(this, f); |
| 10661 |
| 10662 bool isEmpty() => this.length == 0; |
| 10663 |
| 10664 // From List<StyleSheet>: |
| 10665 |
| 10666 void sort(int compare(StyleSheet a, StyleSheet b)) { |
| 10667 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 10668 } |
| 10669 |
| 10670 int indexOf(StyleSheet element, [int start = 0]) => |
| 10671 _Lists.indexOf(this, element, start, this.length); |
| 10672 |
| 10673 int lastIndexOf(StyleSheet element, [int start = 0]) => |
| 10674 _Lists.lastIndexOf(this, element, start); |
| 10675 |
| 10676 StyleSheet last() => this[length - 1]; |
| 10677 |
| 10678 // FIXME: implement thesee. |
| 10679 void setRange(int start, int length, List<StyleSheet> from, [int startFrom]) { |
| 10680 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 10681 } |
| 10682 void removeRange(int start, int length) { |
| 10683 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 10684 } |
| 10685 void insertRange(int start, int length, [StyleSheet initialValue]) { |
| 10686 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 10687 } |
| 10688 List<StyleSheet> getRange(int start, int length) => |
| 10689 _Lists.getRange(this, start, length, <StyleSheet>[]); |
| 10690 |
| 10691 // -- end List<StyleSheet> mixins. |
9955 | 10692 |
9956 StyleSheetJs item(int index) native; | 10693 StyleSheetJs item(int index) native; |
9957 } | 10694 } |
9958 | 10695 |
9959 class TextJs extends CharacterDataJs implements Text native "*Text" { | 10696 class TextJs extends CharacterDataJs implements Text native "*Text" { |
9960 | 10697 |
9961 String get wholeText() native "return this.wholeText;"; | 10698 String get wholeText() native "return this.wholeText;"; |
9962 | 10699 |
9963 TextJs replaceWholeText(String content) native; | 10700 TextJs replaceWholeText(String content) native; |
9964 | 10701 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10157 | 10894 |
10158 TouchListJs get touches() native "return this.touches;"; | 10895 TouchListJs get touches() native "return this.touches;"; |
10159 | 10896 |
10160 void initTouchEvent(TouchListJs touches, TouchListJs targetTouches, TouchListJ
s changedTouches, String type, DOMWindowJs view, int screenX, int screenY, int c
lientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) nat
ive; | 10897 void initTouchEvent(TouchListJs touches, TouchListJs targetTouches, TouchListJ
s changedTouches, String type, DOMWindowJs view, int screenX, int screenY, int c
lientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) nat
ive; |
10161 } | 10898 } |
10162 | 10899 |
10163 class TouchListJs extends DOMTypeJs implements TouchList native "*TouchList" { | 10900 class TouchListJs extends DOMTypeJs implements TouchList native "*TouchList" { |
10164 | 10901 |
10165 int get length() native "return this.length;"; | 10902 int get length() native "return this.length;"; |
10166 | 10903 |
10167 TouchJs operator[](int index) native; | 10904 TouchJs operator[](int index) native "return this[index];"; |
10168 | 10905 |
10169 void operator[]=(int index, TouchJs value) { | 10906 void operator[]=(int index, TouchJs value) { |
10170 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 10907 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); |
10171 } | 10908 } |
| 10909 // -- start List<Touch> mixins. |
| 10910 // Touch is the element type. |
| 10911 |
| 10912 // From Iterable<Touch>: |
| 10913 |
| 10914 Iterator<Touch> iterator() { |
| 10915 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 10916 // be cached in both iterator _and_ forEach method. For now caching it |
| 10917 // for consistency. |
| 10918 return new _FixedSizeListIterator<Touch>(this); |
| 10919 } |
| 10920 |
| 10921 // From Collection<Touch>: |
| 10922 |
| 10923 void add(Touch value) { |
| 10924 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10925 } |
| 10926 |
| 10927 void addLast(Touch value) { |
| 10928 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10929 } |
| 10930 |
| 10931 void addAll(Collection<Touch> collection) { |
| 10932 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 10933 } |
| 10934 |
| 10935 void forEach(void f(Touch element)) => _Collections.forEach(this, f); |
| 10936 |
| 10937 Collection map(f(Touch element)) => _Collections.map(this, [], f); |
| 10938 |
| 10939 Collection<Touch> filter(bool f(Touch element)) => |
| 10940 _Collections.filter(this, <Touch>[], f); |
| 10941 |
| 10942 bool every(bool f(Touch element)) => _Collections.every(this, f); |
| 10943 |
| 10944 bool some(bool f(Touch element)) => _Collections.some(this, f); |
| 10945 |
| 10946 bool isEmpty() => this.length == 0; |
| 10947 |
| 10948 // From List<Touch>: |
| 10949 |
| 10950 void sort(int compare(Touch a, Touch b)) { |
| 10951 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 10952 } |
| 10953 |
| 10954 int indexOf(Touch element, [int start = 0]) => |
| 10955 _Lists.indexOf(this, element, start, this.length); |
| 10956 |
| 10957 int lastIndexOf(Touch element, [int start = 0]) => |
| 10958 _Lists.lastIndexOf(this, element, start); |
| 10959 |
| 10960 Touch last() => this[length - 1]; |
| 10961 |
| 10962 // FIXME: implement thesee. |
| 10963 void setRange(int start, int length, List<Touch> from, [int startFrom]) { |
| 10964 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 10965 } |
| 10966 void removeRange(int start, int length) { |
| 10967 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 10968 } |
| 10969 void insertRange(int start, int length, [Touch initialValue]) { |
| 10970 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 10971 } |
| 10972 List<Touch> getRange(int start, int length) => |
| 10973 _Lists.getRange(this, start, length, <Touch>[]); |
| 10974 |
| 10975 // -- end List<Touch> mixins. |
10172 | 10976 |
10173 TouchJs item(int index) native; | 10977 TouchJs item(int index) native; |
10174 } | 10978 } |
10175 | 10979 |
10176 class TrackEventJs extends EventJs implements TrackEvent native "*TrackEvent" { | 10980 class TrackEventJs extends EventJs implements TrackEvent native "*TrackEvent" { |
10177 | 10981 |
10178 Object get track() native "return this.track;"; | 10982 Object get track() native "return this.track;"; |
10179 } | 10983 } |
10180 | 10984 |
10181 class TreeWalkerJs extends DOMTypeJs implements TreeWalker native "*TreeWalker"
{ | 10985 class TreeWalkerJs extends DOMTypeJs implements TreeWalker native "*TreeWalker"
{ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10237 factory Uint16Array.fromList(List<int> list) => _construct(list); | 11041 factory Uint16Array.fromList(List<int> list) => _construct(list); |
10238 | 11042 |
10239 factory Uint16Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 11043 factory Uint16Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
10240 | 11044 |
10241 static _construct(arg) native 'return new Uint16Array(arg);'; | 11045 static _construct(arg) native 'return new Uint16Array(arg);'; |
10242 | 11046 |
10243 static final int BYTES_PER_ELEMENT = 2; | 11047 static final int BYTES_PER_ELEMENT = 2; |
10244 | 11048 |
10245 int get length() native "return this.length;"; | 11049 int get length() native "return this.length;"; |
10246 | 11050 |
10247 int operator[](int index) native; | 11051 int operator[](int index) native "return this[index];"; |
10248 | 11052 |
10249 void operator[]=(int index, int value) native; | 11053 void operator[]=(int index, int value) native "this[index] = value"; |
| 11054 // -- start List<int> mixins. |
| 11055 // int is the element type. |
| 11056 |
| 11057 // From Iterable<int>: |
| 11058 |
| 11059 Iterator<int> iterator() { |
| 11060 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 11061 // be cached in both iterator _and_ forEach method. For now caching it |
| 11062 // for consistency. |
| 11063 return new _FixedSizeListIterator<int>(this); |
| 11064 } |
| 11065 |
| 11066 // From Collection<int>: |
| 11067 |
| 11068 void add(int value) { |
| 11069 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11070 } |
| 11071 |
| 11072 void addLast(int value) { |
| 11073 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11074 } |
| 11075 |
| 11076 void addAll(Collection<int> collection) { |
| 11077 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11078 } |
| 11079 |
| 11080 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 11081 |
| 11082 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 11083 |
| 11084 Collection<int> filter(bool f(int element)) => |
| 11085 _Collections.filter(this, <int>[], f); |
| 11086 |
| 11087 bool every(bool f(int element)) => _Collections.every(this, f); |
| 11088 |
| 11089 bool some(bool f(int element)) => _Collections.some(this, f); |
| 11090 |
| 11091 bool isEmpty() => this.length == 0; |
| 11092 |
| 11093 // From List<int>: |
| 11094 |
| 11095 void sort(int compare(int a, int b)) { |
| 11096 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 11097 } |
| 11098 |
| 11099 int indexOf(int element, [int start = 0]) => |
| 11100 _Lists.indexOf(this, element, start, this.length); |
| 11101 |
| 11102 int lastIndexOf(int element, [int start = 0]) => |
| 11103 _Lists.lastIndexOf(this, element, start); |
| 11104 |
| 11105 int last() => this[length - 1]; |
| 11106 |
| 11107 // FIXME: implement thesee. |
| 11108 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 11109 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 11110 } |
| 11111 void removeRange(int start, int length) { |
| 11112 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 11113 } |
| 11114 void insertRange(int start, int length, [int initialValue]) { |
| 11115 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 11116 } |
| 11117 List<int> getRange(int start, int length) => |
| 11118 _Lists.getRange(this, start, length, <int>[]); |
| 11119 |
| 11120 // -- end List<int> mixins. |
10250 | 11121 |
10251 void setElements(Object array, [int offset = null]) native; | 11122 void setElements(Object array, [int offset = null]) native; |
10252 | 11123 |
10253 Uint16ArrayJs subarray(int start, [int end = null]) native; | 11124 Uint16ArrayJs subarray(int start, [int end = null]) native; |
10254 } | 11125 } |
10255 | 11126 |
10256 class Uint32ArrayJs extends ArrayBufferViewJs implements Uint32Array, List<int>
native "*Uint32Array" { | 11127 class Uint32ArrayJs extends ArrayBufferViewJs implements Uint32Array, List<int>
native "*Uint32Array" { |
10257 | 11128 |
10258 factory Uint32Array(int length) => _construct(length); | 11129 factory Uint32Array(int length) => _construct(length); |
10259 | 11130 |
10260 factory Uint32Array.fromList(List<int> list) => _construct(list); | 11131 factory Uint32Array.fromList(List<int> list) => _construct(list); |
10261 | 11132 |
10262 factory Uint32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 11133 factory Uint32Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
10263 | 11134 |
10264 static _construct(arg) native 'return new Uint32Array(arg);'; | 11135 static _construct(arg) native 'return new Uint32Array(arg);'; |
10265 | 11136 |
10266 static final int BYTES_PER_ELEMENT = 4; | 11137 static final int BYTES_PER_ELEMENT = 4; |
10267 | 11138 |
10268 int get length() native "return this.length;"; | 11139 int get length() native "return this.length;"; |
10269 | 11140 |
10270 int operator[](int index) native; | 11141 int operator[](int index) native "return this[index];"; |
10271 | 11142 |
10272 void operator[]=(int index, int value) native; | 11143 void operator[]=(int index, int value) native "this[index] = value"; |
| 11144 // -- start List<int> mixins. |
| 11145 // int is the element type. |
| 11146 |
| 11147 // From Iterable<int>: |
| 11148 |
| 11149 Iterator<int> iterator() { |
| 11150 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 11151 // be cached in both iterator _and_ forEach method. For now caching it |
| 11152 // for consistency. |
| 11153 return new _FixedSizeListIterator<int>(this); |
| 11154 } |
| 11155 |
| 11156 // From Collection<int>: |
| 11157 |
| 11158 void add(int value) { |
| 11159 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11160 } |
| 11161 |
| 11162 void addLast(int value) { |
| 11163 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11164 } |
| 11165 |
| 11166 void addAll(Collection<int> collection) { |
| 11167 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11168 } |
| 11169 |
| 11170 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 11171 |
| 11172 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 11173 |
| 11174 Collection<int> filter(bool f(int element)) => |
| 11175 _Collections.filter(this, <int>[], f); |
| 11176 |
| 11177 bool every(bool f(int element)) => _Collections.every(this, f); |
| 11178 |
| 11179 bool some(bool f(int element)) => _Collections.some(this, f); |
| 11180 |
| 11181 bool isEmpty() => this.length == 0; |
| 11182 |
| 11183 // From List<int>: |
| 11184 |
| 11185 void sort(int compare(int a, int b)) { |
| 11186 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 11187 } |
| 11188 |
| 11189 int indexOf(int element, [int start = 0]) => |
| 11190 _Lists.indexOf(this, element, start, this.length); |
| 11191 |
| 11192 int lastIndexOf(int element, [int start = 0]) => |
| 11193 _Lists.lastIndexOf(this, element, start); |
| 11194 |
| 11195 int last() => this[length - 1]; |
| 11196 |
| 11197 // FIXME: implement thesee. |
| 11198 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 11199 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 11200 } |
| 11201 void removeRange(int start, int length) { |
| 11202 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 11203 } |
| 11204 void insertRange(int start, int length, [int initialValue]) { |
| 11205 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 11206 } |
| 11207 List<int> getRange(int start, int length) => |
| 11208 _Lists.getRange(this, start, length, <int>[]); |
| 11209 |
| 11210 // -- end List<int> mixins. |
10273 | 11211 |
10274 void setElements(Object array, [int offset = null]) native; | 11212 void setElements(Object array, [int offset = null]) native; |
10275 | 11213 |
10276 Uint32ArrayJs subarray(int start, [int end = null]) native; | 11214 Uint32ArrayJs subarray(int start, [int end = null]) native; |
10277 } | 11215 } |
10278 | 11216 |
10279 class Uint8ArrayJs extends ArrayBufferViewJs implements Uint8Array, List<int> na
tive "*Uint8Array" { | 11217 class Uint8ArrayJs extends ArrayBufferViewJs implements Uint8Array, List<int> na
tive "*Uint8Array" { |
10280 | 11218 |
10281 factory Uint8Array(int length) => _construct(length); | 11219 factory Uint8Array(int length) => _construct(length); |
10282 | 11220 |
10283 factory Uint8Array.fromList(List<int> list) => _construct(list); | 11221 factory Uint8Array.fromList(List<int> list) => _construct(list); |
10284 | 11222 |
10285 factory Uint8Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); | 11223 factory Uint8Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer); |
10286 | 11224 |
10287 static _construct(arg) native 'return new Uint8Array(arg);'; | 11225 static _construct(arg) native 'return new Uint8Array(arg);'; |
10288 | 11226 |
10289 static final int BYTES_PER_ELEMENT = 1; | 11227 static final int BYTES_PER_ELEMENT = 1; |
10290 | 11228 |
10291 int get length() native "return this.length;"; | 11229 int get length() native "return this.length;"; |
10292 | 11230 |
10293 int operator[](int index) native; | 11231 int operator[](int index) native "return this[index];"; |
10294 | 11232 |
10295 void operator[]=(int index, int value) native; | 11233 void operator[]=(int index, int value) native "this[index] = value"; |
| 11234 // -- start List<int> mixins. |
| 11235 // int is the element type. |
| 11236 |
| 11237 // From Iterable<int>: |
| 11238 |
| 11239 Iterator<int> iterator() { |
| 11240 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 11241 // be cached in both iterator _and_ forEach method. For now caching it |
| 11242 // for consistency. |
| 11243 return new _FixedSizeListIterator<int>(this); |
| 11244 } |
| 11245 |
| 11246 // From Collection<int>: |
| 11247 |
| 11248 void add(int value) { |
| 11249 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11250 } |
| 11251 |
| 11252 void addLast(int value) { |
| 11253 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11254 } |
| 11255 |
| 11256 void addAll(Collection<int> collection) { |
| 11257 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 11258 } |
| 11259 |
| 11260 void forEach(void f(int element)) => _Collections.forEach(this, f); |
| 11261 |
| 11262 Collection map(f(int element)) => _Collections.map(this, [], f); |
| 11263 |
| 11264 Collection<int> filter(bool f(int element)) => |
| 11265 _Collections.filter(this, <int>[], f); |
| 11266 |
| 11267 bool every(bool f(int element)) => _Collections.every(this, f); |
| 11268 |
| 11269 bool some(bool f(int element)) => _Collections.some(this, f); |
| 11270 |
| 11271 bool isEmpty() => this.length == 0; |
| 11272 |
| 11273 // From List<int>: |
| 11274 |
| 11275 void sort(int compare(int a, int b)) { |
| 11276 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 11277 } |
| 11278 |
| 11279 int indexOf(int element, [int start = 0]) => |
| 11280 _Lists.indexOf(this, element, start, this.length); |
| 11281 |
| 11282 int lastIndexOf(int element, [int start = 0]) => |
| 11283 _Lists.lastIndexOf(this, element, start); |
| 11284 |
| 11285 int last() => this[length - 1]; |
| 11286 |
| 11287 // FIXME: implement thesee. |
| 11288 void setRange(int start, int length, List<int> from, [int startFrom]) { |
| 11289 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); |
| 11290 } |
| 11291 void removeRange(int start, int length) { |
| 11292 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
| 11293 } |
| 11294 void insertRange(int start, int length, [int initialValue]) { |
| 11295 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
| 11296 } |
| 11297 List<int> getRange(int start, int length) => |
| 11298 _Lists.getRange(this, start, length, <int>[]); |
| 11299 |
| 11300 // -- end List<int> mixins. |
10296 | 11301 |
10297 void setElements(Object array, [int offset = null]) native; | 11302 void setElements(Object array, [int offset = null]) native; |
10298 | 11303 |
10299 Uint8ArrayJs subarray(int start, [int end = null]) native; | 11304 Uint8ArrayJs subarray(int start, [int end = null]) native; |
10300 } | 11305 } |
10301 | 11306 |
10302 class ValidityStateJs extends DOMTypeJs implements ValidityState native "*Validi
tyState" { | 11307 class ValidityStateJs extends DOMTypeJs implements ValidityState native "*Validi
tyState" { |
10303 | 11308 |
10304 bool get customError() native "return this.customError;"; | 11309 bool get customError() native "return this.customError;"; |
10305 | 11310 |
(...skipping 15405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
25711 if (startIndex >= a.length) { | 26716 if (startIndex >= a.length) { |
25712 startIndex = a.length - 1; | 26717 startIndex = a.length - 1; |
25713 } | 26718 } |
25714 for (int i = startIndex; i >= 0; i--) { | 26719 for (int i = startIndex; i >= 0; i--) { |
25715 if (a[i] == element) { | 26720 if (a[i] == element) { |
25716 return i; | 26721 return i; |
25717 } | 26722 } |
25718 } | 26723 } |
25719 return -1; | 26724 return -1; |
25720 } | 26725 } |
| 26726 |
| 26727 /** |
| 26728 * Returns a sub list copy of this list, from [start] to |
| 26729 * [:start + length:]. |
| 26730 * Returns an empty list if [length] is 0. |
| 26731 * Throws an [IllegalArgumentException] if [length] is negative. |
| 26732 * Throws an [IndexOutOfRangeException] if [start] or |
| 26733 * [:start + length:] are out of range. |
| 26734 */ |
| 26735 static List getRange(List a, int start, int length, List accumulator) { |
| 26736 if (length < 0) throw new IllegalArgumentException('length'); |
| 26737 if (start < 0) throw new IndexOutOfRangeException(start); |
| 26738 int end = start + length; |
| 26739 if (end > a.length) throw new IndexOutOfRangeException(end); |
| 26740 for (int i = start; i < end; i++) { |
| 26741 accumulator.add(a[i]); |
| 26742 } |
| 26743 return accumulator; |
| 26744 } |
25721 } | 26745 } |
OLD | NEW |