OLD | NEW |
1 library html; | 1 library html; |
2 | 2 |
| 3 import 'dart:html_common'; |
3 import 'dart:isolate'; | 4 import 'dart:isolate'; |
4 import 'dart:json'; | 5 import 'dart:json'; |
5 import 'dart:svg' as svg; | 6 import 'dart:svg' as svg; |
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
7 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
8 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
9 | 10 |
10 // DO NOT EDIT | 11 // DO NOT EDIT |
11 // Auto-generated dart:html library. | 12 // Auto-generated dart:html library. |
12 | 13 |
(...skipping 5180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5193 /// @domName Clipboard; @docsEditable true | 5194 /// @domName Clipboard; @docsEditable true |
5194 class Clipboard native "*Clipboard" { | 5195 class Clipboard native "*Clipboard" { |
5195 | 5196 |
5196 /// @domName Clipboard.dropEffect; @docsEditable true | 5197 /// @domName Clipboard.dropEffect; @docsEditable true |
5197 String dropEffect; | 5198 String dropEffect; |
5198 | 5199 |
5199 /// @domName Clipboard.effectAllowed; @docsEditable true | 5200 /// @domName Clipboard.effectAllowed; @docsEditable true |
5200 String effectAllowed; | 5201 String effectAllowed; |
5201 | 5202 |
5202 /// @domName Clipboard.files; @docsEditable true | 5203 /// @domName Clipboard.files; @docsEditable true |
5203 @Returns('_FileList') @Creates('_FileList') | 5204 final FileList files; |
5204 final List<File> files; | |
5205 | 5205 |
5206 /// @domName Clipboard.items; @docsEditable true | 5206 /// @domName Clipboard.items; @docsEditable true |
5207 final DataTransferItemList items; | 5207 final DataTransferItemList items; |
5208 | 5208 |
5209 /// @domName Clipboard.types; @docsEditable true | 5209 /// @domName Clipboard.types; @docsEditable true |
5210 final List types; | 5210 final List types; |
5211 | 5211 |
5212 /// @domName Clipboard.clearData; @docsEditable true | 5212 /// @domName Clipboard.clearData; @docsEditable true |
5213 void clearData([String type]) native; | 5213 void clearData([String type]) native; |
5214 | 5214 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5708 } | 5708 } |
5709 | 5709 |
5710 void addLast(DOMMimeType value) { | 5710 void addLast(DOMMimeType value) { |
5711 throw new UnsupportedError("Cannot add to immutable List."); | 5711 throw new UnsupportedError("Cannot add to immutable List."); |
5712 } | 5712 } |
5713 | 5713 |
5714 void addAll(Collection<DOMMimeType> collection) { | 5714 void addAll(Collection<DOMMimeType> collection) { |
5715 throw new UnsupportedError("Cannot add to immutable List."); | 5715 throw new UnsupportedError("Cannot add to immutable List."); |
5716 } | 5716 } |
5717 | 5717 |
5718 bool contains(DOMMimeType element) => _Collections.contains(this, element); | 5718 bool contains(DOMMimeType element) => Collections.contains(this, element); |
5719 | 5719 |
5720 void forEach(void f(DOMMimeType element)) => _Collections.forEach(this, f); | 5720 void forEach(void f(DOMMimeType element)) => Collections.forEach(this, f); |
5721 | 5721 |
5722 Collection map(f(DOMMimeType element)) => _Collections.map(this, [], f); | 5722 Collection map(f(DOMMimeType element)) => Collections.map(this, [], f); |
5723 | 5723 |
5724 Collection<DOMMimeType> filter(bool f(DOMMimeType element)) => | 5724 Collection<DOMMimeType> filter(bool f(DOMMimeType element)) => |
5725 _Collections.filter(this, <DOMMimeType>[], f); | 5725 Collections.filter(this, <DOMMimeType>[], f); |
5726 | 5726 |
5727 bool every(bool f(DOMMimeType element)) => _Collections.every(this, f); | 5727 bool every(bool f(DOMMimeType element)) => Collections.every(this, f); |
5728 | 5728 |
5729 bool some(bool f(DOMMimeType element)) => _Collections.some(this, f); | 5729 bool some(bool f(DOMMimeType element)) => Collections.some(this, f); |
5730 | 5730 |
5731 bool get isEmpty => this.length == 0; | 5731 bool get isEmpty => this.length == 0; |
5732 | 5732 |
5733 // From List<DOMMimeType>: | 5733 // From List<DOMMimeType>: |
5734 | 5734 |
5735 void sort([Comparator<DOMMimeType> compare = Comparable.compare]) { | 5735 void sort([Comparator<DOMMimeType> compare = Comparable.compare]) { |
5736 throw new UnsupportedError("Cannot sort immutable List."); | 5736 throw new UnsupportedError("Cannot sort immutable List."); |
5737 } | 5737 } |
5738 | 5738 |
5739 int indexOf(DOMMimeType element, [int start = 0]) => | 5739 int indexOf(DOMMimeType element, [int start = 0]) => |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5849 } | 5849 } |
5850 | 5850 |
5851 void addLast(DOMPlugin value) { | 5851 void addLast(DOMPlugin value) { |
5852 throw new UnsupportedError("Cannot add to immutable List."); | 5852 throw new UnsupportedError("Cannot add to immutable List."); |
5853 } | 5853 } |
5854 | 5854 |
5855 void addAll(Collection<DOMPlugin> collection) { | 5855 void addAll(Collection<DOMPlugin> collection) { |
5856 throw new UnsupportedError("Cannot add to immutable List."); | 5856 throw new UnsupportedError("Cannot add to immutable List."); |
5857 } | 5857 } |
5858 | 5858 |
5859 bool contains(DOMPlugin element) => _Collections.contains(this, element); | 5859 bool contains(DOMPlugin element) => Collections.contains(this, element); |
5860 | 5860 |
5861 void forEach(void f(DOMPlugin element)) => _Collections.forEach(this, f); | 5861 void forEach(void f(DOMPlugin element)) => Collections.forEach(this, f); |
5862 | 5862 |
5863 Collection map(f(DOMPlugin element)) => _Collections.map(this, [], f); | 5863 Collection map(f(DOMPlugin element)) => Collections.map(this, [], f); |
5864 | 5864 |
5865 Collection<DOMPlugin> filter(bool f(DOMPlugin element)) => | 5865 Collection<DOMPlugin> filter(bool f(DOMPlugin element)) => |
5866 _Collections.filter(this, <DOMPlugin>[], f); | 5866 Collections.filter(this, <DOMPlugin>[], f); |
5867 | 5867 |
5868 bool every(bool f(DOMPlugin element)) => _Collections.every(this, f); | 5868 bool every(bool f(DOMPlugin element)) => Collections.every(this, f); |
5869 | 5869 |
5870 bool some(bool f(DOMPlugin element)) => _Collections.some(this, f); | 5870 bool some(bool f(DOMPlugin element)) => Collections.some(this, f); |
5871 | 5871 |
5872 bool get isEmpty => this.length == 0; | 5872 bool get isEmpty => this.length == 0; |
5873 | 5873 |
5874 // From List<DOMPlugin>: | 5874 // From List<DOMPlugin>: |
5875 | 5875 |
5876 void sort([Comparator<DOMPlugin> compare = Comparable.compare]) { | 5876 void sort([Comparator<DOMPlugin> compare = Comparable.compare]) { |
5877 throw new UnsupportedError("Cannot sort immutable List."); | 5877 throw new UnsupportedError("Cannot sort immutable List."); |
5878 } | 5878 } |
5879 | 5879 |
5880 int indexOf(DOMPlugin element, [int start = 0]) => | 5880 int indexOf(DOMPlugin element, [int start = 0]) => |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6228 /// @domName DedicatedWorkerContext; @docsEditable true | 6228 /// @domName DedicatedWorkerContext; @docsEditable true |
6229 class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerConte
xt" { | 6229 class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerConte
xt" { |
6230 | 6230 |
6231 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 6231 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
6232 DedicatedWorkerContextEvents get on => | 6232 DedicatedWorkerContextEvents get on => |
6233 new DedicatedWorkerContextEvents(this); | 6233 new DedicatedWorkerContextEvents(this); |
6234 | 6234 |
6235 /// @domName DedicatedWorkerContext.postMessage; @docsEditable true | 6235 /// @domName DedicatedWorkerContext.postMessage; @docsEditable true |
6236 void postMessage(/*any*/ message, [List messagePorts]) { | 6236 void postMessage(/*any*/ message, [List messagePorts]) { |
6237 if (?messagePorts) { | 6237 if (?messagePorts) { |
6238 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 6238 var message_1 = convertDartToNative_SerializedScriptValue(message); |
6239 _postMessage_1(message_1, messagePorts); | 6239 _postMessage_1(message_1, messagePorts); |
6240 return; | 6240 return; |
6241 } | 6241 } |
6242 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 6242 var message_2 = convertDartToNative_SerializedScriptValue(message); |
6243 _postMessage_2(message_2); | 6243 _postMessage_2(message_2); |
6244 return; | 6244 return; |
6245 } | 6245 } |
6246 void _postMessage_1(message, List messagePorts) native "postMessage"; | 6246 void _postMessage_1(message, List messagePorts) native "postMessage"; |
6247 void _postMessage_2(message) native "postMessage"; | 6247 void _postMessage_2(message) native "postMessage"; |
6248 } | 6248 } |
6249 | 6249 |
6250 class DedicatedWorkerContextEvents extends WorkerContextEvents { | 6250 class DedicatedWorkerContextEvents extends WorkerContextEvents { |
6251 DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr); | 6251 DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr); |
6252 | 6252 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6328 | 6328 |
6329 /// @domName DirectoryEntry; @docsEditable true | 6329 /// @domName DirectoryEntry; @docsEditable true |
6330 class DirectoryEntry extends Entry native "*DirectoryEntry" { | 6330 class DirectoryEntry extends Entry native "*DirectoryEntry" { |
6331 | 6331 |
6332 /// @domName DirectoryEntry.createReader; @docsEditable true | 6332 /// @domName DirectoryEntry.createReader; @docsEditable true |
6333 DirectoryReader createReader() native; | 6333 DirectoryReader createReader() native; |
6334 | 6334 |
6335 /// @domName DirectoryEntry.getDirectory; @docsEditable true | 6335 /// @domName DirectoryEntry.getDirectory; @docsEditable true |
6336 void getDirectory(String path, {Map options, EntryCallback successCallback, Er
rorCallback errorCallback}) { | 6336 void getDirectory(String path, {Map options, EntryCallback successCallback, Er
rorCallback errorCallback}) { |
6337 if (?errorCallback) { | 6337 if (?errorCallback) { |
6338 var options_1 = _convertDartToNative_Dictionary(options); | 6338 var options_1 = convertDartToNative_Dictionary(options); |
6339 _getDirectory_1(path, options_1, successCallback, errorCallback); | 6339 _getDirectory_1(path, options_1, successCallback, errorCallback); |
6340 return; | 6340 return; |
6341 } | 6341 } |
6342 if (?successCallback) { | 6342 if (?successCallback) { |
6343 var options_2 = _convertDartToNative_Dictionary(options); | 6343 var options_2 = convertDartToNative_Dictionary(options); |
6344 _getDirectory_2(path, options_2, successCallback); | 6344 _getDirectory_2(path, options_2, successCallback); |
6345 return; | 6345 return; |
6346 } | 6346 } |
6347 if (?options) { | 6347 if (?options) { |
6348 var options_3 = _convertDartToNative_Dictionary(options); | 6348 var options_3 = convertDartToNative_Dictionary(options); |
6349 _getDirectory_3(path, options_3); | 6349 _getDirectory_3(path, options_3); |
6350 return; | 6350 return; |
6351 } | 6351 } |
6352 _getDirectory_4(path); | 6352 _getDirectory_4(path); |
6353 return; | 6353 return; |
6354 } | 6354 } |
6355 void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallba
ck errorCallback) native "getDirectory"; | 6355 void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallba
ck errorCallback) native "getDirectory"; |
6356 void _getDirectory_2(path, options, EntryCallback successCallback) native "get
Directory"; | 6356 void _getDirectory_2(path, options, EntryCallback successCallback) native "get
Directory"; |
6357 void _getDirectory_3(path, options) native "getDirectory"; | 6357 void _getDirectory_3(path, options) native "getDirectory"; |
6358 void _getDirectory_4(path) native "getDirectory"; | 6358 void _getDirectory_4(path) native "getDirectory"; |
6359 | 6359 |
6360 /// @domName DirectoryEntry.getFile; @docsEditable true | 6360 /// @domName DirectoryEntry.getFile; @docsEditable true |
6361 void getFile(String path, {Map options, EntryCallback successCallback, ErrorCa
llback errorCallback}) { | 6361 void getFile(String path, {Map options, EntryCallback successCallback, ErrorCa
llback errorCallback}) { |
6362 if (?errorCallback) { | 6362 if (?errorCallback) { |
6363 var options_1 = _convertDartToNative_Dictionary(options); | 6363 var options_1 = convertDartToNative_Dictionary(options); |
6364 _getFile_1(path, options_1, successCallback, errorCallback); | 6364 _getFile_1(path, options_1, successCallback, errorCallback); |
6365 return; | 6365 return; |
6366 } | 6366 } |
6367 if (?successCallback) { | 6367 if (?successCallback) { |
6368 var options_2 = _convertDartToNative_Dictionary(options); | 6368 var options_2 = convertDartToNative_Dictionary(options); |
6369 _getFile_2(path, options_2, successCallback); | 6369 _getFile_2(path, options_2, successCallback); |
6370 return; | 6370 return; |
6371 } | 6371 } |
6372 if (?options) { | 6372 if (?options) { |
6373 var options_3 = _convertDartToNative_Dictionary(options); | 6373 var options_3 = convertDartToNative_Dictionary(options); |
6374 _getFile_3(path, options_3); | 6374 _getFile_3(path, options_3); |
6375 return; | 6375 return; |
6376 } | 6376 } |
6377 _getFile_4(path); | 6377 _getFile_4(path); |
6378 return; | 6378 return; |
6379 } | 6379 } |
6380 void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback er
rorCallback) native "getFile"; | 6380 void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback er
rorCallback) native "getFile"; |
6381 void _getFile_2(path, options, EntryCallback successCallback) native "getFile"
; | 6381 void _getFile_2(path, options, EntryCallback successCallback) native "getFile"
; |
6382 void _getFile_3(path, options) native "getFile"; | 6382 void _getFile_3(path, options) native "getFile"; |
6383 void _getFile_4(path) native "getFile"; | 6383 void _getFile_4(path) native "getFile"; |
6384 | 6384 |
6385 /// @domName DirectoryEntry.removeRecursively; @docsEditable true | 6385 /// @domName DirectoryEntry.removeRecursively; @docsEditable true |
6386 void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallb
ack]) native; | 6386 void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallb
ack]) native; |
6387 } | 6387 } |
6388 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6388 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
6389 // for details. All rights reserved. Use of this source code is governed by a | 6389 // for details. All rights reserved. Use of this source code is governed by a |
6390 // BSD-style license that can be found in the LICENSE file. | 6390 // BSD-style license that can be found in the LICENSE file. |
6391 | 6391 |
6392 | 6392 |
6393 /// @domName DirectoryEntrySync; @docsEditable true | 6393 /// @domName DirectoryEntrySync; @docsEditable true |
6394 class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" { | 6394 class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" { |
6395 | 6395 |
6396 /// @domName DirectoryEntrySync.createReader; @docsEditable true | 6396 /// @domName DirectoryEntrySync.createReader; @docsEditable true |
6397 DirectoryReaderSync createReader() native; | 6397 DirectoryReaderSync createReader() native; |
6398 | 6398 |
6399 /// @domName DirectoryEntrySync.getDirectory; @docsEditable true | 6399 /// @domName DirectoryEntrySync.getDirectory; @docsEditable true |
6400 DirectoryEntrySync getDirectory(String path, Map flags) { | 6400 DirectoryEntrySync getDirectory(String path, Map flags) { |
6401 var flags_1 = _convertDartToNative_Dictionary(flags); | 6401 var flags_1 = convertDartToNative_Dictionary(flags); |
6402 return _getDirectory_1(path, flags_1); | 6402 return _getDirectory_1(path, flags_1); |
6403 } | 6403 } |
6404 DirectoryEntrySync _getDirectory_1(path, flags) native "getDirectory"; | 6404 DirectoryEntrySync _getDirectory_1(path, flags) native "getDirectory"; |
6405 | 6405 |
6406 /// @domName DirectoryEntrySync.getFile; @docsEditable true | 6406 /// @domName DirectoryEntrySync.getFile; @docsEditable true |
6407 FileEntrySync getFile(String path, Map flags) { | 6407 FileEntrySync getFile(String path, Map flags) { |
6408 var flags_1 = _convertDartToNative_Dictionary(flags); | 6408 var flags_1 = convertDartToNative_Dictionary(flags); |
6409 return _getFile_1(path, flags_1); | 6409 return _getFile_1(path, flags_1); |
6410 } | 6410 } |
6411 FileEntrySync _getFile_1(path, flags) native "getFile"; | 6411 FileEntrySync _getFile_1(path, flags) native "getFile"; |
6412 | 6412 |
6413 /// @domName DirectoryEntrySync.removeRecursively; @docsEditable true | 6413 /// @domName DirectoryEntrySync.removeRecursively; @docsEditable true |
6414 void removeRecursively() native; | 6414 void removeRecursively() native; |
6415 } | 6415 } |
6416 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6416 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
6417 // for details. All rights reserved. Use of this source code is governed by a | 6417 // for details. All rights reserved. Use of this source code is governed by a |
6418 // BSD-style license that can be found in the LICENSE file. | 6418 // BSD-style license that can be found in the LICENSE file. |
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8612 final String name; | 8612 final String name; |
8613 | 8613 |
8614 /// @domName FileException.toString; @docsEditable true | 8614 /// @domName FileException.toString; @docsEditable true |
8615 String toString() native; | 8615 String toString() native; |
8616 } | 8616 } |
8617 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8617 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
8618 // for details. All rights reserved. Use of this source code is governed by a | 8618 // for details. All rights reserved. Use of this source code is governed by a |
8619 // BSD-style license that can be found in the LICENSE file. | 8619 // BSD-style license that can be found in the LICENSE file. |
8620 | 8620 |
8621 | 8621 |
| 8622 /// @domName FileList; @docsEditable true |
| 8623 class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
st" { |
| 8624 |
| 8625 /// @domName FileList.length; @docsEditable true |
| 8626 final int length; |
| 8627 |
| 8628 File operator[](int index) => JS("File", "#[#]", this, index); |
| 8629 |
| 8630 void operator[]=(int index, File value) { |
| 8631 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 8632 } |
| 8633 // -- start List<File> mixins. |
| 8634 // File is the element type. |
| 8635 |
| 8636 // From Iterable<File>: |
| 8637 |
| 8638 Iterator<File> iterator() { |
| 8639 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 8640 // be cached in both iterator _and_ forEach method. For now caching it |
| 8641 // for consistency. |
| 8642 return new FixedSizeListIterator<File>(this); |
| 8643 } |
| 8644 |
| 8645 // From Collection<File>: |
| 8646 |
| 8647 void add(File value) { |
| 8648 throw new UnsupportedError("Cannot add to immutable List."); |
| 8649 } |
| 8650 |
| 8651 void addLast(File value) { |
| 8652 throw new UnsupportedError("Cannot add to immutable List."); |
| 8653 } |
| 8654 |
| 8655 void addAll(Collection<File> collection) { |
| 8656 throw new UnsupportedError("Cannot add to immutable List."); |
| 8657 } |
| 8658 |
| 8659 bool contains(File element) => Collections.contains(this, element); |
| 8660 |
| 8661 void forEach(void f(File element)) => Collections.forEach(this, f); |
| 8662 |
| 8663 Collection map(f(File element)) => Collections.map(this, [], f); |
| 8664 |
| 8665 Collection<File> filter(bool f(File element)) => |
| 8666 Collections.filter(this, <File>[], f); |
| 8667 |
| 8668 bool every(bool f(File element)) => Collections.every(this, f); |
| 8669 |
| 8670 bool some(bool f(File element)) => Collections.some(this, f); |
| 8671 |
| 8672 bool get isEmpty => this.length == 0; |
| 8673 |
| 8674 // From List<File>: |
| 8675 |
| 8676 void sort([Comparator<File> compare = Comparable.compare]) { |
| 8677 throw new UnsupportedError("Cannot sort immutable List."); |
| 8678 } |
| 8679 |
| 8680 int indexOf(File element, [int start = 0]) => |
| 8681 _Lists.indexOf(this, element, start, this.length); |
| 8682 |
| 8683 int lastIndexOf(File element, [int start]) { |
| 8684 if (start == null) start = length - 1; |
| 8685 return _Lists.lastIndexOf(this, element, start); |
| 8686 } |
| 8687 |
| 8688 File get first => this[0]; |
| 8689 |
| 8690 File get last => this[length - 1]; |
| 8691 |
| 8692 File removeLast() { |
| 8693 throw new UnsupportedError("Cannot removeLast on immutable List."); |
| 8694 } |
| 8695 |
| 8696 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) { |
| 8697 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 8698 } |
| 8699 |
| 8700 void removeRange(int start, int rangeLength) { |
| 8701 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 8702 } |
| 8703 |
| 8704 void insertRange(int start, int rangeLength, [File initialValue]) { |
| 8705 throw new UnsupportedError("Cannot insertRange on immutable List."); |
| 8706 } |
| 8707 |
| 8708 List<File> getRange(int start, int rangeLength) => |
| 8709 _Lists.getRange(this, start, rangeLength, <File>[]); |
| 8710 |
| 8711 // -- end List<File> mixins. |
| 8712 |
| 8713 /// @domName FileList.item; @docsEditable true |
| 8714 File item(int index) native; |
| 8715 } |
| 8716 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8717 // for details. All rights reserved. Use of this source code is governed by a |
| 8718 // BSD-style license that can be found in the LICENSE file. |
| 8719 |
| 8720 |
8622 /// @domName FileReader; @docsEditable true | 8721 /// @domName FileReader; @docsEditable true |
8623 class FileReader extends EventTarget native "*FileReader" { | 8722 class FileReader extends EventTarget native "*FileReader" { |
8624 | 8723 |
8625 factory FileReader() => _FileReaderFactoryProvider.createFileReader(); | 8724 factory FileReader() => _FileReaderFactoryProvider.createFileReader(); |
8626 | 8725 |
8627 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 8726 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
8628 FileReaderEvents get on => | 8727 FileReaderEvents get on => |
8629 new FileReaderEvents(this); | 8728 new FileReaderEvents(this); |
8630 | 8729 |
8631 static const int DONE = 2; | 8730 static const int DONE = 2; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8855 } | 8954 } |
8856 | 8955 |
8857 void addLast(num value) { | 8956 void addLast(num value) { |
8858 throw new UnsupportedError("Cannot add to immutable List."); | 8957 throw new UnsupportedError("Cannot add to immutable List."); |
8859 } | 8958 } |
8860 | 8959 |
8861 void addAll(Collection<num> collection) { | 8960 void addAll(Collection<num> collection) { |
8862 throw new UnsupportedError("Cannot add to immutable List."); | 8961 throw new UnsupportedError("Cannot add to immutable List."); |
8863 } | 8962 } |
8864 | 8963 |
8865 bool contains(num element) => _Collections.contains(this, element); | 8964 bool contains(num element) => Collections.contains(this, element); |
8866 | 8965 |
8867 void forEach(void f(num element)) => _Collections.forEach(this, f); | 8966 void forEach(void f(num element)) => Collections.forEach(this, f); |
8868 | 8967 |
8869 Collection map(f(num element)) => _Collections.map(this, [], f); | 8968 Collection map(f(num element)) => Collections.map(this, [], f); |
8870 | 8969 |
8871 Collection<num> filter(bool f(num element)) => | 8970 Collection<num> filter(bool f(num element)) => |
8872 _Collections.filter(this, <num>[], f); | 8971 Collections.filter(this, <num>[], f); |
8873 | 8972 |
8874 bool every(bool f(num element)) => _Collections.every(this, f); | 8973 bool every(bool f(num element)) => Collections.every(this, f); |
8875 | 8974 |
8876 bool some(bool f(num element)) => _Collections.some(this, f); | 8975 bool some(bool f(num element)) => Collections.some(this, f); |
8877 | 8976 |
8878 bool get isEmpty => this.length == 0; | 8977 bool get isEmpty => this.length == 0; |
8879 | 8978 |
8880 // From List<num>: | 8979 // From List<num>: |
8881 | 8980 |
8882 void sort([Comparator<num> compare = Comparable.compare]) { | 8981 void sort([Comparator<num> compare = Comparable.compare]) { |
8883 throw new UnsupportedError("Cannot sort immutable List."); | 8982 throw new UnsupportedError("Cannot sort immutable List."); |
8884 } | 8983 } |
8885 | 8984 |
8886 int indexOf(num element, [int start = 0]) => | 8985 int indexOf(num element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8965 } | 9064 } |
8966 | 9065 |
8967 void addLast(num value) { | 9066 void addLast(num value) { |
8968 throw new UnsupportedError("Cannot add to immutable List."); | 9067 throw new UnsupportedError("Cannot add to immutable List."); |
8969 } | 9068 } |
8970 | 9069 |
8971 void addAll(Collection<num> collection) { | 9070 void addAll(Collection<num> collection) { |
8972 throw new UnsupportedError("Cannot add to immutable List."); | 9071 throw new UnsupportedError("Cannot add to immutable List."); |
8973 } | 9072 } |
8974 | 9073 |
8975 bool contains(num element) => _Collections.contains(this, element); | 9074 bool contains(num element) => Collections.contains(this, element); |
8976 | 9075 |
8977 void forEach(void f(num element)) => _Collections.forEach(this, f); | 9076 void forEach(void f(num element)) => Collections.forEach(this, f); |
8978 | 9077 |
8979 Collection map(f(num element)) => _Collections.map(this, [], f); | 9078 Collection map(f(num element)) => Collections.map(this, [], f); |
8980 | 9079 |
8981 Collection<num> filter(bool f(num element)) => | 9080 Collection<num> filter(bool f(num element)) => |
8982 _Collections.filter(this, <num>[], f); | 9081 Collections.filter(this, <num>[], f); |
8983 | 9082 |
8984 bool every(bool f(num element)) => _Collections.every(this, f); | 9083 bool every(bool f(num element)) => Collections.every(this, f); |
8985 | 9084 |
8986 bool some(bool f(num element)) => _Collections.some(this, f); | 9085 bool some(bool f(num element)) => Collections.some(this, f); |
8987 | 9086 |
8988 bool get isEmpty => this.length == 0; | 9087 bool get isEmpty => this.length == 0; |
8989 | 9088 |
8990 // From List<num>: | 9089 // From List<num>: |
8991 | 9090 |
8992 void sort([Comparator<num> compare = Comparable.compare]) { | 9091 void sort([Comparator<num> compare = Comparable.compare]) { |
8993 throw new UnsupportedError("Cannot sort immutable List."); | 9092 throw new UnsupportedError("Cannot sort immutable List."); |
8994 } | 9093 } |
8995 | 9094 |
8996 int indexOf(num element, [int start = 0]) => | 9095 int indexOf(num element, [int start = 0]) => |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9331 } | 9430 } |
9332 | 9431 |
9333 void addLast(Node value) { | 9432 void addLast(Node value) { |
9334 throw new UnsupportedError("Cannot add to immutable List."); | 9433 throw new UnsupportedError("Cannot add to immutable List."); |
9335 } | 9434 } |
9336 | 9435 |
9337 void addAll(Collection<Node> collection) { | 9436 void addAll(Collection<Node> collection) { |
9338 throw new UnsupportedError("Cannot add to immutable List."); | 9437 throw new UnsupportedError("Cannot add to immutable List."); |
9339 } | 9438 } |
9340 | 9439 |
9341 bool contains(Node element) => _Collections.contains(this, element); | 9440 bool contains(Node element) => Collections.contains(this, element); |
9342 | 9441 |
9343 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 9442 void forEach(void f(Node element)) => Collections.forEach(this, f); |
9344 | 9443 |
9345 Collection map(f(Node element)) => _Collections.map(this, [], f); | 9444 Collection map(f(Node element)) => Collections.map(this, [], f); |
9346 | 9445 |
9347 Collection<Node> filter(bool f(Node element)) => | 9446 Collection<Node> filter(bool f(Node element)) => |
9348 _Collections.filter(this, <Node>[], f); | 9447 Collections.filter(this, <Node>[], f); |
9349 | 9448 |
9350 bool every(bool f(Node element)) => _Collections.every(this, f); | 9449 bool every(bool f(Node element)) => Collections.every(this, f); |
9351 | 9450 |
9352 bool some(bool f(Node element)) => _Collections.some(this, f); | 9451 bool some(bool f(Node element)) => Collections.some(this, f); |
9353 | 9452 |
9354 bool get isEmpty => this.length == 0; | 9453 bool get isEmpty => this.length == 0; |
9355 | 9454 |
9356 // From List<Node>: | 9455 // From List<Node>: |
9357 | 9456 |
9358 void sort([Comparator<Node> compare = Comparable.compare]) { | 9457 void sort([Comparator<Node> compare = Comparable.compare]) { |
9359 throw new UnsupportedError("Cannot sort immutable List."); | 9458 throw new UnsupportedError("Cannot sort immutable List."); |
9360 } | 9459 } |
9361 | 9460 |
9362 int indexOf(Node element, [int start = 0]) => | 9461 int indexOf(Node element, [int start = 0]) => |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9437 } | 9536 } |
9438 | 9537 |
9439 void addLast(Node value) { | 9538 void addLast(Node value) { |
9440 throw new UnsupportedError("Cannot add to immutable List."); | 9539 throw new UnsupportedError("Cannot add to immutable List."); |
9441 } | 9540 } |
9442 | 9541 |
9443 void addAll(Collection<Node> collection) { | 9542 void addAll(Collection<Node> collection) { |
9444 throw new UnsupportedError("Cannot add to immutable List."); | 9543 throw new UnsupportedError("Cannot add to immutable List."); |
9445 } | 9544 } |
9446 | 9545 |
9447 bool contains(Node element) => _Collections.contains(this, element); | 9546 bool contains(Node element) => Collections.contains(this, element); |
9448 | 9547 |
9449 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 9548 void forEach(void f(Node element)) => Collections.forEach(this, f); |
9450 | 9549 |
9451 Collection map(f(Node element)) => _Collections.map(this, [], f); | 9550 Collection map(f(Node element)) => Collections.map(this, [], f); |
9452 | 9551 |
9453 Collection<Node> filter(bool f(Node element)) => | 9552 Collection<Node> filter(bool f(Node element)) => |
9454 _Collections.filter(this, <Node>[], f); | 9553 Collections.filter(this, <Node>[], f); |
9455 | 9554 |
9456 bool every(bool f(Node element)) => _Collections.every(this, f); | 9555 bool every(bool f(Node element)) => Collections.every(this, f); |
9457 | 9556 |
9458 bool some(bool f(Node element)) => _Collections.some(this, f); | 9557 bool some(bool f(Node element)) => Collections.some(this, f); |
9459 | 9558 |
9460 bool get isEmpty => this.length == 0; | 9559 bool get isEmpty => this.length == 0; |
9461 | 9560 |
9462 // From List<Node>: | 9561 // From List<Node>: |
9463 | 9562 |
9464 void sort([Comparator<Node> compare = Comparable.compare]) { | 9563 void sort([Comparator<Node> compare = Comparable.compare]) { |
9465 throw new UnsupportedError("Cannot sort immutable List."); | 9564 throw new UnsupportedError("Cannot sort immutable List."); |
9466 } | 9565 } |
9467 | 9566 |
9468 int indexOf(Node element, [int start = 0]) => | 9567 int indexOf(Node element, [int start = 0]) => |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9908 return; | 10007 return; |
9909 } | 10008 } |
9910 void _continueFunction_1(key) native "continue"; | 10009 void _continueFunction_1(key) native "continue"; |
9911 void _continueFunction_2() native "continue"; | 10010 void _continueFunction_2() native "continue"; |
9912 | 10011 |
9913 /// @domName IDBCursor.delete; @docsEditable true | 10012 /// @domName IDBCursor.delete; @docsEditable true |
9914 IDBRequest delete() native; | 10013 IDBRequest delete() native; |
9915 | 10014 |
9916 /// @domName IDBCursor.update; @docsEditable true | 10015 /// @domName IDBCursor.update; @docsEditable true |
9917 IDBRequest update(/*any*/ value) { | 10016 IDBRequest update(/*any*/ value) { |
9918 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 10017 var value_1 = convertDartToNative_SerializedScriptValue(value); |
9919 return _update_1(value_1); | 10018 return _update_1(value_1); |
9920 } | 10019 } |
9921 IDBRequest _update_1(value) native "update"; | 10020 IDBRequest _update_1(value) native "update"; |
9922 } | 10021 } |
9923 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10022 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
9924 // for details. All rights reserved. Use of this source code is governed by a | 10023 // for details. All rights reserved. Use of this source code is governed by a |
9925 // BSD-style license that can be found in the LICENSE file. | 10024 // BSD-style license that can be found in the LICENSE file. |
9926 | 10025 |
9927 | 10026 |
9928 /// @domName IDBCursorWithValue; @docsEditable true | 10027 /// @domName IDBCursorWithValue; @docsEditable true |
9929 class IDBCursorWithValue extends IDBCursor native "*IDBCursorWithValue" { | 10028 class IDBCursorWithValue extends IDBCursor native "*IDBCursorWithValue" { |
9930 | 10029 |
9931 /// @domName IDBCursorWithValue.value; @docsEditable true | 10030 /// @domName IDBCursorWithValue.value; @docsEditable true |
9932 @_annotation_Creates_SerializedScriptValue @_annotation_Returns_SerializedScri
ptValue | 10031 @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScript
Value |
9933 final Object value; | 10032 final Object value; |
9934 } | 10033 } |
9935 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10034 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
9936 // for details. All rights reserved. Use of this source code is governed by a | 10035 // for details. All rights reserved. Use of this source code is governed by a |
9937 // BSD-style license that can be found in the LICENSE file. | 10036 // BSD-style license that can be found in the LICENSE file. |
9938 | 10037 |
9939 | 10038 |
9940 class IDBDatabase extends EventTarget native "*IDBDatabase" { | 10039 class IDBDatabase extends EventTarget native "*IDBDatabase" { |
9941 | 10040 |
9942 IDBTransaction transaction(storeName_OR_storeNames, String mode) { | 10041 IDBTransaction transaction(storeName_OR_storeNames, String mode) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9997 | 10096 |
9998 /// @domName IDBDatabase.addEventListener; @docsEditable true | 10097 /// @domName IDBDatabase.addEventListener; @docsEditable true |
9999 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 10098 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
10000 | 10099 |
10001 /// @domName IDBDatabase.close; @docsEditable true | 10100 /// @domName IDBDatabase.close; @docsEditable true |
10002 void close() native; | 10101 void close() native; |
10003 | 10102 |
10004 /// @domName IDBDatabase.createObjectStore; @docsEditable true | 10103 /// @domName IDBDatabase.createObjectStore; @docsEditable true |
10005 IDBObjectStore createObjectStore(String name, [Map options]) { | 10104 IDBObjectStore createObjectStore(String name, [Map options]) { |
10006 if (?options) { | 10105 if (?options) { |
10007 var options_1 = _convertDartToNative_Dictionary(options); | 10106 var options_1 = convertDartToNative_Dictionary(options); |
10008 return _createObjectStore_1(name, options_1); | 10107 return _createObjectStore_1(name, options_1); |
10009 } | 10108 } |
10010 return _createObjectStore_2(name); | 10109 return _createObjectStore_2(name); |
10011 } | 10110 } |
10012 IDBObjectStore _createObjectStore_1(name, options) native "createObjectStore"; | 10111 IDBObjectStore _createObjectStore_1(name, options) native "createObjectStore"; |
10013 IDBObjectStore _createObjectStore_2(name) native "createObjectStore"; | 10112 IDBObjectStore _createObjectStore_2(name) native "createObjectStore"; |
10014 | 10113 |
10015 /// @domName IDBDatabase.deleteObjectStore; @docsEditable true | 10114 /// @domName IDBDatabase.deleteObjectStore; @docsEditable true |
10016 void deleteObjectStore(String name) native; | 10115 void deleteObjectStore(String name) native; |
10017 | 10116 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10155 IDBRequest get(key) { | 10254 IDBRequest get(key) { |
10156 if ((?key && (key is IDBKeyRange || key == null))) { | 10255 if ((?key && (key is IDBKeyRange || key == null))) { |
10157 return _get_1(key); | 10256 return _get_1(key); |
10158 } | 10257 } |
10159 if (?key) { | 10258 if (?key) { |
10160 var key_1 = _convertDartToNative_IDBKey(key); | 10259 var key_1 = _convertDartToNative_IDBKey(key); |
10161 return _get_2(key_1); | 10260 return _get_2(key_1); |
10162 } | 10261 } |
10163 throw new ArgumentError("Incorrect number or type of arguments"); | 10262 throw new ArgumentError("Incorrect number or type of arguments"); |
10164 } | 10263 } |
10165 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10264 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
10166 IDBRequest _get_1(IDBKeyRange key) native "get"; | 10265 IDBRequest _get_1(IDBKeyRange key) native "get"; |
10167 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10266 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
10168 IDBRequest _get_2(key) native "get"; | 10267 IDBRequest _get_2(key) native "get"; |
10169 | 10268 |
10170 /// @domName IDBIndex.getKey; @docsEditable true | 10269 /// @domName IDBIndex.getKey; @docsEditable true |
10171 IDBRequest getKey(key) { | 10270 IDBRequest getKey(key) { |
10172 if ((?key && (key is IDBKeyRange || key == null))) { | 10271 if ((?key && (key is IDBKeyRange || key == null))) { |
10173 return _getKey_1(key); | 10272 return _getKey_1(key); |
10174 } | 10273 } |
10175 if (?key) { | 10274 if (?key) { |
10176 var key_1 = _convertDartToNative_IDBKey(key); | 10275 var key_1 = _convertDartToNative_IDBKey(key); |
10177 return _getKey_2(key_1); | 10276 return _getKey_2(key_1); |
10178 } | 10277 } |
10179 throw new ArgumentError("Incorrect number or type of arguments"); | 10278 throw new ArgumentError("Incorrect number or type of arguments"); |
10180 } | 10279 } |
10181 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue @Creates('IDBObjectStore') | 10280 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue @Creates('IDBObjectStore') |
10182 IDBRequest _getKey_1(IDBKeyRange key) native "getKey"; | 10281 IDBRequest _getKey_1(IDBKeyRange key) native "getKey"; |
10183 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue @Creates('IDBObjectStore') | 10282 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue @Creates('IDBObjectStore') |
10184 IDBRequest _getKey_2(key) native "getKey"; | 10283 IDBRequest _getKey_2(key) native "getKey"; |
10185 | 10284 |
10186 /// @domName IDBIndex.openCursor; @docsEditable true | 10285 /// @domName IDBIndex.openCursor; @docsEditable true |
10187 IDBRequest openCursor([key_OR_range, String direction]) { | 10286 IDBRequest openCursor([key_OR_range, String direction]) { |
10188 if (!?key_OR_range && | 10287 if (!?key_OR_range && |
10189 !?direction) { | 10288 !?direction) { |
10190 return _openCursor_1(); | 10289 return _openCursor_1(); |
10191 } | 10290 } |
10192 if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))
&& | 10291 if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))
&& |
10193 !?direction) { | 10292 !?direction) { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10380 | 10479 |
10381 /// @domName IDBObjectStore.name; @docsEditable true | 10480 /// @domName IDBObjectStore.name; @docsEditable true |
10382 final String name; | 10481 final String name; |
10383 | 10482 |
10384 /// @domName IDBObjectStore.transaction; @docsEditable true | 10483 /// @domName IDBObjectStore.transaction; @docsEditable true |
10385 final IDBTransaction transaction; | 10484 final IDBTransaction transaction; |
10386 | 10485 |
10387 /// @domName IDBObjectStore.add; @docsEditable true | 10486 /// @domName IDBObjectStore.add; @docsEditable true |
10388 IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) { | 10487 IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) { |
10389 if (?key) { | 10488 if (?key) { |
10390 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 10489 var value_1 = convertDartToNative_SerializedScriptValue(value); |
10391 var key_2 = _convertDartToNative_IDBKey(key); | 10490 var key_2 = _convertDartToNative_IDBKey(key); |
10392 return _add_1(value_1, key_2); | 10491 return _add_1(value_1, key_2); |
10393 } | 10492 } |
10394 var value_3 = _convertDartToNative_SerializedScriptValue(value); | 10493 var value_3 = convertDartToNative_SerializedScriptValue(value); |
10395 return _add_2(value_3); | 10494 return _add_2(value_3); |
10396 } | 10495 } |
10397 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10496 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
10398 IDBRequest _add_1(value, key) native "add"; | 10497 IDBRequest _add_1(value, key) native "add"; |
10399 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10498 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
10400 IDBRequest _add_2(value) native "add"; | 10499 IDBRequest _add_2(value) native "add"; |
10401 | 10500 |
10402 /// @domName IDBObjectStore.clear; @docsEditable true | 10501 /// @domName IDBObjectStore.clear; @docsEditable true |
10403 IDBRequest clear() native; | 10502 IDBRequest clear() native; |
10404 | 10503 |
(...skipping 12 matching lines...) Expand all Loading... |
10417 throw new ArgumentError("Incorrect number or type of arguments"); | 10516 throw new ArgumentError("Incorrect number or type of arguments"); |
10418 } | 10517 } |
10419 IDBRequest _count_1() native "count"; | 10518 IDBRequest _count_1() native "count"; |
10420 IDBRequest _count_2(IDBKeyRange range) native "count"; | 10519 IDBRequest _count_2(IDBKeyRange range) native "count"; |
10421 IDBRequest _count_3(key) native "count"; | 10520 IDBRequest _count_3(key) native "count"; |
10422 | 10521 |
10423 /// @domName IDBObjectStore.createIndex; @docsEditable true | 10522 /// @domName IDBObjectStore.createIndex; @docsEditable true |
10424 IDBIndex createIndex(String name, keyPath, [Map options]) { | 10523 IDBIndex createIndex(String name, keyPath, [Map options]) { |
10425 if ((?keyPath && (keyPath is List<String> || keyPath == null)) && | 10524 if ((?keyPath && (keyPath is List<String> || keyPath == null)) && |
10426 !?options) { | 10525 !?options) { |
10427 List keyPath_1 = _convertDartToNative_StringArray(keyPath); | 10526 List keyPath_1 = convertDartToNative_StringArray(keyPath); |
10428 return _createIndex_1(name, keyPath_1); | 10527 return _createIndex_1(name, keyPath_1); |
10429 } | 10528 } |
10430 if ((?keyPath && (keyPath is List<String> || keyPath == null))) { | 10529 if ((?keyPath && (keyPath is List<String> || keyPath == null))) { |
10431 List keyPath_2 = _convertDartToNative_StringArray(keyPath); | 10530 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
10432 var options_3 = _convertDartToNative_Dictionary(options); | 10531 var options_3 = convertDartToNative_Dictionary(options); |
10433 return _createIndex_2(name, keyPath_2, options_3); | 10532 return _createIndex_2(name, keyPath_2, options_3); |
10434 } | 10533 } |
10435 if ((?keyPath && (keyPath is String || keyPath == null)) && | 10534 if ((?keyPath && (keyPath is String || keyPath == null)) && |
10436 !?options) { | 10535 !?options) { |
10437 return _createIndex_3(name, keyPath); | 10536 return _createIndex_3(name, keyPath); |
10438 } | 10537 } |
10439 if ((?keyPath && (keyPath is String || keyPath == null))) { | 10538 if ((?keyPath && (keyPath is String || keyPath == null))) { |
10440 var options_4 = _convertDartToNative_Dictionary(options); | 10539 var options_4 = convertDartToNative_Dictionary(options); |
10441 return _createIndex_4(name, keyPath, options_4); | 10540 return _createIndex_4(name, keyPath, options_4); |
10442 } | 10541 } |
10443 throw new ArgumentError("Incorrect number or type of arguments"); | 10542 throw new ArgumentError("Incorrect number or type of arguments"); |
10444 } | 10543 } |
10445 IDBIndex _createIndex_1(name, List keyPath) native "createIndex"; | 10544 IDBIndex _createIndex_1(name, List keyPath) native "createIndex"; |
10446 IDBIndex _createIndex_2(name, List keyPath, options) native "createIndex"; | 10545 IDBIndex _createIndex_2(name, List keyPath, options) native "createIndex"; |
10447 IDBIndex _createIndex_3(name, String keyPath) native "createIndex"; | 10546 IDBIndex _createIndex_3(name, String keyPath) native "createIndex"; |
10448 IDBIndex _createIndex_4(name, String keyPath, options) native "createIndex"; | 10547 IDBIndex _createIndex_4(name, String keyPath, options) native "createIndex"; |
10449 | 10548 |
10450 /// @domName IDBObjectStore.delete; @docsEditable true | 10549 /// @domName IDBObjectStore.delete; @docsEditable true |
(...skipping 17 matching lines...) Expand all Loading... |
10468 IDBRequest getObject(key) { | 10567 IDBRequest getObject(key) { |
10469 if ((?key && (key is IDBKeyRange || key == null))) { | 10568 if ((?key && (key is IDBKeyRange || key == null))) { |
10470 return _getObject_1(key); | 10569 return _getObject_1(key); |
10471 } | 10570 } |
10472 if (?key) { | 10571 if (?key) { |
10473 var key_1 = _convertDartToNative_IDBKey(key); | 10572 var key_1 = _convertDartToNative_IDBKey(key); |
10474 return _getObject_2(key_1); | 10573 return _getObject_2(key_1); |
10475 } | 10574 } |
10476 throw new ArgumentError("Incorrect number or type of arguments"); | 10575 throw new ArgumentError("Incorrect number or type of arguments"); |
10477 } | 10576 } |
10478 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10577 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
10479 IDBRequest _getObject_1(IDBKeyRange key) native "get"; | 10578 IDBRequest _getObject_1(IDBKeyRange key) native "get"; |
10480 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10579 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
10481 IDBRequest _getObject_2(key) native "get"; | 10580 IDBRequest _getObject_2(key) native "get"; |
10482 | 10581 |
10483 /// @domName IDBObjectStore.index; @docsEditable true | 10582 /// @domName IDBObjectStore.index; @docsEditable true |
10484 IDBIndex index(String name) native; | 10583 IDBIndex index(String name) native; |
10485 | 10584 |
10486 /// @domName IDBObjectStore.openCursor; @docsEditable true | 10585 /// @domName IDBObjectStore.openCursor; @docsEditable true |
10487 IDBRequest openCursor([key_OR_range, String direction]) { | 10586 IDBRequest openCursor([key_OR_range, String direction]) { |
10488 if (!?key_OR_range && | 10587 if (!?key_OR_range && |
10489 !?direction) { | 10588 !?direction) { |
10490 return _openCursor_1(); | 10589 return _openCursor_1(); |
(...skipping 23 matching lines...) Expand all Loading... |
10514 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10613 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
10515 IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor"; | 10614 IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor"; |
10516 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10615 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
10517 IDBRequest _openCursor_4(key) native "openCursor"; | 10616 IDBRequest _openCursor_4(key) native "openCursor"; |
10518 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10617 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
10519 IDBRequest _openCursor_5(key, direction) native "openCursor"; | 10618 IDBRequest _openCursor_5(key, direction) native "openCursor"; |
10520 | 10619 |
10521 /// @domName IDBObjectStore.put; @docsEditable true | 10620 /// @domName IDBObjectStore.put; @docsEditable true |
10522 IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) { | 10621 IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) { |
10523 if (?key) { | 10622 if (?key) { |
10524 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 10623 var value_1 = convertDartToNative_SerializedScriptValue(value); |
10525 var key_2 = _convertDartToNative_IDBKey(key); | 10624 var key_2 = _convertDartToNative_IDBKey(key); |
10526 return _put_1(value_1, key_2); | 10625 return _put_1(value_1, key_2); |
10527 } | 10626 } |
10528 var value_3 = _convertDartToNative_SerializedScriptValue(value); | 10627 var value_3 = convertDartToNative_SerializedScriptValue(value); |
10529 return _put_2(value_3); | 10628 return _put_2(value_3); |
10530 } | 10629 } |
10531 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10630 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
10532 IDBRequest _put_1(value, key) native "put"; | 10631 IDBRequest _put_1(value, key) native "put"; |
10533 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10632 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
10534 IDBRequest _put_2(value) native "put"; | 10633 IDBRequest _put_2(value) native "put"; |
10535 } | 10634 } |
10536 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10635 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
10537 // for details. All rights reserved. Use of this source code is governed by a | 10636 // for details. All rights reserved. Use of this source code is governed by a |
10538 // BSD-style license that can be found in the LICENSE file. | 10637 // BSD-style license that can be found in the LICENSE file. |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10906 /// @domName HTMLInputElement.defaultValue; @docsEditable true | 11005 /// @domName HTMLInputElement.defaultValue; @docsEditable true |
10907 String defaultValue; | 11006 String defaultValue; |
10908 | 11007 |
10909 /// @domName HTMLInputElement.dirName; @docsEditable true | 11008 /// @domName HTMLInputElement.dirName; @docsEditable true |
10910 String dirName; | 11009 String dirName; |
10911 | 11010 |
10912 /// @domName HTMLInputElement.disabled; @docsEditable true | 11011 /// @domName HTMLInputElement.disabled; @docsEditable true |
10913 bool disabled; | 11012 bool disabled; |
10914 | 11013 |
10915 /// @domName HTMLInputElement.files; @docsEditable true | 11014 /// @domName HTMLInputElement.files; @docsEditable true |
10916 @Returns('_FileList') @Creates('_FileList') | 11015 FileList files; |
10917 List<File> files; | |
10918 | 11016 |
10919 /// @domName HTMLInputElement.form; @docsEditable true | 11017 /// @domName HTMLInputElement.form; @docsEditable true |
10920 final FormElement form; | 11018 final FormElement form; |
10921 | 11019 |
10922 /// @domName HTMLInputElement.formAction; @docsEditable true | 11020 /// @domName HTMLInputElement.formAction; @docsEditable true |
10923 String formAction; | 11021 String formAction; |
10924 | 11022 |
10925 /// @domName HTMLInputElement.formEnctype; @docsEditable true | 11023 /// @domName HTMLInputElement.formEnctype; @docsEditable true |
10926 String formEnctype; | 11024 String formEnctype; |
10927 | 11025 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11105 } | 11203 } |
11106 | 11204 |
11107 void addLast(int value) { | 11205 void addLast(int value) { |
11108 throw new UnsupportedError("Cannot add to immutable List."); | 11206 throw new UnsupportedError("Cannot add to immutable List."); |
11109 } | 11207 } |
11110 | 11208 |
11111 void addAll(Collection<int> collection) { | 11209 void addAll(Collection<int> collection) { |
11112 throw new UnsupportedError("Cannot add to immutable List."); | 11210 throw new UnsupportedError("Cannot add to immutable List."); |
11113 } | 11211 } |
11114 | 11212 |
11115 bool contains(int element) => _Collections.contains(this, element); | 11213 bool contains(int element) => Collections.contains(this, element); |
11116 | 11214 |
11117 void forEach(void f(int element)) => _Collections.forEach(this, f); | 11215 void forEach(void f(int element)) => Collections.forEach(this, f); |
11118 | 11216 |
11119 Collection map(f(int element)) => _Collections.map(this, [], f); | 11217 Collection map(f(int element)) => Collections.map(this, [], f); |
11120 | 11218 |
11121 Collection<int> filter(bool f(int element)) => | 11219 Collection<int> filter(bool f(int element)) => |
11122 _Collections.filter(this, <int>[], f); | 11220 Collections.filter(this, <int>[], f); |
11123 | 11221 |
11124 bool every(bool f(int element)) => _Collections.every(this, f); | 11222 bool every(bool f(int element)) => Collections.every(this, f); |
11125 | 11223 |
11126 bool some(bool f(int element)) => _Collections.some(this, f); | 11224 bool some(bool f(int element)) => Collections.some(this, f); |
11127 | 11225 |
11128 bool get isEmpty => this.length == 0; | 11226 bool get isEmpty => this.length == 0; |
11129 | 11227 |
11130 // From List<int>: | 11228 // From List<int>: |
11131 | 11229 |
11132 void sort([Comparator<int> compare = Comparable.compare]) { | 11230 void sort([Comparator<int> compare = Comparable.compare]) { |
11133 throw new UnsupportedError("Cannot sort immutable List."); | 11231 throw new UnsupportedError("Cannot sort immutable List."); |
11134 } | 11232 } |
11135 | 11233 |
11136 int indexOf(int element, [int start = 0]) => | 11234 int indexOf(int element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11215 } | 11313 } |
11216 | 11314 |
11217 void addLast(int value) { | 11315 void addLast(int value) { |
11218 throw new UnsupportedError("Cannot add to immutable List."); | 11316 throw new UnsupportedError("Cannot add to immutable List."); |
11219 } | 11317 } |
11220 | 11318 |
11221 void addAll(Collection<int> collection) { | 11319 void addAll(Collection<int> collection) { |
11222 throw new UnsupportedError("Cannot add to immutable List."); | 11320 throw new UnsupportedError("Cannot add to immutable List."); |
11223 } | 11321 } |
11224 | 11322 |
11225 bool contains(int element) => _Collections.contains(this, element); | 11323 bool contains(int element) => Collections.contains(this, element); |
11226 | 11324 |
11227 void forEach(void f(int element)) => _Collections.forEach(this, f); | 11325 void forEach(void f(int element)) => Collections.forEach(this, f); |
11228 | 11326 |
11229 Collection map(f(int element)) => _Collections.map(this, [], f); | 11327 Collection map(f(int element)) => Collections.map(this, [], f); |
11230 | 11328 |
11231 Collection<int> filter(bool f(int element)) => | 11329 Collection<int> filter(bool f(int element)) => |
11232 _Collections.filter(this, <int>[], f); | 11330 Collections.filter(this, <int>[], f); |
11233 | 11331 |
11234 bool every(bool f(int element)) => _Collections.every(this, f); | 11332 bool every(bool f(int element)) => Collections.every(this, f); |
11235 | 11333 |
11236 bool some(bool f(int element)) => _Collections.some(this, f); | 11334 bool some(bool f(int element)) => Collections.some(this, f); |
11237 | 11335 |
11238 bool get isEmpty => this.length == 0; | 11336 bool get isEmpty => this.length == 0; |
11239 | 11337 |
11240 // From List<int>: | 11338 // From List<int>: |
11241 | 11339 |
11242 void sort([Comparator<int> compare = Comparable.compare]) { | 11340 void sort([Comparator<int> compare = Comparable.compare]) { |
11243 throw new UnsupportedError("Cannot sort immutable List."); | 11341 throw new UnsupportedError("Cannot sort immutable List."); |
11244 } | 11342 } |
11245 | 11343 |
11246 int indexOf(int element, [int start = 0]) => | 11344 int indexOf(int element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11325 } | 11423 } |
11326 | 11424 |
11327 void addLast(int value) { | 11425 void addLast(int value) { |
11328 throw new UnsupportedError("Cannot add to immutable List."); | 11426 throw new UnsupportedError("Cannot add to immutable List."); |
11329 } | 11427 } |
11330 | 11428 |
11331 void addAll(Collection<int> collection) { | 11429 void addAll(Collection<int> collection) { |
11332 throw new UnsupportedError("Cannot add to immutable List."); | 11430 throw new UnsupportedError("Cannot add to immutable List."); |
11333 } | 11431 } |
11334 | 11432 |
11335 bool contains(int element) => _Collections.contains(this, element); | 11433 bool contains(int element) => Collections.contains(this, element); |
11336 | 11434 |
11337 void forEach(void f(int element)) => _Collections.forEach(this, f); | 11435 void forEach(void f(int element)) => Collections.forEach(this, f); |
11338 | 11436 |
11339 Collection map(f(int element)) => _Collections.map(this, [], f); | 11437 Collection map(f(int element)) => Collections.map(this, [], f); |
11340 | 11438 |
11341 Collection<int> filter(bool f(int element)) => | 11439 Collection<int> filter(bool f(int element)) => |
11342 _Collections.filter(this, <int>[], f); | 11440 Collections.filter(this, <int>[], f); |
11343 | 11441 |
11344 bool every(bool f(int element)) => _Collections.every(this, f); | 11442 bool every(bool f(int element)) => Collections.every(this, f); |
11345 | 11443 |
11346 bool some(bool f(int element)) => _Collections.some(this, f); | 11444 bool some(bool f(int element)) => Collections.some(this, f); |
11347 | 11445 |
11348 bool get isEmpty => this.length == 0; | 11446 bool get isEmpty => this.length == 0; |
11349 | 11447 |
11350 // From List<int>: | 11448 // From List<int>: |
11351 | 11449 |
11352 void sort([Comparator<int> compare = Comparable.compare]) { | 11450 void sort([Comparator<int> compare = Comparable.compare]) { |
11353 throw new UnsupportedError("Cannot sort immutable List."); | 11451 throw new UnsupportedError("Cannot sort immutable List."); |
11354 } | 11452 } |
11355 | 11453 |
11356 int indexOf(int element, [int start = 0]) => | 11454 int indexOf(int element, [int start = 0]) => |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12058 void moveTo(num x, num y) native; | 12156 void moveTo(num x, num y) native; |
12059 | 12157 |
12060 /// @domName DOMWindow.openDatabase; @docsEditable true | 12158 /// @domName DOMWindow.openDatabase; @docsEditable true |
12061 @Creates('Database') @Creates('DatabaseSync') | 12159 @Creates('Database') @Creates('DatabaseSync') |
12062 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]) native; | 12160 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]) native; |
12063 | 12161 |
12064 /// @domName Window.postMessage; @docsEditable true | 12162 /// @domName Window.postMessage; @docsEditable true |
12065 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) { | 12163 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) { |
12066 if (?message && | 12164 if (?message && |
12067 !?messagePorts) { | 12165 !?messagePorts) { |
12068 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 12166 var message_1 = convertDartToNative_SerializedScriptValue(message); |
12069 _postMessage_1(message_1, targetOrigin); | 12167 _postMessage_1(message_1, targetOrigin); |
12070 return; | 12168 return; |
12071 } | 12169 } |
12072 if (?message) { | 12170 if (?message) { |
12073 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 12171 var message_2 = convertDartToNative_SerializedScriptValue(message); |
12074 _postMessage_2(message_2, targetOrigin, messagePorts); | 12172 _postMessage_2(message_2, targetOrigin, messagePorts); |
12075 return; | 12173 return; |
12076 } | 12174 } |
12077 throw new ArgumentError("Incorrect number or type of arguments"); | 12175 throw new ArgumentError("Incorrect number or type of arguments"); |
12078 } | 12176 } |
12079 void _postMessage_1(message, targetOrigin) native "postMessage"; | 12177 void _postMessage_1(message, targetOrigin) native "postMessage"; |
12080 void _postMessage_2(message, targetOrigin, List messagePorts) native "postMess
age"; | 12178 void _postMessage_2(message, targetOrigin, List messagePorts) native "postMess
age"; |
12081 | 12179 |
12082 /// @domName Window.print; @docsEditable true | 12180 /// @domName Window.print; @docsEditable true |
12083 void print() native; | 12181 void print() native; |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12994 } | 13092 } |
12995 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 13093 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12996 // for details. All rights reserved. Use of this source code is governed by a | 13094 // for details. All rights reserved. Use of this source code is governed by a |
12997 // BSD-style license that can be found in the LICENSE file. | 13095 // BSD-style license that can be found in the LICENSE file. |
12998 | 13096 |
12999 | 13097 |
13000 /// @domName MessageEvent; @docsEditable true | 13098 /// @domName MessageEvent; @docsEditable true |
13001 class MessageEvent extends Event native "*MessageEvent" { | 13099 class MessageEvent extends Event native "*MessageEvent" { |
13002 | 13100 |
13003 /// @domName MessageEvent.data; @docsEditable true | 13101 /// @domName MessageEvent.data; @docsEditable true |
13004 dynamic get data => _convertNativeToDart_SerializedScriptValue(this._data); | 13102 dynamic get data => convertNativeToDart_SerializedScriptValue(this._data); |
13005 dynamic get _data => JS("dynamic", "#.data", this); | 13103 dynamic get _data => JS("dynamic", "#.data", this); |
13006 | 13104 |
13007 /// @domName MessageEvent.lastEventId; @docsEditable true | 13105 /// @domName MessageEvent.lastEventId; @docsEditable true |
13008 final String lastEventId; | 13106 final String lastEventId; |
13009 | 13107 |
13010 /// @domName MessageEvent.origin; @docsEditable true | 13108 /// @domName MessageEvent.origin; @docsEditable true |
13011 final String origin; | 13109 final String origin; |
13012 | 13110 |
13013 /// @domName MessageEvent.ports; @docsEditable true | 13111 /// @domName MessageEvent.ports; @docsEditable true |
13014 @Creates('=List') | 13112 @Creates('=List') |
(...skipping 26 matching lines...) Expand all Loading... |
13041 | 13139 |
13042 /// @domName MessagePort.close; @docsEditable true | 13140 /// @domName MessagePort.close; @docsEditable true |
13043 void close() native; | 13141 void close() native; |
13044 | 13142 |
13045 /// @domName MessagePort.dispatchEvent; @docsEditable true | 13143 /// @domName MessagePort.dispatchEvent; @docsEditable true |
13046 bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; | 13144 bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; |
13047 | 13145 |
13048 /// @domName MessagePort.postMessage; @docsEditable true | 13146 /// @domName MessagePort.postMessage; @docsEditable true |
13049 void postMessage(/*any*/ message, [List messagePorts]) { | 13147 void postMessage(/*any*/ message, [List messagePorts]) { |
13050 if (?messagePorts) { | 13148 if (?messagePorts) { |
13051 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 13149 var message_1 = convertDartToNative_SerializedScriptValue(message); |
13052 _postMessage_1(message_1, messagePorts); | 13150 _postMessage_1(message_1, messagePorts); |
13053 return; | 13151 return; |
13054 } | 13152 } |
13055 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 13153 var message_2 = convertDartToNative_SerializedScriptValue(message); |
13056 _postMessage_2(message_2); | 13154 _postMessage_2(message_2); |
13057 return; | 13155 return; |
13058 } | 13156 } |
13059 void _postMessage_1(message, List messagePorts) native "postMessage"; | 13157 void _postMessage_1(message, List messagePorts) native "postMessage"; |
13060 void _postMessage_2(message) native "postMessage"; | 13158 void _postMessage_2(message) native "postMessage"; |
13061 | 13159 |
13062 /// @domName MessagePort.removeEventListener; @docsEditable true | 13160 /// @domName MessagePort.removeEventListener; @docsEditable true |
13063 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; | 13161 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; |
13064 | 13162 |
13065 /// @domName MessagePort.start; @docsEditable true | 13163 /// @domName MessagePort.start; @docsEditable true |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13312 | 13410 |
13313 class MutationObserver native "*MutationObserver" { | 13411 class MutationObserver native "*MutationObserver" { |
13314 | 13412 |
13315 factory MutationObserver(MutationCallback callback) => _MutationObserverFactor
yProvider.createMutationObserver(callback); | 13413 factory MutationObserver(MutationCallback callback) => _MutationObserverFactor
yProvider.createMutationObserver(callback); |
13316 | 13414 |
13317 /// @domName MutationObserver.disconnect; @docsEditable true | 13415 /// @domName MutationObserver.disconnect; @docsEditable true |
13318 void disconnect() native; | 13416 void disconnect() native; |
13319 | 13417 |
13320 /// @domName MutationObserver._observe; @docsEditable true | 13418 /// @domName MutationObserver._observe; @docsEditable true |
13321 void _observe(Node target, Map options) { | 13419 void _observe(Node target, Map options) { |
13322 var options_1 = _convertDartToNative_Dictionary(options); | 13420 var options_1 = convertDartToNative_Dictionary(options); |
13323 __observe_1(target, options_1); | 13421 __observe_1(target, options_1); |
13324 return; | 13422 return; |
13325 } | 13423 } |
13326 void __observe_1(Node target, options) native "observe"; | 13424 void __observe_1(Node target, options) native "observe"; |
13327 | 13425 |
13328 /// @domName MutationObserver.takeRecords; @docsEditable true | 13426 /// @domName MutationObserver.takeRecords; @docsEditable true |
13329 List<MutationRecord> takeRecords() native; | 13427 List<MutationRecord> takeRecords() native; |
13330 | 13428 |
13331 void observe(Node target, | 13429 void observe(Node target, |
13332 {Map options, | 13430 {Map options, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13461 } | 13559 } |
13462 | 13560 |
13463 void addLast(Node value) { | 13561 void addLast(Node value) { |
13464 throw new UnsupportedError("Cannot add to immutable List."); | 13562 throw new UnsupportedError("Cannot add to immutable List."); |
13465 } | 13563 } |
13466 | 13564 |
13467 void addAll(Collection<Node> collection) { | 13565 void addAll(Collection<Node> collection) { |
13468 throw new UnsupportedError("Cannot add to immutable List."); | 13566 throw new UnsupportedError("Cannot add to immutable List."); |
13469 } | 13567 } |
13470 | 13568 |
13471 bool contains(Node element) => _Collections.contains(this, element); | 13569 bool contains(Node element) => Collections.contains(this, element); |
13472 | 13570 |
13473 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 13571 void forEach(void f(Node element)) => Collections.forEach(this, f); |
13474 | 13572 |
13475 Collection map(f(Node element)) => _Collections.map(this, [], f); | 13573 Collection map(f(Node element)) => Collections.map(this, [], f); |
13476 | 13574 |
13477 Collection<Node> filter(bool f(Node element)) => | 13575 Collection<Node> filter(bool f(Node element)) => |
13478 _Collections.filter(this, <Node>[], f); | 13576 Collections.filter(this, <Node>[], f); |
13479 | 13577 |
13480 bool every(bool f(Node element)) => _Collections.every(this, f); | 13578 bool every(bool f(Node element)) => Collections.every(this, f); |
13481 | 13579 |
13482 bool some(bool f(Node element)) => _Collections.some(this, f); | 13580 bool some(bool f(Node element)) => Collections.some(this, f); |
13483 | 13581 |
13484 bool get isEmpty => this.length == 0; | 13582 bool get isEmpty => this.length == 0; |
13485 | 13583 |
13486 // From List<Node>: | 13584 // From List<Node>: |
13487 | 13585 |
13488 void sort([Comparator<Node> compare = Comparable.compare]) { | 13586 void sort([Comparator<Node> compare = Comparable.compare]) { |
13489 throw new UnsupportedError("Cannot sort immutable List."); | 13587 throw new UnsupportedError("Cannot sort immutable List."); |
13490 } | 13588 } |
13491 | 13589 |
13492 int indexOf(Node element, [int start = 0]) => | 13590 int indexOf(Node element, [int start = 0]) => |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13605 /// @domName Navigator.javaEnabled; @docsEditable true | 13703 /// @domName Navigator.javaEnabled; @docsEditable true |
13606 bool javaEnabled() native; | 13704 bool javaEnabled() native; |
13607 | 13705 |
13608 /// @domName Navigator.webkitGetGamepads; @docsEditable true | 13706 /// @domName Navigator.webkitGetGamepads; @docsEditable true |
13609 @Returns('_GamepadList') @Creates('_GamepadList') | 13707 @Returns('_GamepadList') @Creates('_GamepadList') |
13610 List<Gamepad> webkitGetGamepads() native; | 13708 List<Gamepad> webkitGetGamepads() native; |
13611 | 13709 |
13612 /// @domName Navigator.webkitGetUserMedia; @docsEditable true | 13710 /// @domName Navigator.webkitGetUserMedia; @docsEditable true |
13613 void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback success
Callback, [NavigatorUserMediaErrorCallback errorCallback]) { | 13711 void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback success
Callback, [NavigatorUserMediaErrorCallback errorCallback]) { |
13614 if (?errorCallback) { | 13712 if (?errorCallback) { |
13615 var options_1 = _convertDartToNative_Dictionary(options); | 13713 var options_1 = convertDartToNative_Dictionary(options); |
13616 _webkitGetUserMedia_1(options_1, successCallback, errorCallback); | 13714 _webkitGetUserMedia_1(options_1, successCallback, errorCallback); |
13617 return; | 13715 return; |
13618 } | 13716 } |
13619 var options_2 = _convertDartToNative_Dictionary(options); | 13717 var options_2 = convertDartToNative_Dictionary(options); |
13620 _webkitGetUserMedia_2(options_2, successCallback); | 13718 _webkitGetUserMedia_2(options_2, successCallback); |
13621 return; | 13719 return; |
13622 } | 13720 } |
13623 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC
allback, NavigatorUserMediaErrorCallback errorCallback) native "webkitGetUserMed
ia"; | 13721 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC
allback, NavigatorUserMediaErrorCallback errorCallback) native "webkitGetUserMed
ia"; |
13624 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC
allback) native "webkitGetUserMedia"; | 13722 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC
allback) native "webkitGetUserMedia"; |
13625 } | 13723 } |
13626 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 13724 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
13627 // for details. All rights reserved. Use of this source code is governed by a | 13725 // for details. All rights reserved. Use of this source code is governed by a |
13628 // BSD-style license that can be found in the LICENSE file. | 13726 // BSD-style license that can be found in the LICENSE file. |
13629 | 13727 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13699 } | 13797 } |
13700 | 13798 |
13701 void operator []=(int index, Node value) { | 13799 void operator []=(int index, Node value) { |
13702 _this.$dom_replaceChild(value, this[index]); | 13800 _this.$dom_replaceChild(value, this[index]); |
13703 } | 13801 } |
13704 | 13802 |
13705 Iterator<Node> iterator() => _this.$dom_childNodes.iterator(); | 13803 Iterator<Node> iterator() => _this.$dom_childNodes.iterator(); |
13706 | 13804 |
13707 // TODO(jacobr): We can implement these methods much more efficiently by | 13805 // TODO(jacobr): We can implement these methods much more efficiently by |
13708 // looking up the nodeList only once instead of once per iteration. | 13806 // looking up the nodeList only once instead of once per iteration. |
13709 bool contains(Node element) => _Collections.contains(this, element); | 13807 bool contains(Node element) => Collections.contains(this, element); |
13710 | 13808 |
13711 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 13809 void forEach(void f(Node element)) => Collections.forEach(this, f); |
13712 | 13810 |
13713 Collection map(f(Node element)) => _Collections.map(this, [], f); | 13811 Collection map(f(Node element)) => Collections.map(this, [], f); |
13714 | 13812 |
13715 Collection<Node> filter(bool f(Node element)) => | 13813 Collection<Node> filter(bool f(Node element)) => |
13716 _Collections.filter(this, <Node>[], f); | 13814 Collections.filter(this, <Node>[], f); |
13717 | 13815 |
13718 bool every(bool f(Node element)) => _Collections.every(this, f); | 13816 bool every(bool f(Node element)) => Collections.every(this, f); |
13719 | 13817 |
13720 bool some(bool f(Node element)) => _Collections.some(this, f); | 13818 bool some(bool f(Node element)) => Collections.some(this, f); |
13721 | 13819 |
13722 bool get isEmpty => this.length == 0; | 13820 bool get isEmpty => this.length == 0; |
13723 | 13821 |
13724 // From List<Node>: | 13822 // From List<Node>: |
13725 | 13823 |
13726 // TODO(jacobr): this could be implemented for child node lists. | 13824 // TODO(jacobr): this could be implemented for child node lists. |
13727 // The exception we throw here is misleading. | 13825 // The exception we throw here is misleading. |
13728 void sort([Comparator<Node> compare = Comparable.compare]) { | 13826 void sort([Comparator<Node> compare = Comparable.compare]) { |
13729 throw new UnsupportedError("Cannot sort immutable List."); | 13827 throw new UnsupportedError("Cannot sort immutable List."); |
13730 } | 13828 } |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14612 /// @domName PeerConnection00.remoteStreams; @docsEditable true | 14710 /// @domName PeerConnection00.remoteStreams; @docsEditable true |
14613 @Returns('_MediaStreamList') @Creates('_MediaStreamList') | 14711 @Returns('_MediaStreamList') @Creates('_MediaStreamList') |
14614 final List<MediaStream> remoteStreams; | 14712 final List<MediaStream> remoteStreams; |
14615 | 14713 |
14616 /// @domName PeerConnection00.addEventListener; @docsEditable true | 14714 /// @domName PeerConnection00.addEventListener; @docsEditable true |
14617 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 14715 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
14618 | 14716 |
14619 /// @domName PeerConnection00.addStream; @docsEditable true | 14717 /// @domName PeerConnection00.addStream; @docsEditable true |
14620 void addStream(MediaStream stream, [Map mediaStreamHints]) { | 14718 void addStream(MediaStream stream, [Map mediaStreamHints]) { |
14621 if (?mediaStreamHints) { | 14719 if (?mediaStreamHints) { |
14622 var mediaStreamHints_1 = _convertDartToNative_Dictionary(mediaStreamHints)
; | 14720 var mediaStreamHints_1 = convertDartToNative_Dictionary(mediaStreamHints); |
14623 _addStream_1(stream, mediaStreamHints_1); | 14721 _addStream_1(stream, mediaStreamHints_1); |
14624 return; | 14722 return; |
14625 } | 14723 } |
14626 _addStream_2(stream); | 14724 _addStream_2(stream); |
14627 return; | 14725 return; |
14628 } | 14726 } |
14629 void _addStream_1(MediaStream stream, mediaStreamHints) native "addStream"; | 14727 void _addStream_1(MediaStream stream, mediaStreamHints) native "addStream"; |
14630 void _addStream_2(MediaStream stream) native "addStream"; | 14728 void _addStream_2(MediaStream stream) native "addStream"; |
14631 | 14729 |
14632 /// @domName PeerConnection00.close; @docsEditable true | 14730 /// @domName PeerConnection00.close; @docsEditable true |
14633 void close() native; | 14731 void close() native; |
14634 | 14732 |
14635 /// @domName PeerConnection00.createAnswer; @docsEditable true | 14733 /// @domName PeerConnection00.createAnswer; @docsEditable true |
14636 SessionDescription createAnswer(String offer, [Map mediaHints]) { | 14734 SessionDescription createAnswer(String offer, [Map mediaHints]) { |
14637 if (?mediaHints) { | 14735 if (?mediaHints) { |
14638 var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints); | 14736 var mediaHints_1 = convertDartToNative_Dictionary(mediaHints); |
14639 return _createAnswer_1(offer, mediaHints_1); | 14737 return _createAnswer_1(offer, mediaHints_1); |
14640 } | 14738 } |
14641 return _createAnswer_2(offer); | 14739 return _createAnswer_2(offer); |
14642 } | 14740 } |
14643 SessionDescription _createAnswer_1(offer, mediaHints) native "createAnswer"; | 14741 SessionDescription _createAnswer_1(offer, mediaHints) native "createAnswer"; |
14644 SessionDescription _createAnswer_2(offer) native "createAnswer"; | 14742 SessionDescription _createAnswer_2(offer) native "createAnswer"; |
14645 | 14743 |
14646 /// @domName PeerConnection00.createOffer; @docsEditable true | 14744 /// @domName PeerConnection00.createOffer; @docsEditable true |
14647 SessionDescription createOffer([Map mediaHints]) { | 14745 SessionDescription createOffer([Map mediaHints]) { |
14648 if (?mediaHints) { | 14746 if (?mediaHints) { |
14649 var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints); | 14747 var mediaHints_1 = convertDartToNative_Dictionary(mediaHints); |
14650 return _createOffer_1(mediaHints_1); | 14748 return _createOffer_1(mediaHints_1); |
14651 } | 14749 } |
14652 return _createOffer_2(); | 14750 return _createOffer_2(); |
14653 } | 14751 } |
14654 SessionDescription _createOffer_1(mediaHints) native "createOffer"; | 14752 SessionDescription _createOffer_1(mediaHints) native "createOffer"; |
14655 SessionDescription _createOffer_2() native "createOffer"; | 14753 SessionDescription _createOffer_2() native "createOffer"; |
14656 | 14754 |
14657 /// @domName PeerConnection00.dispatchEvent; @docsEditable true | 14755 /// @domName PeerConnection00.dispatchEvent; @docsEditable true |
14658 bool $dom_dispatchEvent(Event event) native "dispatchEvent"; | 14756 bool $dom_dispatchEvent(Event event) native "dispatchEvent"; |
14659 | 14757 |
14660 /// @domName PeerConnection00.processIceMessage; @docsEditable true | 14758 /// @domName PeerConnection00.processIceMessage; @docsEditable true |
14661 void processIceMessage(IceCandidate candidate) native; | 14759 void processIceMessage(IceCandidate candidate) native; |
14662 | 14760 |
14663 /// @domName PeerConnection00.removeEventListener; @docsEditable true | 14761 /// @domName PeerConnection00.removeEventListener; @docsEditable true |
14664 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; | 14762 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; |
14665 | 14763 |
14666 /// @domName PeerConnection00.removeStream; @docsEditable true | 14764 /// @domName PeerConnection00.removeStream; @docsEditable true |
14667 void removeStream(MediaStream stream) native; | 14765 void removeStream(MediaStream stream) native; |
14668 | 14766 |
14669 /// @domName PeerConnection00.setLocalDescription; @docsEditable true | 14767 /// @domName PeerConnection00.setLocalDescription; @docsEditable true |
14670 void setLocalDescription(int action, SessionDescription desc) native; | 14768 void setLocalDescription(int action, SessionDescription desc) native; |
14671 | 14769 |
14672 /// @domName PeerConnection00.setRemoteDescription; @docsEditable true | 14770 /// @domName PeerConnection00.setRemoteDescription; @docsEditable true |
14673 void setRemoteDescription(int action, SessionDescription desc) native; | 14771 void setRemoteDescription(int action, SessionDescription desc) native; |
14674 | 14772 |
14675 /// @domName PeerConnection00.startIce; @docsEditable true | 14773 /// @domName PeerConnection00.startIce; @docsEditable true |
14676 void startIce([Map iceOptions]) { | 14774 void startIce([Map iceOptions]) { |
14677 if (?iceOptions) { | 14775 if (?iceOptions) { |
14678 var iceOptions_1 = _convertDartToNative_Dictionary(iceOptions); | 14776 var iceOptions_1 = convertDartToNative_Dictionary(iceOptions); |
14679 _startIce_1(iceOptions_1); | 14777 _startIce_1(iceOptions_1); |
14680 return; | 14778 return; |
14681 } | 14779 } |
14682 _startIce_2(); | 14780 _startIce_2(); |
14683 return; | 14781 return; |
14684 } | 14782 } |
14685 void _startIce_1(iceOptions) native "startIce"; | 14783 void _startIce_1(iceOptions) native "startIce"; |
14686 void _startIce_2() native "startIce"; | 14784 void _startIce_2() native "startIce"; |
14687 } | 14785 } |
14688 | 14786 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14831 } | 14929 } |
14832 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14930 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
14833 // for details. All rights reserved. Use of this source code is governed by a | 14931 // for details. All rights reserved. Use of this source code is governed by a |
14834 // BSD-style license that can be found in the LICENSE file. | 14932 // BSD-style license that can be found in the LICENSE file. |
14835 | 14933 |
14836 | 14934 |
14837 /// @domName PopStateEvent; @docsEditable true | 14935 /// @domName PopStateEvent; @docsEditable true |
14838 class PopStateEvent extends Event native "*PopStateEvent" { | 14936 class PopStateEvent extends Event native "*PopStateEvent" { |
14839 | 14937 |
14840 /// @domName PopStateEvent.state; @docsEditable true | 14938 /// @domName PopStateEvent.state; @docsEditable true |
14841 dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state); | 14939 dynamic get state => convertNativeToDart_SerializedScriptValue(this._state); |
14842 dynamic get _state => JS("dynamic", "#.state", this); | 14940 dynamic get _state => JS("dynamic", "#.state", this); |
14843 } | 14941 } |
14844 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14942 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
14845 // for details. All rights reserved. Use of this source code is governed by a | 14943 // for details. All rights reserved. Use of this source code is governed by a |
14846 // BSD-style license that can be found in the LICENSE file. | 14944 // BSD-style license that can be found in the LICENSE file. |
14847 | 14945 |
14848 // WARNING: Do not edit - generated code. | 14946 // WARNING: Do not edit - generated code. |
14849 | 14947 |
14850 | 14948 |
14851 typedef void PositionCallback(Geoposition position); | 14949 typedef void PositionCallback(Geoposition position); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15122 | 15220 |
15123 /// @domName RTCPeerConnection.addEventListener; @docsEditable true | 15221 /// @domName RTCPeerConnection.addEventListener; @docsEditable true |
15124 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 15222 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
15125 | 15223 |
15126 /// @domName RTCPeerConnection.addIceCandidate; @docsEditable true | 15224 /// @domName RTCPeerConnection.addIceCandidate; @docsEditable true |
15127 void addIceCandidate(RTCIceCandidate candidate) native; | 15225 void addIceCandidate(RTCIceCandidate candidate) native; |
15128 | 15226 |
15129 /// @domName RTCPeerConnection.addStream; @docsEditable true | 15227 /// @domName RTCPeerConnection.addStream; @docsEditable true |
15130 void addStream(MediaStream stream, [Map mediaConstraints]) { | 15228 void addStream(MediaStream stream, [Map mediaConstraints]) { |
15131 if (?mediaConstraints) { | 15229 if (?mediaConstraints) { |
15132 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 15230 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
15133 _addStream_1(stream, mediaConstraints_1); | 15231 _addStream_1(stream, mediaConstraints_1); |
15134 return; | 15232 return; |
15135 } | 15233 } |
15136 _addStream_2(stream); | 15234 _addStream_2(stream); |
15137 return; | 15235 return; |
15138 } | 15236 } |
15139 void _addStream_1(MediaStream stream, mediaConstraints) native "addStream"; | 15237 void _addStream_1(MediaStream stream, mediaConstraints) native "addStream"; |
15140 void _addStream_2(MediaStream stream) native "addStream"; | 15238 void _addStream_2(MediaStream stream) native "addStream"; |
15141 | 15239 |
15142 /// @domName RTCPeerConnection.close; @docsEditable true | 15240 /// @domName RTCPeerConnection.close; @docsEditable true |
15143 void close() native; | 15241 void close() native; |
15144 | 15242 |
15145 /// @domName RTCPeerConnection.createAnswer; @docsEditable true | 15243 /// @domName RTCPeerConnection.createAnswer; @docsEditable true |
15146 void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCall
back failureCallback, Map mediaConstraints]) { | 15244 void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCall
back failureCallback, Map mediaConstraints]) { |
15147 if (?mediaConstraints) { | 15245 if (?mediaConstraints) { |
15148 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 15246 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
15149 _createAnswer_1(successCallback, failureCallback, mediaConstraints_1); | 15247 _createAnswer_1(successCallback, failureCallback, mediaConstraints_1); |
15150 return; | 15248 return; |
15151 } | 15249 } |
15152 _createAnswer_2(successCallback, failureCallback); | 15250 _createAnswer_2(successCallback, failureCallback); |
15153 return; | 15251 return; |
15154 } | 15252 } |
15155 void _createAnswer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback, mediaConstraints) native "createAnswer"; | 15253 void _createAnswer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback, mediaConstraints) native "createAnswer"; |
15156 void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback) native "createAnswer"; | 15254 void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback) native "createAnswer"; |
15157 | 15255 |
15158 /// @domName RTCPeerConnection.createDataChannel; @docsEditable true | 15256 /// @domName RTCPeerConnection.createDataChannel; @docsEditable true |
15159 RTCDataChannel createDataChannel(String label, [Map options]) { | 15257 RTCDataChannel createDataChannel(String label, [Map options]) { |
15160 if (?options) { | 15258 if (?options) { |
15161 var options_1 = _convertDartToNative_Dictionary(options); | 15259 var options_1 = convertDartToNative_Dictionary(options); |
15162 return _createDataChannel_1(label, options_1); | 15260 return _createDataChannel_1(label, options_1); |
15163 } | 15261 } |
15164 return _createDataChannel_2(label); | 15262 return _createDataChannel_2(label); |
15165 } | 15263 } |
15166 RTCDataChannel _createDataChannel_1(label, options) native "createDataChannel"
; | 15264 RTCDataChannel _createDataChannel_1(label, options) native "createDataChannel"
; |
15167 RTCDataChannel _createDataChannel_2(label) native "createDataChannel"; | 15265 RTCDataChannel _createDataChannel_2(label) native "createDataChannel"; |
15168 | 15266 |
15169 /// @domName RTCPeerConnection.createOffer; @docsEditable true | 15267 /// @domName RTCPeerConnection.createOffer; @docsEditable true |
15170 void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallb
ack failureCallback, Map mediaConstraints]) { | 15268 void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallb
ack failureCallback, Map mediaConstraints]) { |
15171 if (?mediaConstraints) { | 15269 if (?mediaConstraints) { |
15172 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 15270 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
15173 _createOffer_1(successCallback, failureCallback, mediaConstraints_1); | 15271 _createOffer_1(successCallback, failureCallback, mediaConstraints_1); |
15174 return; | 15272 return; |
15175 } | 15273 } |
15176 _createOffer_2(successCallback, failureCallback); | 15274 _createOffer_2(successCallback, failureCallback); |
15177 return; | 15275 return; |
15178 } | 15276 } |
15179 void _createOffer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback, mediaConstraints) native "createOffer"; | 15277 void _createOffer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback, mediaConstraints) native "createOffer"; |
15180 void _createOffer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback) native "createOffer"; | 15278 void _createOffer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback) native "createOffer"; |
15181 | 15279 |
15182 /// @domName RTCPeerConnection.dispatchEvent; @docsEditable true | 15280 /// @domName RTCPeerConnection.dispatchEvent; @docsEditable true |
(...skipping 10 matching lines...) Expand all Loading... |
15193 | 15291 |
15194 /// @domName RTCPeerConnection.setLocalDescription; @docsEditable true | 15292 /// @domName RTCPeerConnection.setLocalDescription; @docsEditable true |
15195 void setLocalDescription(RTCSessionDescription description, [VoidCallback succ
essCallback, RTCErrorCallback failureCallback]) native; | 15293 void setLocalDescription(RTCSessionDescription description, [VoidCallback succ
essCallback, RTCErrorCallback failureCallback]) native; |
15196 | 15294 |
15197 /// @domName RTCPeerConnection.setRemoteDescription; @docsEditable true | 15295 /// @domName RTCPeerConnection.setRemoteDescription; @docsEditable true |
15198 void setRemoteDescription(RTCSessionDescription description, [VoidCallback suc
cessCallback, RTCErrorCallback failureCallback]) native; | 15296 void setRemoteDescription(RTCSessionDescription description, [VoidCallback suc
cessCallback, RTCErrorCallback failureCallback]) native; |
15199 | 15297 |
15200 /// @domName RTCPeerConnection.updateIce; @docsEditable true | 15298 /// @domName RTCPeerConnection.updateIce; @docsEditable true |
15201 void updateIce([Map configuration, Map mediaConstraints]) { | 15299 void updateIce([Map configuration, Map mediaConstraints]) { |
15202 if (?mediaConstraints) { | 15300 if (?mediaConstraints) { |
15203 var configuration_1 = _convertDartToNative_Dictionary(configuration); | 15301 var configuration_1 = convertDartToNative_Dictionary(configuration); |
15204 var mediaConstraints_2 = _convertDartToNative_Dictionary(mediaConstraints)
; | 15302 var mediaConstraints_2 = convertDartToNative_Dictionary(mediaConstraints); |
15205 _updateIce_1(configuration_1, mediaConstraints_2); | 15303 _updateIce_1(configuration_1, mediaConstraints_2); |
15206 return; | 15304 return; |
15207 } | 15305 } |
15208 if (?configuration) { | 15306 if (?configuration) { |
15209 var configuration_3 = _convertDartToNative_Dictionary(configuration); | 15307 var configuration_3 = convertDartToNative_Dictionary(configuration); |
15210 _updateIce_2(configuration_3); | 15308 _updateIce_2(configuration_3); |
15211 return; | 15309 return; |
15212 } | 15310 } |
15213 _updateIce_3(); | 15311 _updateIce_3(); |
15214 return; | 15312 return; |
15215 } | 15313 } |
15216 void _updateIce_1(configuration, mediaConstraints) native "updateIce"; | 15314 void _updateIce_1(configuration, mediaConstraints) native "updateIce"; |
15217 void _updateIce_2(configuration) native "updateIce"; | 15315 void _updateIce_2(configuration) native "updateIce"; |
15218 void _updateIce_3() native "updateIce"; | 15316 void _updateIce_3() native "updateIce"; |
15219 } | 15317 } |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15599 } | 15697 } |
15600 | 15698 |
15601 void addLast(Map value) { | 15699 void addLast(Map value) { |
15602 throw new UnsupportedError("Cannot add to immutable List."); | 15700 throw new UnsupportedError("Cannot add to immutable List."); |
15603 } | 15701 } |
15604 | 15702 |
15605 void addAll(Collection<Map> collection) { | 15703 void addAll(Collection<Map> collection) { |
15606 throw new UnsupportedError("Cannot add to immutable List."); | 15704 throw new UnsupportedError("Cannot add to immutable List."); |
15607 } | 15705 } |
15608 | 15706 |
15609 bool contains(Map element) => _Collections.contains(this, element); | 15707 bool contains(Map element) => Collections.contains(this, element); |
15610 | 15708 |
15611 void forEach(void f(Map element)) => _Collections.forEach(this, f); | 15709 void forEach(void f(Map element)) => Collections.forEach(this, f); |
15612 | 15710 |
15613 Collection map(f(Map element)) => _Collections.map(this, [], f); | 15711 Collection map(f(Map element)) => Collections.map(this, [], f); |
15614 | 15712 |
15615 Collection<Map> filter(bool f(Map element)) => | 15713 Collection<Map> filter(bool f(Map element)) => |
15616 _Collections.filter(this, <Map>[], f); | 15714 Collections.filter(this, <Map>[], f); |
15617 | 15715 |
15618 bool every(bool f(Map element)) => _Collections.every(this, f); | 15716 bool every(bool f(Map element)) => Collections.every(this, f); |
15619 | 15717 |
15620 bool some(bool f(Map element)) => _Collections.some(this, f); | 15718 bool some(bool f(Map element)) => Collections.some(this, f); |
15621 | 15719 |
15622 bool get isEmpty => this.length == 0; | 15720 bool get isEmpty => this.length == 0; |
15623 | 15721 |
15624 // From List<Map>: | 15722 // From List<Map>: |
15625 | 15723 |
15626 void sort([Comparator<Map> compare = Comparable.compare]) { | 15724 void sort([Comparator<Map> compare = Comparable.compare]) { |
15627 throw new UnsupportedError("Cannot sort immutable List."); | 15725 throw new UnsupportedError("Cannot sort immutable List."); |
15628 } | 15726 } |
15629 | 15727 |
15630 int indexOf(Map element, [int start = 0]) => | 15728 int indexOf(Map element, [int start = 0]) => |
(...skipping 24 matching lines...) Expand all Loading... |
15655 throw new UnsupportedError("Cannot insertRange on immutable List."); | 15753 throw new UnsupportedError("Cannot insertRange on immutable List."); |
15656 } | 15754 } |
15657 | 15755 |
15658 List<Map> getRange(int start, int rangeLength) => | 15756 List<Map> getRange(int start, int rangeLength) => |
15659 _Lists.getRange(this, start, rangeLength, <Map>[]); | 15757 _Lists.getRange(this, start, rangeLength, <Map>[]); |
15660 | 15758 |
15661 // -- end List<Map> mixins. | 15759 // -- end List<Map> mixins. |
15662 | 15760 |
15663 /// @domName SQLResultSetRowList.item; @docsEditable true | 15761 /// @domName SQLResultSetRowList.item; @docsEditable true |
15664 Map item(int index) { | 15762 Map item(int index) { |
15665 return _convertNativeToDart_Dictionary(_item_1(index)); | 15763 return convertNativeToDart_Dictionary(_item_1(index)); |
15666 } | 15764 } |
15667 @Creates('=Object') | 15765 @Creates('=Object') |
15668 _item_1(index) native "item"; | 15766 _item_1(index) native "item"; |
15669 } | 15767 } |
15670 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 15768 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
15671 // for details. All rights reserved. Use of this source code is governed by a | 15769 // for details. All rights reserved. Use of this source code is governed by a |
15672 // BSD-style license that can be found in the LICENSE file. | 15770 // BSD-style license that can be found in the LICENSE file. |
15673 | 15771 |
15674 // WARNING: Do not edit - generated code. | 15772 // WARNING: Do not edit - generated code. |
15675 | 15773 |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16115 } | 16213 } |
16116 | 16214 |
16117 void addLast(SourceBuffer value) { | 16215 void addLast(SourceBuffer value) { |
16118 throw new UnsupportedError("Cannot add to immutable List."); | 16216 throw new UnsupportedError("Cannot add to immutable List."); |
16119 } | 16217 } |
16120 | 16218 |
16121 void addAll(Collection<SourceBuffer> collection) { | 16219 void addAll(Collection<SourceBuffer> collection) { |
16122 throw new UnsupportedError("Cannot add to immutable List."); | 16220 throw new UnsupportedError("Cannot add to immutable List."); |
16123 } | 16221 } |
16124 | 16222 |
16125 bool contains(SourceBuffer element) => _Collections.contains(this, element); | 16223 bool contains(SourceBuffer element) => Collections.contains(this, element); |
16126 | 16224 |
16127 void forEach(void f(SourceBuffer element)) => _Collections.forEach(this, f); | 16225 void forEach(void f(SourceBuffer element)) => Collections.forEach(this, f); |
16128 | 16226 |
16129 Collection map(f(SourceBuffer element)) => _Collections.map(this, [], f); | 16227 Collection map(f(SourceBuffer element)) => Collections.map(this, [], f); |
16130 | 16228 |
16131 Collection<SourceBuffer> filter(bool f(SourceBuffer element)) => | 16229 Collection<SourceBuffer> filter(bool f(SourceBuffer element)) => |
16132 _Collections.filter(this, <SourceBuffer>[], f); | 16230 Collections.filter(this, <SourceBuffer>[], f); |
16133 | 16231 |
16134 bool every(bool f(SourceBuffer element)) => _Collections.every(this, f); | 16232 bool every(bool f(SourceBuffer element)) => Collections.every(this, f); |
16135 | 16233 |
16136 bool some(bool f(SourceBuffer element)) => _Collections.some(this, f); | 16234 bool some(bool f(SourceBuffer element)) => Collections.some(this, f); |
16137 | 16235 |
16138 bool get isEmpty => this.length == 0; | 16236 bool get isEmpty => this.length == 0; |
16139 | 16237 |
16140 // From List<SourceBuffer>: | 16238 // From List<SourceBuffer>: |
16141 | 16239 |
16142 void sort([Comparator<SourceBuffer> compare = Comparable.compare]) { | 16240 void sort([Comparator<SourceBuffer> compare = Comparable.compare]) { |
16143 throw new UnsupportedError("Cannot sort immutable List."); | 16241 throw new UnsupportedError("Cannot sort immutable List."); |
16144 } | 16242 } |
16145 | 16243 |
16146 int indexOf(SourceBuffer element, [int start = 0]) => | 16244 int indexOf(SourceBuffer element, [int start = 0]) => |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16270 } | 16368 } |
16271 | 16369 |
16272 void addLast(SpeechGrammar value) { | 16370 void addLast(SpeechGrammar value) { |
16273 throw new UnsupportedError("Cannot add to immutable List."); | 16371 throw new UnsupportedError("Cannot add to immutable List."); |
16274 } | 16372 } |
16275 | 16373 |
16276 void addAll(Collection<SpeechGrammar> collection) { | 16374 void addAll(Collection<SpeechGrammar> collection) { |
16277 throw new UnsupportedError("Cannot add to immutable List."); | 16375 throw new UnsupportedError("Cannot add to immutable List."); |
16278 } | 16376 } |
16279 | 16377 |
16280 bool contains(SpeechGrammar element) => _Collections.contains(this, element); | 16378 bool contains(SpeechGrammar element) => Collections.contains(this, element); |
16281 | 16379 |
16282 void forEach(void f(SpeechGrammar element)) => _Collections.forEach(this, f); | 16380 void forEach(void f(SpeechGrammar element)) => Collections.forEach(this, f); |
16283 | 16381 |
16284 Collection map(f(SpeechGrammar element)) => _Collections.map(this, [], f); | 16382 Collection map(f(SpeechGrammar element)) => Collections.map(this, [], f); |
16285 | 16383 |
16286 Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) => | 16384 Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) => |
16287 _Collections.filter(this, <SpeechGrammar>[], f); | 16385 Collections.filter(this, <SpeechGrammar>[], f); |
16288 | 16386 |
16289 bool every(bool f(SpeechGrammar element)) => _Collections.every(this, f); | 16387 bool every(bool f(SpeechGrammar element)) => Collections.every(this, f); |
16290 | 16388 |
16291 bool some(bool f(SpeechGrammar element)) => _Collections.some(this, f); | 16389 bool some(bool f(SpeechGrammar element)) => Collections.some(this, f); |
16292 | 16390 |
16293 bool get isEmpty => this.length == 0; | 16391 bool get isEmpty => this.length == 0; |
16294 | 16392 |
16295 // From List<SpeechGrammar>: | 16393 // From List<SpeechGrammar>: |
16296 | 16394 |
16297 void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) { | 16395 void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) { |
16298 throw new UnsupportedError("Cannot sort immutable List."); | 16396 throw new UnsupportedError("Cannot sort immutable List."); |
16299 } | 16397 } |
16300 | 16398 |
16301 int indexOf(SpeechGrammar element, [int start = 0]) => | 16399 int indexOf(SpeechGrammar element, [int start = 0]) => |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17288 } | 17386 } |
17289 | 17387 |
17290 void addLast(TextTrackCue value) { | 17388 void addLast(TextTrackCue value) { |
17291 throw new UnsupportedError("Cannot add to immutable List."); | 17389 throw new UnsupportedError("Cannot add to immutable List."); |
17292 } | 17390 } |
17293 | 17391 |
17294 void addAll(Collection<TextTrackCue> collection) { | 17392 void addAll(Collection<TextTrackCue> collection) { |
17295 throw new UnsupportedError("Cannot add to immutable List."); | 17393 throw new UnsupportedError("Cannot add to immutable List."); |
17296 } | 17394 } |
17297 | 17395 |
17298 bool contains(TextTrackCue element) => _Collections.contains(this, element); | 17396 bool contains(TextTrackCue element) => Collections.contains(this, element); |
17299 | 17397 |
17300 void forEach(void f(TextTrackCue element)) => _Collections.forEach(this, f); | 17398 void forEach(void f(TextTrackCue element)) => Collections.forEach(this, f); |
17301 | 17399 |
17302 Collection map(f(TextTrackCue element)) => _Collections.map(this, [], f); | 17400 Collection map(f(TextTrackCue element)) => Collections.map(this, [], f); |
17303 | 17401 |
17304 Collection<TextTrackCue> filter(bool f(TextTrackCue element)) => | 17402 Collection<TextTrackCue> filter(bool f(TextTrackCue element)) => |
17305 _Collections.filter(this, <TextTrackCue>[], f); | 17403 Collections.filter(this, <TextTrackCue>[], f); |
17306 | 17404 |
17307 bool every(bool f(TextTrackCue element)) => _Collections.every(this, f); | 17405 bool every(bool f(TextTrackCue element)) => Collections.every(this, f); |
17308 | 17406 |
17309 bool some(bool f(TextTrackCue element)) => _Collections.some(this, f); | 17407 bool some(bool f(TextTrackCue element)) => Collections.some(this, f); |
17310 | 17408 |
17311 bool get isEmpty => this.length == 0; | 17409 bool get isEmpty => this.length == 0; |
17312 | 17410 |
17313 // From List<TextTrackCue>: | 17411 // From List<TextTrackCue>: |
17314 | 17412 |
17315 void sort([Comparator<TextTrackCue> compare = Comparable.compare]) { | 17413 void sort([Comparator<TextTrackCue> compare = Comparable.compare]) { |
17316 throw new UnsupportedError("Cannot sort immutable List."); | 17414 throw new UnsupportedError("Cannot sort immutable List."); |
17317 } | 17415 } |
17318 | 17416 |
17319 int indexOf(TextTrackCue element, [int start = 0]) => | 17417 int indexOf(TextTrackCue element, [int start = 0]) => |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17394 } | 17492 } |
17395 | 17493 |
17396 void addLast(TextTrack value) { | 17494 void addLast(TextTrack value) { |
17397 throw new UnsupportedError("Cannot add to immutable List."); | 17495 throw new UnsupportedError("Cannot add to immutable List."); |
17398 } | 17496 } |
17399 | 17497 |
17400 void addAll(Collection<TextTrack> collection) { | 17498 void addAll(Collection<TextTrack> collection) { |
17401 throw new UnsupportedError("Cannot add to immutable List."); | 17499 throw new UnsupportedError("Cannot add to immutable List."); |
17402 } | 17500 } |
17403 | 17501 |
17404 bool contains(TextTrack element) => _Collections.contains(this, element); | 17502 bool contains(TextTrack element) => Collections.contains(this, element); |
17405 | 17503 |
17406 void forEach(void f(TextTrack element)) => _Collections.forEach(this, f); | 17504 void forEach(void f(TextTrack element)) => Collections.forEach(this, f); |
17407 | 17505 |
17408 Collection map(f(TextTrack element)) => _Collections.map(this, [], f); | 17506 Collection map(f(TextTrack element)) => Collections.map(this, [], f); |
17409 | 17507 |
17410 Collection<TextTrack> filter(bool f(TextTrack element)) => | 17508 Collection<TextTrack> filter(bool f(TextTrack element)) => |
17411 _Collections.filter(this, <TextTrack>[], f); | 17509 Collections.filter(this, <TextTrack>[], f); |
17412 | 17510 |
17413 bool every(bool f(TextTrack element)) => _Collections.every(this, f); | 17511 bool every(bool f(TextTrack element)) => Collections.every(this, f); |
17414 | 17512 |
17415 bool some(bool f(TextTrack element)) => _Collections.some(this, f); | 17513 bool some(bool f(TextTrack element)) => Collections.some(this, f); |
17416 | 17514 |
17417 bool get isEmpty => this.length == 0; | 17515 bool get isEmpty => this.length == 0; |
17418 | 17516 |
17419 // From List<TextTrack>: | 17517 // From List<TextTrack>: |
17420 | 17518 |
17421 void sort([Comparator<TextTrack> compare = Comparable.compare]) { | 17519 void sort([Comparator<TextTrack> compare = Comparable.compare]) { |
17422 throw new UnsupportedError("Cannot sort immutable List."); | 17520 throw new UnsupportedError("Cannot sort immutable List."); |
17423 } | 17521 } |
17424 | 17522 |
17425 int indexOf(TextTrack element, [int start = 0]) => | 17523 int indexOf(TextTrack element, [int start = 0]) => |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17620 } | 17718 } |
17621 | 17719 |
17622 void addLast(Touch value) { | 17720 void addLast(Touch value) { |
17623 throw new UnsupportedError("Cannot add to immutable List."); | 17721 throw new UnsupportedError("Cannot add to immutable List."); |
17624 } | 17722 } |
17625 | 17723 |
17626 void addAll(Collection<Touch> collection) { | 17724 void addAll(Collection<Touch> collection) { |
17627 throw new UnsupportedError("Cannot add to immutable List."); | 17725 throw new UnsupportedError("Cannot add to immutable List."); |
17628 } | 17726 } |
17629 | 17727 |
17630 bool contains(Touch element) => _Collections.contains(this, element); | 17728 bool contains(Touch element) => Collections.contains(this, element); |
17631 | 17729 |
17632 void forEach(void f(Touch element)) => _Collections.forEach(this, f); | 17730 void forEach(void f(Touch element)) => Collections.forEach(this, f); |
17633 | 17731 |
17634 Collection map(f(Touch element)) => _Collections.map(this, [], f); | 17732 Collection map(f(Touch element)) => Collections.map(this, [], f); |
17635 | 17733 |
17636 Collection<Touch> filter(bool f(Touch element)) => | 17734 Collection<Touch> filter(bool f(Touch element)) => |
17637 _Collections.filter(this, <Touch>[], f); | 17735 Collections.filter(this, <Touch>[], f); |
17638 | 17736 |
17639 bool every(bool f(Touch element)) => _Collections.every(this, f); | 17737 bool every(bool f(Touch element)) => Collections.every(this, f); |
17640 | 17738 |
17641 bool some(bool f(Touch element)) => _Collections.some(this, f); | 17739 bool some(bool f(Touch element)) => Collections.some(this, f); |
17642 | 17740 |
17643 bool get isEmpty => this.length == 0; | 17741 bool get isEmpty => this.length == 0; |
17644 | 17742 |
17645 // From List<Touch>: | 17743 // From List<Touch>: |
17646 | 17744 |
17647 void sort([Comparator<Touch> compare = Comparable.compare]) { | 17745 void sort([Comparator<Touch> compare = Comparable.compare]) { |
17648 throw new UnsupportedError("Cannot sort immutable List."); | 17746 throw new UnsupportedError("Cannot sort immutable List."); |
17649 } | 17747 } |
17650 | 17748 |
17651 int indexOf(Touch element, [int start = 0]) => | 17749 int indexOf(Touch element, [int start = 0]) => |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17895 } | 17993 } |
17896 | 17994 |
17897 void addLast(int value) { | 17995 void addLast(int value) { |
17898 throw new UnsupportedError("Cannot add to immutable List."); | 17996 throw new UnsupportedError("Cannot add to immutable List."); |
17899 } | 17997 } |
17900 | 17998 |
17901 void addAll(Collection<int> collection) { | 17999 void addAll(Collection<int> collection) { |
17902 throw new UnsupportedError("Cannot add to immutable List."); | 18000 throw new UnsupportedError("Cannot add to immutable List."); |
17903 } | 18001 } |
17904 | 18002 |
17905 bool contains(int element) => _Collections.contains(this, element); | 18003 bool contains(int element) => Collections.contains(this, element); |
17906 | 18004 |
17907 void forEach(void f(int element)) => _Collections.forEach(this, f); | 18005 void forEach(void f(int element)) => Collections.forEach(this, f); |
17908 | 18006 |
17909 Collection map(f(int element)) => _Collections.map(this, [], f); | 18007 Collection map(f(int element)) => Collections.map(this, [], f); |
17910 | 18008 |
17911 Collection<int> filter(bool f(int element)) => | 18009 Collection<int> filter(bool f(int element)) => |
17912 _Collections.filter(this, <int>[], f); | 18010 Collections.filter(this, <int>[], f); |
17913 | 18011 |
17914 bool every(bool f(int element)) => _Collections.every(this, f); | 18012 bool every(bool f(int element)) => Collections.every(this, f); |
17915 | 18013 |
17916 bool some(bool f(int element)) => _Collections.some(this, f); | 18014 bool some(bool f(int element)) => Collections.some(this, f); |
17917 | 18015 |
17918 bool get isEmpty => this.length == 0; | 18016 bool get isEmpty => this.length == 0; |
17919 | 18017 |
17920 // From List<int>: | 18018 // From List<int>: |
17921 | 18019 |
17922 void sort([Comparator<int> compare = Comparable.compare]) { | 18020 void sort([Comparator<int> compare = Comparable.compare]) { |
17923 throw new UnsupportedError("Cannot sort immutable List."); | 18021 throw new UnsupportedError("Cannot sort immutable List."); |
17924 } | 18022 } |
17925 | 18023 |
17926 int indexOf(int element, [int start = 0]) => | 18024 int indexOf(int element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18005 } | 18103 } |
18006 | 18104 |
18007 void addLast(int value) { | 18105 void addLast(int value) { |
18008 throw new UnsupportedError("Cannot add to immutable List."); | 18106 throw new UnsupportedError("Cannot add to immutable List."); |
18009 } | 18107 } |
18010 | 18108 |
18011 void addAll(Collection<int> collection) { | 18109 void addAll(Collection<int> collection) { |
18012 throw new UnsupportedError("Cannot add to immutable List."); | 18110 throw new UnsupportedError("Cannot add to immutable List."); |
18013 } | 18111 } |
18014 | 18112 |
18015 bool contains(int element) => _Collections.contains(this, element); | 18113 bool contains(int element) => Collections.contains(this, element); |
18016 | 18114 |
18017 void forEach(void f(int element)) => _Collections.forEach(this, f); | 18115 void forEach(void f(int element)) => Collections.forEach(this, f); |
18018 | 18116 |
18019 Collection map(f(int element)) => _Collections.map(this, [], f); | 18117 Collection map(f(int element)) => Collections.map(this, [], f); |
18020 | 18118 |
18021 Collection<int> filter(bool f(int element)) => | 18119 Collection<int> filter(bool f(int element)) => |
18022 _Collections.filter(this, <int>[], f); | 18120 Collections.filter(this, <int>[], f); |
18023 | 18121 |
18024 bool every(bool f(int element)) => _Collections.every(this, f); | 18122 bool every(bool f(int element)) => Collections.every(this, f); |
18025 | 18123 |
18026 bool some(bool f(int element)) => _Collections.some(this, f); | 18124 bool some(bool f(int element)) => Collections.some(this, f); |
18027 | 18125 |
18028 bool get isEmpty => this.length == 0; | 18126 bool get isEmpty => this.length == 0; |
18029 | 18127 |
18030 // From List<int>: | 18128 // From List<int>: |
18031 | 18129 |
18032 void sort([Comparator<int> compare = Comparable.compare]) { | 18130 void sort([Comparator<int> compare = Comparable.compare]) { |
18033 throw new UnsupportedError("Cannot sort immutable List."); | 18131 throw new UnsupportedError("Cannot sort immutable List."); |
18034 } | 18132 } |
18035 | 18133 |
18036 int indexOf(int element, [int start = 0]) => | 18134 int indexOf(int element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18115 } | 18213 } |
18116 | 18214 |
18117 void addLast(int value) { | 18215 void addLast(int value) { |
18118 throw new UnsupportedError("Cannot add to immutable List."); | 18216 throw new UnsupportedError("Cannot add to immutable List."); |
18119 } | 18217 } |
18120 | 18218 |
18121 void addAll(Collection<int> collection) { | 18219 void addAll(Collection<int> collection) { |
18122 throw new UnsupportedError("Cannot add to immutable List."); | 18220 throw new UnsupportedError("Cannot add to immutable List."); |
18123 } | 18221 } |
18124 | 18222 |
18125 bool contains(int element) => _Collections.contains(this, element); | 18223 bool contains(int element) => Collections.contains(this, element); |
18126 | 18224 |
18127 void forEach(void f(int element)) => _Collections.forEach(this, f); | 18225 void forEach(void f(int element)) => Collections.forEach(this, f); |
18128 | 18226 |
18129 Collection map(f(int element)) => _Collections.map(this, [], f); | 18227 Collection map(f(int element)) => Collections.map(this, [], f); |
18130 | 18228 |
18131 Collection<int> filter(bool f(int element)) => | 18229 Collection<int> filter(bool f(int element)) => |
18132 _Collections.filter(this, <int>[], f); | 18230 Collections.filter(this, <int>[], f); |
18133 | 18231 |
18134 bool every(bool f(int element)) => _Collections.every(this, f); | 18232 bool every(bool f(int element)) => Collections.every(this, f); |
18135 | 18233 |
18136 bool some(bool f(int element)) => _Collections.some(this, f); | 18234 bool some(bool f(int element)) => Collections.some(this, f); |
18137 | 18235 |
18138 bool get isEmpty => this.length == 0; | 18236 bool get isEmpty => this.length == 0; |
18139 | 18237 |
18140 // From List<int>: | 18238 // From List<int>: |
18141 | 18239 |
18142 void sort([Comparator<int> compare = Comparable.compare]) { | 18240 void sort([Comparator<int> compare = Comparable.compare]) { |
18143 throw new UnsupportedError("Cannot sort immutable List."); | 18241 throw new UnsupportedError("Cannot sort immutable List."); |
18144 } | 18242 } |
18145 | 18243 |
18146 int indexOf(int element, [int start = 0]) => | 18244 int indexOf(int element, [int start = 0]) => |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19874 | 19972 |
19875 factory Worker(String scriptUrl) => _WorkerFactoryProvider.createWorker(script
Url); | 19973 factory Worker(String scriptUrl) => _WorkerFactoryProvider.createWorker(script
Url); |
19876 | 19974 |
19877 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 19975 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
19878 WorkerEvents get on => | 19976 WorkerEvents get on => |
19879 new WorkerEvents(this); | 19977 new WorkerEvents(this); |
19880 | 19978 |
19881 /// @domName Worker.postMessage; @docsEditable true | 19979 /// @domName Worker.postMessage; @docsEditable true |
19882 void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) { | 19980 void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) { |
19883 if (?messagePorts) { | 19981 if (?messagePorts) { |
19884 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 19982 var message_1 = convertDartToNative_SerializedScriptValue(message); |
19885 _postMessage_1(message_1, messagePorts); | 19983 _postMessage_1(message_1, messagePorts); |
19886 return; | 19984 return; |
19887 } | 19985 } |
19888 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 19986 var message_2 = convertDartToNative_SerializedScriptValue(message); |
19889 _postMessage_2(message_2); | 19987 _postMessage_2(message_2); |
19890 return; | 19988 return; |
19891 } | 19989 } |
19892 void _postMessage_1(message, List messagePorts) native "postMessage"; | 19990 void _postMessage_1(message, List messagePorts) native "postMessage"; |
19893 void _postMessage_2(message) native "postMessage"; | 19991 void _postMessage_2(message) native "postMessage"; |
19894 | 19992 |
19895 /// @domName Worker.terminate; @docsEditable true | 19993 /// @domName Worker.terminate; @docsEditable true |
19896 void terminate() native; | 19994 void terminate() native; |
19897 } | 19995 } |
19898 | 19996 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20300 } | 20398 } |
20301 | 20399 |
20302 void addLast(CSSRule value) { | 20400 void addLast(CSSRule value) { |
20303 throw new UnsupportedError("Cannot add to immutable List."); | 20401 throw new UnsupportedError("Cannot add to immutable List."); |
20304 } | 20402 } |
20305 | 20403 |
20306 void addAll(Collection<CSSRule> collection) { | 20404 void addAll(Collection<CSSRule> collection) { |
20307 throw new UnsupportedError("Cannot add to immutable List."); | 20405 throw new UnsupportedError("Cannot add to immutable List."); |
20308 } | 20406 } |
20309 | 20407 |
20310 bool contains(CSSRule element) => _Collections.contains(this, element); | 20408 bool contains(CSSRule element) => Collections.contains(this, element); |
20311 | 20409 |
20312 void forEach(void f(CSSRule element)) => _Collections.forEach(this, f); | 20410 void forEach(void f(CSSRule element)) => Collections.forEach(this, f); |
20313 | 20411 |
20314 Collection map(f(CSSRule element)) => _Collections.map(this, [], f); | 20412 Collection map(f(CSSRule element)) => Collections.map(this, [], f); |
20315 | 20413 |
20316 Collection<CSSRule> filter(bool f(CSSRule element)) => | 20414 Collection<CSSRule> filter(bool f(CSSRule element)) => |
20317 _Collections.filter(this, <CSSRule>[], f); | 20415 Collections.filter(this, <CSSRule>[], f); |
20318 | 20416 |
20319 bool every(bool f(CSSRule element)) => _Collections.every(this, f); | 20417 bool every(bool f(CSSRule element)) => Collections.every(this, f); |
20320 | 20418 |
20321 bool some(bool f(CSSRule element)) => _Collections.some(this, f); | 20419 bool some(bool f(CSSRule element)) => Collections.some(this, f); |
20322 | 20420 |
20323 bool get isEmpty => this.length == 0; | 20421 bool get isEmpty => this.length == 0; |
20324 | 20422 |
20325 // From List<CSSRule>: | 20423 // From List<CSSRule>: |
20326 | 20424 |
20327 void sort([Comparator<CSSRule> compare = Comparable.compare]) { | 20425 void sort([Comparator<CSSRule> compare = Comparable.compare]) { |
20328 throw new UnsupportedError("Cannot sort immutable List."); | 20426 throw new UnsupportedError("Cannot sort immutable List."); |
20329 } | 20427 } |
20330 | 20428 |
20331 int indexOf(CSSRule element, [int start = 0]) => | 20429 int indexOf(CSSRule element, [int start = 0]) => |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20399 } | 20497 } |
20400 | 20498 |
20401 void addLast(CSSValue value) { | 20499 void addLast(CSSValue value) { |
20402 throw new UnsupportedError("Cannot add to immutable List."); | 20500 throw new UnsupportedError("Cannot add to immutable List."); |
20403 } | 20501 } |
20404 | 20502 |
20405 void addAll(Collection<CSSValue> collection) { | 20503 void addAll(Collection<CSSValue> collection) { |
20406 throw new UnsupportedError("Cannot add to immutable List."); | 20504 throw new UnsupportedError("Cannot add to immutable List."); |
20407 } | 20505 } |
20408 | 20506 |
20409 bool contains(CSSValue element) => _Collections.contains(this, element); | 20507 bool contains(CSSValue element) => Collections.contains(this, element); |
20410 | 20508 |
20411 void forEach(void f(CSSValue element)) => _Collections.forEach(this, f); | 20509 void forEach(void f(CSSValue element)) => Collections.forEach(this, f); |
20412 | 20510 |
20413 Collection map(f(CSSValue element)) => _Collections.map(this, [], f); | 20511 Collection map(f(CSSValue element)) => Collections.map(this, [], f); |
20414 | 20512 |
20415 Collection<CSSValue> filter(bool f(CSSValue element)) => | 20513 Collection<CSSValue> filter(bool f(CSSValue element)) => |
20416 _Collections.filter(this, <CSSValue>[], f); | 20514 Collections.filter(this, <CSSValue>[], f); |
20417 | 20515 |
20418 bool every(bool f(CSSValue element)) => _Collections.every(this, f); | 20516 bool every(bool f(CSSValue element)) => Collections.every(this, f); |
20419 | 20517 |
20420 bool some(bool f(CSSValue element)) => _Collections.some(this, f); | 20518 bool some(bool f(CSSValue element)) => Collections.some(this, f); |
20421 | 20519 |
20422 bool get isEmpty => this.length == 0; | 20520 bool get isEmpty => this.length == 0; |
20423 | 20521 |
20424 // From List<CSSValue>: | 20522 // From List<CSSValue>: |
20425 | 20523 |
20426 void sort([Comparator<CSSValue> compare = Comparable.compare]) { | 20524 void sort([Comparator<CSSValue> compare = Comparable.compare]) { |
20427 throw new UnsupportedError("Cannot sort immutable List."); | 20525 throw new UnsupportedError("Cannot sort immutable List."); |
20428 } | 20526 } |
20429 | 20527 |
20430 int indexOf(CSSValue element, [int start = 0]) => | 20528 int indexOf(CSSValue element, [int start = 0]) => |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20498 } | 20596 } |
20499 | 20597 |
20500 void addLast(ClientRect value) { | 20598 void addLast(ClientRect value) { |
20501 throw new UnsupportedError("Cannot add to immutable List."); | 20599 throw new UnsupportedError("Cannot add to immutable List."); |
20502 } | 20600 } |
20503 | 20601 |
20504 void addAll(Collection<ClientRect> collection) { | 20602 void addAll(Collection<ClientRect> collection) { |
20505 throw new UnsupportedError("Cannot add to immutable List."); | 20603 throw new UnsupportedError("Cannot add to immutable List."); |
20506 } | 20604 } |
20507 | 20605 |
20508 bool contains(ClientRect element) => _Collections.contains(this, element); | 20606 bool contains(ClientRect element) => Collections.contains(this, element); |
20509 | 20607 |
20510 void forEach(void f(ClientRect element)) => _Collections.forEach(this, f); | 20608 void forEach(void f(ClientRect element)) => Collections.forEach(this, f); |
20511 | 20609 |
20512 Collection map(f(ClientRect element)) => _Collections.map(this, [], f); | 20610 Collection map(f(ClientRect element)) => Collections.map(this, [], f); |
20513 | 20611 |
20514 Collection<ClientRect> filter(bool f(ClientRect element)) => | 20612 Collection<ClientRect> filter(bool f(ClientRect element)) => |
20515 _Collections.filter(this, <ClientRect>[], f); | 20613 Collections.filter(this, <ClientRect>[], f); |
20516 | 20614 |
20517 bool every(bool f(ClientRect element)) => _Collections.every(this, f); | 20615 bool every(bool f(ClientRect element)) => Collections.every(this, f); |
20518 | 20616 |
20519 bool some(bool f(ClientRect element)) => _Collections.some(this, f); | 20617 bool some(bool f(ClientRect element)) => Collections.some(this, f); |
20520 | 20618 |
20521 bool get isEmpty => this.length == 0; | 20619 bool get isEmpty => this.length == 0; |
20522 | 20620 |
20523 // From List<ClientRect>: | 20621 // From List<ClientRect>: |
20524 | 20622 |
20525 void sort([Comparator<ClientRect> compare = Comparable.compare]) { | 20623 void sort([Comparator<ClientRect> compare = Comparable.compare]) { |
20526 throw new UnsupportedError("Cannot sort immutable List."); | 20624 throw new UnsupportedError("Cannot sort immutable List."); |
20527 } | 20625 } |
20528 | 20626 |
20529 int indexOf(ClientRect element, [int start = 0]) => | 20627 int indexOf(ClientRect element, [int start = 0]) => |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20608 void addLast(String value) { | 20706 void addLast(String value) { |
20609 throw new UnsupportedError("Cannot add to immutable List."); | 20707 throw new UnsupportedError("Cannot add to immutable List."); |
20610 } | 20708 } |
20611 | 20709 |
20612 void addAll(Collection<String> collection) { | 20710 void addAll(Collection<String> collection) { |
20613 throw new UnsupportedError("Cannot add to immutable List."); | 20711 throw new UnsupportedError("Cannot add to immutable List."); |
20614 } | 20712 } |
20615 | 20713 |
20616 // contains() defined by IDL. | 20714 // contains() defined by IDL. |
20617 | 20715 |
20618 void forEach(void f(String element)) => _Collections.forEach(this, f); | 20716 void forEach(void f(String element)) => Collections.forEach(this, f); |
20619 | 20717 |
20620 Collection map(f(String element)) => _Collections.map(this, [], f); | 20718 Collection map(f(String element)) => Collections.map(this, [], f); |
20621 | 20719 |
20622 Collection<String> filter(bool f(String element)) => | 20720 Collection<String> filter(bool f(String element)) => |
20623 _Collections.filter(this, <String>[], f); | 20721 Collections.filter(this, <String>[], f); |
20624 | 20722 |
20625 bool every(bool f(String element)) => _Collections.every(this, f); | 20723 bool every(bool f(String element)) => Collections.every(this, f); |
20626 | 20724 |
20627 bool some(bool f(String element)) => _Collections.some(this, f); | 20725 bool some(bool f(String element)) => Collections.some(this, f); |
20628 | 20726 |
20629 bool get isEmpty => this.length == 0; | 20727 bool get isEmpty => this.length == 0; |
20630 | 20728 |
20631 // From List<String>: | 20729 // From List<String>: |
20632 | 20730 |
20633 void sort([Comparator<String> compare = Comparable.compare]) { | 20731 void sort([Comparator<String> compare = Comparable.compare]) { |
20634 throw new UnsupportedError("Cannot sort immutable List."); | 20732 throw new UnsupportedError("Cannot sort immutable List."); |
20635 } | 20733 } |
20636 | 20734 |
20637 int indexOf(String element, [int start = 0]) => | 20735 int indexOf(String element, [int start = 0]) => |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20725 } | 20823 } |
20726 | 20824 |
20727 void addLast(Entry value) { | 20825 void addLast(Entry value) { |
20728 throw new UnsupportedError("Cannot add to immutable List."); | 20826 throw new UnsupportedError("Cannot add to immutable List."); |
20729 } | 20827 } |
20730 | 20828 |
20731 void addAll(Collection<Entry> collection) { | 20829 void addAll(Collection<Entry> collection) { |
20732 throw new UnsupportedError("Cannot add to immutable List."); | 20830 throw new UnsupportedError("Cannot add to immutable List."); |
20733 } | 20831 } |
20734 | 20832 |
20735 bool contains(Entry element) => _Collections.contains(this, element); | 20833 bool contains(Entry element) => Collections.contains(this, element); |
20736 | 20834 |
20737 void forEach(void f(Entry element)) => _Collections.forEach(this, f); | 20835 void forEach(void f(Entry element)) => Collections.forEach(this, f); |
20738 | 20836 |
20739 Collection map(f(Entry element)) => _Collections.map(this, [], f); | 20837 Collection map(f(Entry element)) => Collections.map(this, [], f); |
20740 | 20838 |
20741 Collection<Entry> filter(bool f(Entry element)) => | 20839 Collection<Entry> filter(bool f(Entry element)) => |
20742 _Collections.filter(this, <Entry>[], f); | 20840 Collections.filter(this, <Entry>[], f); |
20743 | 20841 |
20744 bool every(bool f(Entry element)) => _Collections.every(this, f); | 20842 bool every(bool f(Entry element)) => Collections.every(this, f); |
20745 | 20843 |
20746 bool some(bool f(Entry element)) => _Collections.some(this, f); | 20844 bool some(bool f(Entry element)) => Collections.some(this, f); |
20747 | 20845 |
20748 bool get isEmpty => this.length == 0; | 20846 bool get isEmpty => this.length == 0; |
20749 | 20847 |
20750 // From List<Entry>: | 20848 // From List<Entry>: |
20751 | 20849 |
20752 void sort([Comparator<Entry> compare = Comparable.compare]) { | 20850 void sort([Comparator<Entry> compare = Comparable.compare]) { |
20753 throw new UnsupportedError("Cannot sort immutable List."); | 20851 throw new UnsupportedError("Cannot sort immutable List."); |
20754 } | 20852 } |
20755 | 20853 |
20756 int indexOf(Entry element, [int start = 0]) => | 20854 int indexOf(Entry element, [int start = 0]) => |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20824 } | 20922 } |
20825 | 20923 |
20826 void addLast(EntrySync value) { | 20924 void addLast(EntrySync value) { |
20827 throw new UnsupportedError("Cannot add to immutable List."); | 20925 throw new UnsupportedError("Cannot add to immutable List."); |
20828 } | 20926 } |
20829 | 20927 |
20830 void addAll(Collection<EntrySync> collection) { | 20928 void addAll(Collection<EntrySync> collection) { |
20831 throw new UnsupportedError("Cannot add to immutable List."); | 20929 throw new UnsupportedError("Cannot add to immutable List."); |
20832 } | 20930 } |
20833 | 20931 |
20834 bool contains(EntrySync element) => _Collections.contains(this, element); | 20932 bool contains(EntrySync element) => Collections.contains(this, element); |
20835 | 20933 |
20836 void forEach(void f(EntrySync element)) => _Collections.forEach(this, f); | 20934 void forEach(void f(EntrySync element)) => Collections.forEach(this, f); |
20837 | 20935 |
20838 Collection map(f(EntrySync element)) => _Collections.map(this, [], f); | 20936 Collection map(f(EntrySync element)) => Collections.map(this, [], f); |
20839 | 20937 |
20840 Collection<EntrySync> filter(bool f(EntrySync element)) => | 20938 Collection<EntrySync> filter(bool f(EntrySync element)) => |
20841 _Collections.filter(this, <EntrySync>[], f); | 20939 Collections.filter(this, <EntrySync>[], f); |
20842 | 20940 |
20843 bool every(bool f(EntrySync element)) => _Collections.every(this, f); | 20941 bool every(bool f(EntrySync element)) => Collections.every(this, f); |
20844 | 20942 |
20845 bool some(bool f(EntrySync element)) => _Collections.some(this, f); | 20943 bool some(bool f(EntrySync element)) => Collections.some(this, f); |
20846 | 20944 |
20847 bool get isEmpty => this.length == 0; | 20945 bool get isEmpty => this.length == 0; |
20848 | 20946 |
20849 // From List<EntrySync>: | 20947 // From List<EntrySync>: |
20850 | 20948 |
20851 void sort([Comparator<EntrySync> compare = Comparable.compare]) { | 20949 void sort([Comparator<EntrySync> compare = Comparable.compare]) { |
20852 throw new UnsupportedError("Cannot sort immutable List."); | 20950 throw new UnsupportedError("Cannot sort immutable List."); |
20853 } | 20951 } |
20854 | 20952 |
20855 int indexOf(EntrySync element, [int start = 0]) => | 20953 int indexOf(EntrySync element, [int start = 0]) => |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20895 | 20993 |
20896 class _EventSourceFactoryProvider { | 20994 class _EventSourceFactoryProvider { |
20897 static EventSource createEventSource(String scriptUrl) => | 20995 static EventSource createEventSource(String scriptUrl) => |
20898 JS('EventSource', 'new EventSource(#)', scriptUrl); | 20996 JS('EventSource', 'new EventSource(#)', scriptUrl); |
20899 } | 20997 } |
20900 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20998 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
20901 // for details. All rights reserved. Use of this source code is governed by a | 20999 // for details. All rights reserved. Use of this source code is governed by a |
20902 // BSD-style license that can be found in the LICENSE file. | 21000 // BSD-style license that can be found in the LICENSE file. |
20903 | 21001 |
20904 | 21002 |
20905 /// @domName FileList; @docsEditable true | |
20906 class _FileList implements JavaScriptIndexingBehavior, List<File> native "*FileL
ist" { | |
20907 | |
20908 /// @domName FileList.length; @docsEditable true | |
20909 final int length; | |
20910 | |
20911 File operator[](int index) => JS("File", "#[#]", this, index); | |
20912 | |
20913 void operator[]=(int index, File value) { | |
20914 throw new UnsupportedError("Cannot assign element of immutable List."); | |
20915 } | |
20916 // -- start List<File> mixins. | |
20917 // File is the element type. | |
20918 | |
20919 // From Iterable<File>: | |
20920 | |
20921 Iterator<File> iterator() { | |
20922 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
20923 // be cached in both iterator _and_ forEach method. For now caching it | |
20924 // for consistency. | |
20925 return new FixedSizeListIterator<File>(this); | |
20926 } | |
20927 | |
20928 // From Collection<File>: | |
20929 | |
20930 void add(File value) { | |
20931 throw new UnsupportedError("Cannot add to immutable List."); | |
20932 } | |
20933 | |
20934 void addLast(File value) { | |
20935 throw new UnsupportedError("Cannot add to immutable List."); | |
20936 } | |
20937 | |
20938 void addAll(Collection<File> collection) { | |
20939 throw new UnsupportedError("Cannot add to immutable List."); | |
20940 } | |
20941 | |
20942 bool contains(File element) => _Collections.contains(this, element); | |
20943 | |
20944 void forEach(void f(File element)) => _Collections.forEach(this, f); | |
20945 | |
20946 Collection map(f(File element)) => _Collections.map(this, [], f); | |
20947 | |
20948 Collection<File> filter(bool f(File element)) => | |
20949 _Collections.filter(this, <File>[], f); | |
20950 | |
20951 bool every(bool f(File element)) => _Collections.every(this, f); | |
20952 | |
20953 bool some(bool f(File element)) => _Collections.some(this, f); | |
20954 | |
20955 bool get isEmpty => this.length == 0; | |
20956 | |
20957 // From List<File>: | |
20958 | |
20959 void sort([Comparator<File> compare = Comparable.compare]) { | |
20960 throw new UnsupportedError("Cannot sort immutable List."); | |
20961 } | |
20962 | |
20963 int indexOf(File element, [int start = 0]) => | |
20964 _Lists.indexOf(this, element, start, this.length); | |
20965 | |
20966 int lastIndexOf(File element, [int start]) { | |
20967 if (start == null) start = length - 1; | |
20968 return _Lists.lastIndexOf(this, element, start); | |
20969 } | |
20970 | |
20971 File get first => this[0]; | |
20972 | |
20973 File get last => this[length - 1]; | |
20974 | |
20975 File removeLast() { | |
20976 throw new UnsupportedError("Cannot removeLast on immutable List."); | |
20977 } | |
20978 | |
20979 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) { | |
20980 throw new UnsupportedError("Cannot setRange on immutable List."); | |
20981 } | |
20982 | |
20983 void removeRange(int start, int rangeLength) { | |
20984 throw new UnsupportedError("Cannot removeRange on immutable List."); | |
20985 } | |
20986 | |
20987 void insertRange(int start, int rangeLength, [File initialValue]) { | |
20988 throw new UnsupportedError("Cannot insertRange on immutable List."); | |
20989 } | |
20990 | |
20991 List<File> getRange(int start, int rangeLength) => | |
20992 _Lists.getRange(this, start, rangeLength, <File>[]); | |
20993 | |
20994 // -- end List<File> mixins. | |
20995 | |
20996 /// @domName FileList.item; @docsEditable true | |
20997 File item(int index) native; | |
20998 } | |
20999 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
21000 // for details. All rights reserved. Use of this source code is governed by a | |
21001 // BSD-style license that can be found in the LICENSE file. | |
21002 | |
21003 | |
21004 class _FileReaderFactoryProvider { | 21003 class _FileReaderFactoryProvider { |
21005 static FileReader createFileReader() => | 21004 static FileReader createFileReader() => |
21006 JS('FileReader', 'new FileReader()' ); | 21005 JS('FileReader', 'new FileReader()' ); |
21007 } | 21006 } |
21008 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21007 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
21009 // for details. All rights reserved. Use of this source code is governed by a | 21008 // for details. All rights reserved. Use of this source code is governed by a |
21010 // BSD-style license that can be found in the LICENSE file. | 21009 // BSD-style license that can be found in the LICENSE file. |
21011 | 21010 |
21012 | 21011 |
21013 class _FileReaderSyncFactoryProvider { | 21012 class _FileReaderSyncFactoryProvider { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21060 } | 21059 } |
21061 | 21060 |
21062 void addLast(Gamepad value) { | 21061 void addLast(Gamepad value) { |
21063 throw new UnsupportedError("Cannot add to immutable List."); | 21062 throw new UnsupportedError("Cannot add to immutable List."); |
21064 } | 21063 } |
21065 | 21064 |
21066 void addAll(Collection<Gamepad> collection) { | 21065 void addAll(Collection<Gamepad> collection) { |
21067 throw new UnsupportedError("Cannot add to immutable List."); | 21066 throw new UnsupportedError("Cannot add to immutable List."); |
21068 } | 21067 } |
21069 | 21068 |
21070 bool contains(Gamepad element) => _Collections.contains(this, element); | 21069 bool contains(Gamepad element) => Collections.contains(this, element); |
21071 | 21070 |
21072 void forEach(void f(Gamepad element)) => _Collections.forEach(this, f); | 21071 void forEach(void f(Gamepad element)) => Collections.forEach(this, f); |
21073 | 21072 |
21074 Collection map(f(Gamepad element)) => _Collections.map(this, [], f); | 21073 Collection map(f(Gamepad element)) => Collections.map(this, [], f); |
21075 | 21074 |
21076 Collection<Gamepad> filter(bool f(Gamepad element)) => | 21075 Collection<Gamepad> filter(bool f(Gamepad element)) => |
21077 _Collections.filter(this, <Gamepad>[], f); | 21076 Collections.filter(this, <Gamepad>[], f); |
21078 | 21077 |
21079 bool every(bool f(Gamepad element)) => _Collections.every(this, f); | 21078 bool every(bool f(Gamepad element)) => Collections.every(this, f); |
21080 | 21079 |
21081 bool some(bool f(Gamepad element)) => _Collections.some(this, f); | 21080 bool some(bool f(Gamepad element)) => Collections.some(this, f); |
21082 | 21081 |
21083 bool get isEmpty => this.length == 0; | 21082 bool get isEmpty => this.length == 0; |
21084 | 21083 |
21085 // From List<Gamepad>: | 21084 // From List<Gamepad>: |
21086 | 21085 |
21087 void sort([Comparator<Gamepad> compare = Comparable.compare]) { | 21086 void sort([Comparator<Gamepad> compare = Comparable.compare]) { |
21088 throw new UnsupportedError("Cannot sort immutable List."); | 21087 throw new UnsupportedError("Cannot sort immutable List."); |
21089 } | 21088 } |
21090 | 21089 |
21091 int indexOf(Gamepad element, [int start = 0]) => | 21090 int indexOf(Gamepad element, [int start = 0]) => |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21212 } | 21211 } |
21213 | 21212 |
21214 void addLast(MediaStream value) { | 21213 void addLast(MediaStream value) { |
21215 throw new UnsupportedError("Cannot add to immutable List."); | 21214 throw new UnsupportedError("Cannot add to immutable List."); |
21216 } | 21215 } |
21217 | 21216 |
21218 void addAll(Collection<MediaStream> collection) { | 21217 void addAll(Collection<MediaStream> collection) { |
21219 throw new UnsupportedError("Cannot add to immutable List."); | 21218 throw new UnsupportedError("Cannot add to immutable List."); |
21220 } | 21219 } |
21221 | 21220 |
21222 bool contains(MediaStream element) => _Collections.contains(this, element); | 21221 bool contains(MediaStream element) => Collections.contains(this, element); |
21223 | 21222 |
21224 void forEach(void f(MediaStream element)) => _Collections.forEach(this, f); | 21223 void forEach(void f(MediaStream element)) => Collections.forEach(this, f); |
21225 | 21224 |
21226 Collection map(f(MediaStream element)) => _Collections.map(this, [], f); | 21225 Collection map(f(MediaStream element)) => Collections.map(this, [], f); |
21227 | 21226 |
21228 Collection<MediaStream> filter(bool f(MediaStream element)) => | 21227 Collection<MediaStream> filter(bool f(MediaStream element)) => |
21229 _Collections.filter(this, <MediaStream>[], f); | 21228 Collections.filter(this, <MediaStream>[], f); |
21230 | 21229 |
21231 bool every(bool f(MediaStream element)) => _Collections.every(this, f); | 21230 bool every(bool f(MediaStream element)) => Collections.every(this, f); |
21232 | 21231 |
21233 bool some(bool f(MediaStream element)) => _Collections.some(this, f); | 21232 bool some(bool f(MediaStream element)) => Collections.some(this, f); |
21234 | 21233 |
21235 bool get isEmpty => this.length == 0; | 21234 bool get isEmpty => this.length == 0; |
21236 | 21235 |
21237 // From List<MediaStream>: | 21236 // From List<MediaStream>: |
21238 | 21237 |
21239 void sort([Comparator<MediaStream> compare = Comparable.compare]) { | 21238 void sort([Comparator<MediaStream> compare = Comparable.compare]) { |
21240 throw new UnsupportedError("Cannot sort immutable List."); | 21239 throw new UnsupportedError("Cannot sort immutable List."); |
21241 } | 21240 } |
21242 | 21241 |
21243 int indexOf(MediaStream element, [int start = 0]) => | 21242 int indexOf(MediaStream element, [int start = 0]) => |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21346 } | 21345 } |
21347 | 21346 |
21348 void addLast(Node value) { | 21347 void addLast(Node value) { |
21349 throw new UnsupportedError("Cannot add to immutable List."); | 21348 throw new UnsupportedError("Cannot add to immutable List."); |
21350 } | 21349 } |
21351 | 21350 |
21352 void addAll(Collection<Node> collection) { | 21351 void addAll(Collection<Node> collection) { |
21353 throw new UnsupportedError("Cannot add to immutable List."); | 21352 throw new UnsupportedError("Cannot add to immutable List."); |
21354 } | 21353 } |
21355 | 21354 |
21356 bool contains(Node element) => _Collections.contains(this, element); | 21355 bool contains(Node element) => Collections.contains(this, element); |
21357 | 21356 |
21358 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 21357 void forEach(void f(Node element)) => Collections.forEach(this, f); |
21359 | 21358 |
21360 Collection map(f(Node element)) => _Collections.map(this, [], f); | 21359 Collection map(f(Node element)) => Collections.map(this, [], f); |
21361 | 21360 |
21362 Collection<Node> filter(bool f(Node element)) => | 21361 Collection<Node> filter(bool f(Node element)) => |
21363 _Collections.filter(this, <Node>[], f); | 21362 Collections.filter(this, <Node>[], f); |
21364 | 21363 |
21365 bool every(bool f(Node element)) => _Collections.every(this, f); | 21364 bool every(bool f(Node element)) => Collections.every(this, f); |
21366 | 21365 |
21367 bool some(bool f(Node element)) => _Collections.some(this, f); | 21366 bool some(bool f(Node element)) => Collections.some(this, f); |
21368 | 21367 |
21369 bool get isEmpty => this.length == 0; | 21368 bool get isEmpty => this.length == 0; |
21370 | 21369 |
21371 // From List<Node>: | 21370 // From List<Node>: |
21372 | 21371 |
21373 void sort([Comparator<Node> compare = Comparable.compare]) { | 21372 void sort([Comparator<Node> compare = Comparable.compare]) { |
21374 throw new UnsupportedError("Cannot sort immutable List."); | 21373 throw new UnsupportedError("Cannot sort immutable List."); |
21375 } | 21374 } |
21376 | 21375 |
21377 int indexOf(Node element, [int start = 0]) => | 21376 int indexOf(Node element, [int start = 0]) => |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21563 } | 21562 } |
21564 | 21563 |
21565 void addLast(SpeechInputResult value) { | 21564 void addLast(SpeechInputResult value) { |
21566 throw new UnsupportedError("Cannot add to immutable List."); | 21565 throw new UnsupportedError("Cannot add to immutable List."); |
21567 } | 21566 } |
21568 | 21567 |
21569 void addAll(Collection<SpeechInputResult> collection) { | 21568 void addAll(Collection<SpeechInputResult> collection) { |
21570 throw new UnsupportedError("Cannot add to immutable List."); | 21569 throw new UnsupportedError("Cannot add to immutable List."); |
21571 } | 21570 } |
21572 | 21571 |
21573 bool contains(SpeechInputResult element) => _Collections.contains(this, elemen
t); | 21572 bool contains(SpeechInputResult element) => Collections.contains(this, element
); |
21574 | 21573 |
21575 void forEach(void f(SpeechInputResult element)) => _Collections.forEach(this,
f); | 21574 void forEach(void f(SpeechInputResult element)) => Collections.forEach(this, f
); |
21576 | 21575 |
21577 Collection map(f(SpeechInputResult element)) => _Collections.map(this, [], f); | 21576 Collection map(f(SpeechInputResult element)) => Collections.map(this, [], f); |
21578 | 21577 |
21579 Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) => | 21578 Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) => |
21580 _Collections.filter(this, <SpeechInputResult>[], f); | 21579 Collections.filter(this, <SpeechInputResult>[], f); |
21581 | 21580 |
21582 bool every(bool f(SpeechInputResult element)) => _Collections.every(this, f); | 21581 bool every(bool f(SpeechInputResult element)) => Collections.every(this, f); |
21583 | 21582 |
21584 bool some(bool f(SpeechInputResult element)) => _Collections.some(this, f); | 21583 bool some(bool f(SpeechInputResult element)) => Collections.some(this, f); |
21585 | 21584 |
21586 bool get isEmpty => this.length == 0; | 21585 bool get isEmpty => this.length == 0; |
21587 | 21586 |
21588 // From List<SpeechInputResult>: | 21587 // From List<SpeechInputResult>: |
21589 | 21588 |
21590 void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) { | 21589 void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) { |
21591 throw new UnsupportedError("Cannot sort immutable List."); | 21590 throw new UnsupportedError("Cannot sort immutable List."); |
21592 } | 21591 } |
21593 | 21592 |
21594 int indexOf(SpeechInputResult element, [int start = 0]) => | 21593 int indexOf(SpeechInputResult element, [int start = 0]) => |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21671 } | 21670 } |
21672 | 21671 |
21673 void addLast(SpeechRecognitionResult value) { | 21672 void addLast(SpeechRecognitionResult value) { |
21674 throw new UnsupportedError("Cannot add to immutable List."); | 21673 throw new UnsupportedError("Cannot add to immutable List."); |
21675 } | 21674 } |
21676 | 21675 |
21677 void addAll(Collection<SpeechRecognitionResult> collection) { | 21676 void addAll(Collection<SpeechRecognitionResult> collection) { |
21678 throw new UnsupportedError("Cannot add to immutable List."); | 21677 throw new UnsupportedError("Cannot add to immutable List."); |
21679 } | 21678 } |
21680 | 21679 |
21681 bool contains(SpeechRecognitionResult element) => _Collections.contains(this,
element); | 21680 bool contains(SpeechRecognitionResult element) => Collections.contains(this, e
lement); |
21682 | 21681 |
21683 void forEach(void f(SpeechRecognitionResult element)) => _Collections.forEach(
this, f); | 21682 void forEach(void f(SpeechRecognitionResult element)) => Collections.forEach(t
his, f); |
21684 | 21683 |
21685 Collection map(f(SpeechRecognitionResult element)) => _Collections.map(this, [
], f); | 21684 Collection map(f(SpeechRecognitionResult element)) => Collections.map(this, []
, f); |
21686 | 21685 |
21687 Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult elem
ent)) => | 21686 Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult elem
ent)) => |
21688 _Collections.filter(this, <SpeechRecognitionResult>[], f); | 21687 Collections.filter(this, <SpeechRecognitionResult>[], f); |
21689 | 21688 |
21690 bool every(bool f(SpeechRecognitionResult element)) => _Collections.every(this
, f); | 21689 bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this,
f); |
21691 | 21690 |
21692 bool some(bool f(SpeechRecognitionResult element)) => _Collections.some(this,
f); | 21691 bool some(bool f(SpeechRecognitionResult element)) => Collections.some(this, f
); |
21693 | 21692 |
21694 bool get isEmpty => this.length == 0; | 21693 bool get isEmpty => this.length == 0; |
21695 | 21694 |
21696 // From List<SpeechRecognitionResult>: | 21695 // From List<SpeechRecognitionResult>: |
21697 | 21696 |
21698 void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare])
{ | 21697 void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare])
{ |
21699 throw new UnsupportedError("Cannot sort immutable List."); | 21698 throw new UnsupportedError("Cannot sort immutable List."); |
21700 } | 21699 } |
21701 | 21700 |
21702 int indexOf(SpeechRecognitionResult element, [int start = 0]) => | 21701 int indexOf(SpeechRecognitionResult element, [int start = 0]) => |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21770 } | 21769 } |
21771 | 21770 |
21772 void addLast(StyleSheet value) { | 21771 void addLast(StyleSheet value) { |
21773 throw new UnsupportedError("Cannot add to immutable List."); | 21772 throw new UnsupportedError("Cannot add to immutable List."); |
21774 } | 21773 } |
21775 | 21774 |
21776 void addAll(Collection<StyleSheet> collection) { | 21775 void addAll(Collection<StyleSheet> collection) { |
21777 throw new UnsupportedError("Cannot add to immutable List."); | 21776 throw new UnsupportedError("Cannot add to immutable List."); |
21778 } | 21777 } |
21779 | 21778 |
21780 bool contains(StyleSheet element) => _Collections.contains(this, element); | 21779 bool contains(StyleSheet element) => Collections.contains(this, element); |
21781 | 21780 |
21782 void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f); | 21781 void forEach(void f(StyleSheet element)) => Collections.forEach(this, f); |
21783 | 21782 |
21784 Collection map(f(StyleSheet element)) => _Collections.map(this, [], f); | 21783 Collection map(f(StyleSheet element)) => Collections.map(this, [], f); |
21785 | 21784 |
21786 Collection<StyleSheet> filter(bool f(StyleSheet element)) => | 21785 Collection<StyleSheet> filter(bool f(StyleSheet element)) => |
21787 _Collections.filter(this, <StyleSheet>[], f); | 21786 Collections.filter(this, <StyleSheet>[], f); |
21788 | 21787 |
21789 bool every(bool f(StyleSheet element)) => _Collections.every(this, f); | 21788 bool every(bool f(StyleSheet element)) => Collections.every(this, f); |
21790 | 21789 |
21791 bool some(bool f(StyleSheet element)) => _Collections.some(this, f); | 21790 bool some(bool f(StyleSheet element)) => Collections.some(this, f); |
21792 | 21791 |
21793 bool get isEmpty => this.length == 0; | 21792 bool get isEmpty => this.length == 0; |
21794 | 21793 |
21795 // From List<StyleSheet>: | 21794 // From List<StyleSheet>: |
21796 | 21795 |
21797 void sort([Comparator<StyleSheet> compare = Comparable.compare]) { | 21796 void sort([Comparator<StyleSheet> compare = Comparable.compare]) { |
21798 throw new UnsupportedError("Cannot sort immutable List."); | 21797 throw new UnsupportedError("Cannot sort immutable List."); |
21799 } | 21798 } |
21800 | 21799 |
21801 int indexOf(StyleSheet element, [int start = 0]) => | 21800 int indexOf(StyleSheet element, [int start = 0]) => |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21893 } | 21892 } |
21894 | 21893 |
21895 void addLast(Animation value) { | 21894 void addLast(Animation value) { |
21896 throw new UnsupportedError("Cannot add to immutable List."); | 21895 throw new UnsupportedError("Cannot add to immutable List."); |
21897 } | 21896 } |
21898 | 21897 |
21899 void addAll(Collection<Animation> collection) { | 21898 void addAll(Collection<Animation> collection) { |
21900 throw new UnsupportedError("Cannot add to immutable List."); | 21899 throw new UnsupportedError("Cannot add to immutable List."); |
21901 } | 21900 } |
21902 | 21901 |
21903 bool contains(Animation element) => _Collections.contains(this, element); | 21902 bool contains(Animation element) => Collections.contains(this, element); |
21904 | 21903 |
21905 void forEach(void f(Animation element)) => _Collections.forEach(this, f); | 21904 void forEach(void f(Animation element)) => Collections.forEach(this, f); |
21906 | 21905 |
21907 Collection map(f(Animation element)) => _Collections.map(this, [], f); | 21906 Collection map(f(Animation element)) => Collections.map(this, [], f); |
21908 | 21907 |
21909 Collection<Animation> filter(bool f(Animation element)) => | 21908 Collection<Animation> filter(bool f(Animation element)) => |
21910 _Collections.filter(this, <Animation>[], f); | 21909 Collections.filter(this, <Animation>[], f); |
21911 | 21910 |
21912 bool every(bool f(Animation element)) => _Collections.every(this, f); | 21911 bool every(bool f(Animation element)) => Collections.every(this, f); |
21913 | 21912 |
21914 bool some(bool f(Animation element)) => _Collections.some(this, f); | 21913 bool some(bool f(Animation element)) => Collections.some(this, f); |
21915 | 21914 |
21916 bool get isEmpty => this.length == 0; | 21915 bool get isEmpty => this.length == 0; |
21917 | 21916 |
21918 // From List<Animation>: | 21917 // From List<Animation>: |
21919 | 21918 |
21920 void sort([Comparator<Animation> compare = Comparable.compare]) { | 21919 void sort([Comparator<Animation> compare = Comparable.compare]) { |
21921 throw new UnsupportedError("Cannot sort immutable List."); | 21920 throw new UnsupportedError("Cannot sort immutable List."); |
21922 } | 21921 } |
21923 | 21922 |
21924 int indexOf(Animation element, [int start = 0]) => | 21923 int indexOf(Animation element, [int start = 0]) => |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22060 return length == 0; | 22059 return length == 0; |
22061 } | 22060 } |
22062 | 22061 |
22063 /** | 22062 /** |
22064 * Checks to see if the node should be included in this map. | 22063 * Checks to see if the node should be included in this map. |
22065 */ | 22064 */ |
22066 bool _matches(Node node); | 22065 bool _matches(Node node); |
22067 } | 22066 } |
22068 | 22067 |
22069 /** | 22068 /** |
22070 * Wrapper to expose Element.attributes as a typed map. | 22069 * Wrapper to expose [Element.attributes] as a typed map. |
22071 */ | 22070 */ |
22072 class _ElementAttributeMap extends _AttributeMap { | 22071 class _ElementAttributeMap extends _AttributeMap { |
22073 | 22072 |
22074 final Element _element; | 22073 final Element _element; |
22075 | 22074 |
22076 _ElementAttributeMap(this._element); | 22075 _ElementAttributeMap(this._element); |
22077 | 22076 |
22078 bool containsKey(String key) { | 22077 bool containsKey(String key) { |
22079 return _element.$dom_hasAttribute(key); | 22078 return _element.$dom_hasAttribute(key); |
22080 } | 22079 } |
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23370 canceller = window.clearInterval; | 23369 canceller = window.clearInterval; |
23371 } else { | 23370 } else { |
23372 maker = window.setTimeout; | 23371 maker = window.setTimeout; |
23373 canceller = window.clearTimeout; | 23372 canceller = window.clearTimeout; |
23374 } | 23373 } |
23375 Timer timer; | 23374 Timer timer; |
23376 final int id = maker(() { callback(timer); }, milliSeconds); | 23375 final int id = maker(() { callback(timer); }, milliSeconds); |
23377 timer = new _Timer(() { canceller(id); }); | 23376 timer = new _Timer(() { canceller(id); }); |
23378 return timer; | 23377 return timer; |
23379 }; | 23378 }; |
23380 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
23381 // for details. All rights reserved. Use of this source code is governed by a | |
23382 // BSD-style license that can be found in the LICENSE file. | |
23383 | |
23384 | |
23385 /** | |
23386 * The [Collections] class implements static methods useful when | |
23387 * writing a class that implements [Collection] and the [iterator] | |
23388 * method. | |
23389 */ | |
23390 class _Collections { | |
23391 static bool contains(Iterable<Object> iterable, Object element) { | |
23392 for (final e in iterable) { | |
23393 if (e == element) return true; | |
23394 } | |
23395 return false; | |
23396 } | |
23397 | |
23398 static void forEach(Iterable<Object> iterable, void f(Object o)) { | |
23399 for (final e in iterable) { | |
23400 f(e); | |
23401 } | |
23402 } | |
23403 | |
23404 static List map(Iterable<Object> source, | |
23405 List<Object> destination, | |
23406 f(o)) { | |
23407 for (final e in source) { | |
23408 destination.add(f(e)); | |
23409 } | |
23410 return destination; | |
23411 } | |
23412 | |
23413 static bool some(Iterable<Object> iterable, bool f(Object o)) { | |
23414 for (final e in iterable) { | |
23415 if (f(e)) return true; | |
23416 } | |
23417 return false; | |
23418 } | |
23419 | |
23420 static bool every(Iterable<Object> iterable, bool f(Object o)) { | |
23421 for (final e in iterable) { | |
23422 if (!f(e)) return false; | |
23423 } | |
23424 return true; | |
23425 } | |
23426 | |
23427 static List filter(Iterable<Object> source, | |
23428 List<Object> destination, | |
23429 bool f(o)) { | |
23430 for (final e in source) { | |
23431 if (f(e)) destination.add(e); | |
23432 } | |
23433 return destination; | |
23434 } | |
23435 | |
23436 static bool isEmpty(Iterable<Object> iterable) { | |
23437 return !iterable.iterator().hasNext; | |
23438 } | |
23439 } | |
23440 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 23379 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
23441 // for details. All rights reserved. Use of this source code is governed by a | 23380 // for details. All rights reserved. Use of this source code is governed by a |
23442 // BSD-style license that can be found in the LICENSE file. | 23381 // BSD-style license that can be found in the LICENSE file. |
23443 | 23382 |
23444 | 23383 |
23445 class _HttpRequestUtils { | 23384 class _HttpRequestUtils { |
23446 | 23385 |
23447 // Helper for factory HttpRequest.get | 23386 // Helper for factory HttpRequest.get |
23448 static HttpRequest get(String url, | 23387 static HttpRequest get(String url, |
23449 onSuccess(HttpRequest request), | 23388 onSuccess(HttpRequest request), |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24252 // with native names. | 24191 // with native names. |
24253 _convertDartToNative_ImageData(ImageData imageData) { | 24192 _convertDartToNative_ImageData(ImageData imageData) { |
24254 if (imageData is _TypedImageData) { | 24193 if (imageData is _TypedImageData) { |
24255 return JS('', '{data: #, height: #, width: #}', | 24194 return JS('', '{data: #, height: #, width: #}', |
24256 imageData.data, imageData.height, imageData.width); | 24195 imageData.data, imageData.height, imageData.width); |
24257 } | 24196 } |
24258 return imageData; | 24197 return imageData; |
24259 } | 24198 } |
24260 | 24199 |
24261 | 24200 |
24262 /// Converts a JavaScript object with properties into a Dart Map. | |
24263 /// Not suitable for nested objects. | |
24264 Map _convertNativeToDart_Dictionary(object) { | |
24265 if (object == null) return null; | |
24266 var dict = {}; | |
24267 for (final key in JS('=List', 'Object.getOwnPropertyNames(#)', object)) { | |
24268 dict[key] = JS('var', '#[#]', object, key); | |
24269 } | |
24270 return dict; | |
24271 } | |
24272 | |
24273 /// Converts a flat Dart map into a JavaScript object with properties. | |
24274 _convertDartToNative_Dictionary(Map dict) { | |
24275 if (dict == null) return null; | |
24276 var object = JS('var', '{}'); | |
24277 dict.forEach((String key, value) { | |
24278 JS('void', '#[#] = #', object, key, value); | |
24279 }); | |
24280 return object; | |
24281 } | |
24282 | |
24283 | |
24284 /** | |
24285 * Ensures that the input is a JavaScript Array. | |
24286 * | |
24287 * Creates a new JavaScript array if necessary, otherwise returns the original. | |
24288 */ | |
24289 List _convertDartToNative_StringArray(List<String> input) { | |
24290 // TODO(sra). Implement this. | |
24291 return input; | |
24292 } | |
24293 | |
24294 | |
24295 // ----------------------------------------------------------------------------- | 24201 // ----------------------------------------------------------------------------- |
24296 | 24202 |
24297 /** | 24203 /** |
24298 * Converts a native IDBKey into a Dart object. | 24204 * Converts a native IDBKey into a Dart object. |
24299 * | 24205 * |
24300 * May return the original input. May mutate the original input (but will be | 24206 * May return the original input. May mutate the original input (but will be |
24301 * idempotent if mutation occurs). It is assumed that this conversion happens | 24207 * idempotent if mutation occurs). It is assumed that this conversion happens |
24302 * on native IDBKeys on all paths that return IDBKeys from native DOM calls. | 24208 * on native IDBKeys on all paths that return IDBKeys from native DOM calls. |
24303 * | 24209 * |
24304 * If necessary, JavaScript Dates are converted into Dart Dates. | 24210 * If necessary, JavaScript Dates are converted into Dart Dates. |
24305 */ | 24211 */ |
24306 _convertNativeToDart_IDBKey(nativeKey) { | 24212 _convertNativeToDart_IDBKey(nativeKey) { |
24307 containsDate(object) { | 24213 containsDate(object) { |
24308 if (_isJavaScriptDate(object)) return true; | 24214 if (isJavaScriptDate(object)) return true; |
24309 if (object is List) { | 24215 if (object is List) { |
24310 for (int i = 0; i < object.length; i++) { | 24216 for (int i = 0; i < object.length; i++) { |
24311 if (containsDate(object[i])) return true; | 24217 if (containsDate(object[i])) return true; |
24312 } | 24218 } |
24313 } | 24219 } |
24314 return false; // number, string. | 24220 return false; // number, string. |
24315 } | 24221 } |
24316 if (containsDate(nativeKey)) { | 24222 if (containsDate(nativeKey)) { |
24317 throw new UnimplementedError('IDBKey containing Date'); | 24223 throw new UnimplementedError('IDBKey containing Date'); |
24318 } | 24224 } |
(...skipping 11 matching lines...) Expand all Loading... |
24330 */ | 24236 */ |
24331 _convertDartToNative_IDBKey(dartKey) { | 24237 _convertDartToNative_IDBKey(dartKey) { |
24332 // TODO: Implement. | 24238 // TODO: Implement. |
24333 return dartKey; | 24239 return dartKey; |
24334 } | 24240 } |
24335 | 24241 |
24336 | 24242 |
24337 | 24243 |
24338 /// May modify original. If so, action is idempotent. | 24244 /// May modify original. If so, action is idempotent. |
24339 _convertNativeToDart_IDBAny(object) { | 24245 _convertNativeToDart_IDBAny(object) { |
24340 return _convertNativeToDart_AcceptStructuredClone(object, mustCopy: false); | 24246 return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false); |
24341 } | |
24342 | |
24343 /// Converts a Dart value into a JavaScript SerializedScriptValue. | |
24344 _convertDartToNative_SerializedScriptValue(value) { | |
24345 return _convertDartToNative_PrepareForStructuredClone(value); | |
24346 } | |
24347 | |
24348 /// Since the source object may be viewed via a JavaScript event listener the | |
24349 /// original may not be modified. | |
24350 _convertNativeToDart_SerializedScriptValue(object) { | |
24351 return _convertNativeToDart_AcceptStructuredClone(object, mustCopy: true); | |
24352 } | 24247 } |
24353 | 24248 |
24354 | 24249 |
24355 /** | |
24356 * Converts a Dart value into a JavaScript SerializedScriptValue. Returns the | |
24357 * original input or a functional 'copy'. Does not mutate the original. | |
24358 * | |
24359 * The main transformation is the translation of Dart Maps are converted to | |
24360 * JavaScript Objects. | |
24361 * | |
24362 * The algorithm is essentially a dry-run of the structured clone algorithm | |
24363 * described at | |
24364 * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interf
aces.html#structured-clone | |
24365 * https://www.khronos.org/registry/typedarray/specs/latest/#9 | |
24366 * | |
24367 * Since the result of this function is expected to be passed only to JavaScript | |
24368 * operations that perform the structured clone algorithm which does not mutate | |
24369 * its output, the result may share structure with the input [value]. | |
24370 */ | |
24371 _convertDartToNative_PrepareForStructuredClone(value) { | |
24372 | |
24373 // TODO(sra): Replace slots with identity hash table. | |
24374 var values = []; | |
24375 var copies = []; // initially 'null', 'true' during initial DFS, then a copy. | |
24376 | |
24377 int findSlot(value) { | |
24378 int length = values.length; | |
24379 for (int i = 0; i < length; i++) { | |
24380 if (identical(values[i], value)) return i; | |
24381 } | |
24382 values.add(value); | |
24383 copies.add(null); | |
24384 return length; | |
24385 } | |
24386 readSlot(int i) => copies[i]; | |
24387 writeSlot(int i, x) { copies[i] = x; } | |
24388 cleanupSlots() {} // Will be needed if we mark objects with a property. | |
24389 | |
24390 // Returns the input, or a clone of the input. | |
24391 walk(e) { | |
24392 if (e == null) return e; | |
24393 if (e is bool) return e; | |
24394 if (e is num) return e; | |
24395 if (e is String) return e; | |
24396 if (e is Date) { | |
24397 // TODO(sra). | |
24398 throw new UnimplementedError('structured clone of Date'); | |
24399 } | |
24400 if (e is RegExp) { | |
24401 // TODO(sra). | |
24402 throw new UnimplementedError('structured clone of RegExp'); | |
24403 } | |
24404 | |
24405 // The browser's internal structured cloning algorithm will copy certain | |
24406 // types of object, but it will copy only its own implementations and not | |
24407 // just any Dart implementations of the interface. | |
24408 | |
24409 // TODO(sra): The JavaScript objects suitable for direct cloning by the | |
24410 // structured clone algorithm could be tagged with an private interface. | |
24411 | |
24412 if (e is File) return e; | |
24413 if (e is Blob) return e; | |
24414 if (e is _FileList) return e; | |
24415 | |
24416 // TODO(sra): Firefox: How to convert _TypedImageData on the other end? | |
24417 if (e is ImageData) return e; | |
24418 if (e is ArrayBuffer) return e; | |
24419 | |
24420 if (e is ArrayBufferView) return e; | |
24421 | |
24422 if (e is Map) { | |
24423 var slot = findSlot(e); | |
24424 var copy = readSlot(slot); | |
24425 if (copy != null) return copy; | |
24426 copy = JS('var', '{}'); | |
24427 writeSlot(slot, copy); | |
24428 e.forEach((key, value) { | |
24429 JS('void', '#[#] = #', copy, key, walk(value)); | |
24430 }); | |
24431 return copy; | |
24432 } | |
24433 | |
24434 if (e is List) { | |
24435 // Since a JavaScript Array is an instance of Dart List it is possible to | |
24436 // avoid making a copy of the list if there is no need to copy anything | |
24437 // reachable from the array. We defer creating a new array until a cycle | |
24438 // is detected or a subgraph was copied. | |
24439 int length = e.length; | |
24440 var slot = findSlot(e); | |
24441 var copy = readSlot(slot); | |
24442 if (copy != null) { | |
24443 if (true == copy) { // Cycle, so commit to making a copy. | |
24444 copy = JS('=List', 'new Array(#)', length); | |
24445 writeSlot(slot, copy); | |
24446 } | |
24447 return copy; | |
24448 } | |
24449 | |
24450 int i = 0; | |
24451 | |
24452 if (_isJavaScriptArray(e) && | |
24453 // We have to copy immutable lists, otherwise the structured clone | |
24454 // algorithm will copy the .immutable$list marker property, making the | |
24455 // list immutable when received! | |
24456 !_isImmutableJavaScriptArray(e)) { | |
24457 writeSlot(slot, true); // Deferred copy. | |
24458 for ( ; i < length; i++) { | |
24459 var element = e[i]; | |
24460 var elementCopy = walk(element); | |
24461 if (!identical(elementCopy, element)) { | |
24462 copy = readSlot(slot); // Cyclic reference may have created it. | |
24463 if (true == copy) { | |
24464 copy = JS('=List', 'new Array(#)', length); | |
24465 writeSlot(slot, copy); | |
24466 } | |
24467 for (int j = 0; j < i; j++) { | |
24468 copy[j] = e[j]; | |
24469 } | |
24470 copy[i] = elementCopy; | |
24471 i++; | |
24472 break; | |
24473 } | |
24474 } | |
24475 if (copy == null) { | |
24476 copy = e; | |
24477 writeSlot(slot, copy); | |
24478 } | |
24479 } else { | |
24480 // Not a JavaScript Array. We are forced to make a copy. | |
24481 copy = JS('=List', 'new Array(#)', length); | |
24482 writeSlot(slot, copy); | |
24483 } | |
24484 | |
24485 for ( ; i < length; i++) { | |
24486 copy[i] = walk(e[i]); | |
24487 } | |
24488 return copy; | |
24489 } | |
24490 | |
24491 throw new UnimplementedError('structured clone of other type'); | |
24492 } | |
24493 | |
24494 var copy = walk(value); | |
24495 cleanupSlots(); | |
24496 return copy; | |
24497 } | |
24498 | |
24499 /** | |
24500 * Converts a native value into a Dart object. | |
24501 * | |
24502 * If [mustCopy] is [:false:], may return the original input. May mutate the | |
24503 * original input (but will be idempotent if mutation occurs). It is assumed | |
24504 * that this conversion happens on native serializable script values such values | |
24505 * from native DOM calls. | |
24506 * | |
24507 * [object] is the result of a structured clone operation. | |
24508 * | |
24509 * If necessary, JavaScript Dates are converted into Dart Dates. | |
24510 * | |
24511 * If [mustCopy] is [:true:], the entire object is copied and the original input | |
24512 * is not mutated. This should be the case where Dart and JavaScript code can | |
24513 * access the value, for example, via multiple event listeners for | |
24514 * MessageEvents. Mutating the object to make it more 'Dart-like' would corrupt | |
24515 * the value as seen from the JavaScript listeners. | |
24516 */ | |
24517 _convertNativeToDart_AcceptStructuredClone(object, {mustCopy = false}) { | |
24518 | |
24519 // TODO(sra): Replace slots with identity hash table that works on non-dart | |
24520 // objects. | |
24521 var values = []; | |
24522 var copies = []; | |
24523 | |
24524 int findSlot(value) { | |
24525 int length = values.length; | |
24526 for (int i = 0; i < length; i++) { | |
24527 if (identical(values[i], value)) return i; | |
24528 } | |
24529 values.add(value); | |
24530 copies.add(null); | |
24531 return length; | |
24532 } | |
24533 readSlot(int i) => copies[i]; | |
24534 writeSlot(int i, x) { copies[i] = x; } | |
24535 | |
24536 walk(e) { | |
24537 if (e == null) return e; | |
24538 if (e is bool) return e; | |
24539 if (e is num) return e; | |
24540 if (e is String) return e; | |
24541 | |
24542 if (_isJavaScriptDate(e)) { | |
24543 // TODO(sra). | |
24544 throw new UnimplementedError('structured clone of Date'); | |
24545 } | |
24546 | |
24547 if (_isJavaScriptRegExp(e)) { | |
24548 // TODO(sra). | |
24549 throw new UnimplementedError('structured clone of RegExp'); | |
24550 } | |
24551 | |
24552 if (_isJavaScriptSimpleObject(e)) { | |
24553 // TODO(sra): If mustCopy is false, swizzle the prototype for one of a Map | |
24554 // implementation that uses the properies as storage. | |
24555 var slot = findSlot(e); | |
24556 var copy = readSlot(slot); | |
24557 if (copy != null) return copy; | |
24558 copy = {}; | |
24559 | |
24560 writeSlot(slot, copy); | |
24561 for (final key in JS('=List', 'Object.keys(#)', e)) { | |
24562 copy[key] = walk(JS('var', '#[#]', e, key)); | |
24563 } | |
24564 return copy; | |
24565 } | |
24566 | |
24567 if (_isJavaScriptArray(e)) { | |
24568 var slot = findSlot(e); | |
24569 var copy = readSlot(slot); | |
24570 if (copy != null) return copy; | |
24571 | |
24572 int length = e.length; | |
24573 // Since a JavaScript Array is an instance of Dart List, we can modify it | |
24574 // in-place unless we must copy. | |
24575 copy = mustCopy ? JS('=List', 'new Array(#)', length) : e; | |
24576 writeSlot(slot, copy); | |
24577 | |
24578 for (int i = 0; i < length; i++) { | |
24579 copy[i] = walk(e[i]); | |
24580 } | |
24581 return copy; | |
24582 } | |
24583 | |
24584 // Assume anything else is already a valid Dart object, either by having | |
24585 // already been processed, or e.g. a clonable native class. | |
24586 return e; | |
24587 } | |
24588 | |
24589 var copy = walk(object); | |
24590 return copy; | |
24591 } | |
24592 | |
24593 | |
24594 bool _isJavaScriptDate(value) => JS('bool', '# instanceof Date', value); | |
24595 bool _isJavaScriptRegExp(value) => JS('bool', '# instanceof RegExp', value); | |
24596 bool _isJavaScriptArray(value) => JS('bool', '# instanceof Array', value); | |
24597 bool _isJavaScriptSimpleObject(value) => | |
24598 JS('bool', 'Object.getPrototypeOf(#) === Object.prototype', value); | |
24599 bool _isImmutableJavaScriptArray(value) => | |
24600 JS('bool', r'!!(#.immutable$list)', value); | |
24601 | |
24602 | |
24603 | |
24604 const String _serializedScriptValue = | |
24605 'num|String|bool|' | |
24606 '=List|=Object|' | |
24607 'Blob|File|ArrayBuffer|ArrayBufferView' | |
24608 // TODO(sra): Add Date, RegExp. | |
24609 ; | |
24610 const _annotation_Creates_SerializedScriptValue = | |
24611 const Creates(_serializedScriptValue); | |
24612 const _annotation_Returns_SerializedScriptValue = | |
24613 const Returns(_serializedScriptValue); | |
24614 | |
24615 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. | 24250 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. |
24616 const _annotation_Creates_IDBKey = const Creates(_idbKey); | 24251 const _annotation_Creates_IDBKey = const Creates(_idbKey); |
24617 const _annotation_Returns_IDBKey = const Returns(_idbKey); | 24252 const _annotation_Returns_IDBKey = const Returns(_idbKey); |
24618 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 24253 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
24619 // for details. All rights reserved. Use of this source code is governed by a | 24254 // for details. All rights reserved. Use of this source code is governed by a |
24620 // BSD-style license that can be found in the LICENSE file. | 24255 // BSD-style license that can be found in the LICENSE file. |
24621 | 24256 |
24622 | 24257 |
24623 // TODO(vsm): Unify with Dartium version. | 24258 // TODO(vsm): Unify with Dartium version. |
24624 class _DOMWindowCrossFrame implements Window { | 24259 class _DOMWindowCrossFrame implements Window { |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
25151 if (length < 0) throw new ArgumentError('length'); | 24786 if (length < 0) throw new ArgumentError('length'); |
25152 if (start < 0) throw new RangeError.value(start); | 24787 if (start < 0) throw new RangeError.value(start); |
25153 int end = start + length; | 24788 int end = start + length; |
25154 if (end > a.length) throw new RangeError.value(end); | 24789 if (end > a.length) throw new RangeError.value(end); |
25155 for (int i = start; i < end; i++) { | 24790 for (int i = start; i < end; i++) { |
25156 accumulator.add(a[i]); | 24791 accumulator.add(a[i]); |
25157 } | 24792 } |
25158 return accumulator; | 24793 return accumulator; |
25159 } | 24794 } |
25160 } | 24795 } |
OLD | NEW |