| 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 import 'dart:web_audio' as web_audio; | 7 import 'dart:web_audio' as web_audio; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 9 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 10 // BSD-style license that can be found in the LICENSE file. |
| 10 | 11 |
| 11 // DO NOT EDIT | 12 // DO NOT EDIT |
| 12 // Auto-generated dart:html library. | 13 // Auto-generated dart:html library. |
| (...skipping 4743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4756 /// @domName Clipboard; @docsEditable true | 4757 /// @domName Clipboard; @docsEditable true |
| 4757 class Clipboard native "*Clipboard" { | 4758 class Clipboard native "*Clipboard" { |
| 4758 | 4759 |
| 4759 /// @domName Clipboard.dropEffect; @docsEditable true | 4760 /// @domName Clipboard.dropEffect; @docsEditable true |
| 4760 String dropEffect; | 4761 String dropEffect; |
| 4761 | 4762 |
| 4762 /// @domName Clipboard.effectAllowed; @docsEditable true | 4763 /// @domName Clipboard.effectAllowed; @docsEditable true |
| 4763 String effectAllowed; | 4764 String effectAllowed; |
| 4764 | 4765 |
| 4765 /// @domName Clipboard.files; @docsEditable true | 4766 /// @domName Clipboard.files; @docsEditable true |
| 4766 @Returns('_FileList') @Creates('_FileList') | 4767 final FileList files; |
| 4767 final List<File> files; | |
| 4768 | 4768 |
| 4769 /// @domName Clipboard.items; @docsEditable true | 4769 /// @domName Clipboard.items; @docsEditable true |
| 4770 final DataTransferItemList items; | 4770 final DataTransferItemList items; |
| 4771 | 4771 |
| 4772 /// @domName Clipboard.types; @docsEditable true | 4772 /// @domName Clipboard.types; @docsEditable true |
| 4773 final List types; | 4773 final List types; |
| 4774 | 4774 |
| 4775 /// @domName Clipboard.clearData; @docsEditable true | 4775 /// @domName Clipboard.clearData; @docsEditable true |
| 4776 void clearData([String type]) native; | 4776 void clearData([String type]) native; |
| 4777 | 4777 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5259 } | 5259 } |
| 5260 | 5260 |
| 5261 void addLast(DOMMimeType value) { | 5261 void addLast(DOMMimeType value) { |
| 5262 throw new UnsupportedError("Cannot add to immutable List."); | 5262 throw new UnsupportedError("Cannot add to immutable List."); |
| 5263 } | 5263 } |
| 5264 | 5264 |
| 5265 void addAll(Collection<DOMMimeType> collection) { | 5265 void addAll(Collection<DOMMimeType> collection) { |
| 5266 throw new UnsupportedError("Cannot add to immutable List."); | 5266 throw new UnsupportedError("Cannot add to immutable List."); |
| 5267 } | 5267 } |
| 5268 | 5268 |
| 5269 bool contains(DOMMimeType element) => _Collections.contains(this, element); | 5269 bool contains(DOMMimeType element) => Collections.contains(this, element); |
| 5270 | 5270 |
| 5271 void forEach(void f(DOMMimeType element)) => _Collections.forEach(this, f); | 5271 void forEach(void f(DOMMimeType element)) => Collections.forEach(this, f); |
| 5272 | 5272 |
| 5273 Collection map(f(DOMMimeType element)) => _Collections.map(this, [], f); | 5273 Collection map(f(DOMMimeType element)) => Collections.map(this, [], f); |
| 5274 | 5274 |
| 5275 Collection<DOMMimeType> filter(bool f(DOMMimeType element)) => | 5275 Collection<DOMMimeType> filter(bool f(DOMMimeType element)) => |
| 5276 _Collections.filter(this, <DOMMimeType>[], f); | 5276 Collections.filter(this, <DOMMimeType>[], f); |
| 5277 | 5277 |
| 5278 bool every(bool f(DOMMimeType element)) => _Collections.every(this, f); | 5278 bool every(bool f(DOMMimeType element)) => Collections.every(this, f); |
| 5279 | 5279 |
| 5280 bool some(bool f(DOMMimeType element)) => _Collections.some(this, f); | 5280 bool some(bool f(DOMMimeType element)) => Collections.some(this, f); |
| 5281 | 5281 |
| 5282 bool get isEmpty => this.length == 0; | 5282 bool get isEmpty => this.length == 0; |
| 5283 | 5283 |
| 5284 // From List<DOMMimeType>: | 5284 // From List<DOMMimeType>: |
| 5285 | 5285 |
| 5286 void sort([Comparator<DOMMimeType> compare = Comparable.compare]) { | 5286 void sort([Comparator<DOMMimeType> compare = Comparable.compare]) { |
| 5287 throw new UnsupportedError("Cannot sort immutable List."); | 5287 throw new UnsupportedError("Cannot sort immutable List."); |
| 5288 } | 5288 } |
| 5289 | 5289 |
| 5290 int indexOf(DOMMimeType element, [int start = 0]) => | 5290 int indexOf(DOMMimeType element, [int start = 0]) => |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5400 } | 5400 } |
| 5401 | 5401 |
| 5402 void addLast(DOMPlugin value) { | 5402 void addLast(DOMPlugin value) { |
| 5403 throw new UnsupportedError("Cannot add to immutable List."); | 5403 throw new UnsupportedError("Cannot add to immutable List."); |
| 5404 } | 5404 } |
| 5405 | 5405 |
| 5406 void addAll(Collection<DOMPlugin> collection) { | 5406 void addAll(Collection<DOMPlugin> collection) { |
| 5407 throw new UnsupportedError("Cannot add to immutable List."); | 5407 throw new UnsupportedError("Cannot add to immutable List."); |
| 5408 } | 5408 } |
| 5409 | 5409 |
| 5410 bool contains(DOMPlugin element) => _Collections.contains(this, element); | 5410 bool contains(DOMPlugin element) => Collections.contains(this, element); |
| 5411 | 5411 |
| 5412 void forEach(void f(DOMPlugin element)) => _Collections.forEach(this, f); | 5412 void forEach(void f(DOMPlugin element)) => Collections.forEach(this, f); |
| 5413 | 5413 |
| 5414 Collection map(f(DOMPlugin element)) => _Collections.map(this, [], f); | 5414 Collection map(f(DOMPlugin element)) => Collections.map(this, [], f); |
| 5415 | 5415 |
| 5416 Collection<DOMPlugin> filter(bool f(DOMPlugin element)) => | 5416 Collection<DOMPlugin> filter(bool f(DOMPlugin element)) => |
| 5417 _Collections.filter(this, <DOMPlugin>[], f); | 5417 Collections.filter(this, <DOMPlugin>[], f); |
| 5418 | 5418 |
| 5419 bool every(bool f(DOMPlugin element)) => _Collections.every(this, f); | 5419 bool every(bool f(DOMPlugin element)) => Collections.every(this, f); |
| 5420 | 5420 |
| 5421 bool some(bool f(DOMPlugin element)) => _Collections.some(this, f); | 5421 bool some(bool f(DOMPlugin element)) => Collections.some(this, f); |
| 5422 | 5422 |
| 5423 bool get isEmpty => this.length == 0; | 5423 bool get isEmpty => this.length == 0; |
| 5424 | 5424 |
| 5425 // From List<DOMPlugin>: | 5425 // From List<DOMPlugin>: |
| 5426 | 5426 |
| 5427 void sort([Comparator<DOMPlugin> compare = Comparable.compare]) { | 5427 void sort([Comparator<DOMPlugin> compare = Comparable.compare]) { |
| 5428 throw new UnsupportedError("Cannot sort immutable List."); | 5428 throw new UnsupportedError("Cannot sort immutable List."); |
| 5429 } | 5429 } |
| 5430 | 5430 |
| 5431 int indexOf(DOMPlugin element, [int start = 0]) => | 5431 int indexOf(DOMPlugin element, [int start = 0]) => |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5779 /// @domName DedicatedWorkerContext; @docsEditable true | 5779 /// @domName DedicatedWorkerContext; @docsEditable true |
| 5780 class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerConte
xt" { | 5780 class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerConte
xt" { |
| 5781 | 5781 |
| 5782 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 5782 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 5783 DedicatedWorkerContextEvents get on => | 5783 DedicatedWorkerContextEvents get on => |
| 5784 new DedicatedWorkerContextEvents(this); | 5784 new DedicatedWorkerContextEvents(this); |
| 5785 | 5785 |
| 5786 /// @domName DedicatedWorkerContext.postMessage; @docsEditable true | 5786 /// @domName DedicatedWorkerContext.postMessage; @docsEditable true |
| 5787 void postMessage(/*any*/ message, [List messagePorts]) { | 5787 void postMessage(/*any*/ message, [List messagePorts]) { |
| 5788 if (?messagePorts) { | 5788 if (?messagePorts) { |
| 5789 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 5789 var message_1 = convertDartToNative_SerializedScriptValue(message); |
| 5790 _postMessage_1(message_1, messagePorts); | 5790 _postMessage_1(message_1, messagePorts); |
| 5791 return; | 5791 return; |
| 5792 } | 5792 } |
| 5793 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 5793 var message_2 = convertDartToNative_SerializedScriptValue(message); |
| 5794 _postMessage_2(message_2); | 5794 _postMessage_2(message_2); |
| 5795 return; | 5795 return; |
| 5796 } | 5796 } |
| 5797 void _postMessage_1(message, List messagePorts) native "postMessage"; | 5797 void _postMessage_1(message, List messagePorts) native "postMessage"; |
| 5798 void _postMessage_2(message) native "postMessage"; | 5798 void _postMessage_2(message) native "postMessage"; |
| 5799 } | 5799 } |
| 5800 | 5800 |
| 5801 class DedicatedWorkerContextEvents extends WorkerContextEvents { | 5801 class DedicatedWorkerContextEvents extends WorkerContextEvents { |
| 5802 DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr); | 5802 DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr); |
| 5803 | 5803 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5868 | 5868 |
| 5869 /// @domName DirectoryEntry; @docsEditable true | 5869 /// @domName DirectoryEntry; @docsEditable true |
| 5870 class DirectoryEntry extends Entry native "*DirectoryEntry" { | 5870 class DirectoryEntry extends Entry native "*DirectoryEntry" { |
| 5871 | 5871 |
| 5872 /// @domName DirectoryEntry.createReader; @docsEditable true | 5872 /// @domName DirectoryEntry.createReader; @docsEditable true |
| 5873 DirectoryReader createReader() native; | 5873 DirectoryReader createReader() native; |
| 5874 | 5874 |
| 5875 /// @domName DirectoryEntry.getDirectory; @docsEditable true | 5875 /// @domName DirectoryEntry.getDirectory; @docsEditable true |
| 5876 void getDirectory(String path, {Map options, EntryCallback successCallback, Er
rorCallback errorCallback}) { | 5876 void getDirectory(String path, {Map options, EntryCallback successCallback, Er
rorCallback errorCallback}) { |
| 5877 if (?errorCallback) { | 5877 if (?errorCallback) { |
| 5878 var options_1 = _convertDartToNative_Dictionary(options); | 5878 var options_1 = convertDartToNative_Dictionary(options); |
| 5879 _getDirectory_1(path, options_1, successCallback, errorCallback); | 5879 _getDirectory_1(path, options_1, successCallback, errorCallback); |
| 5880 return; | 5880 return; |
| 5881 } | 5881 } |
| 5882 if (?successCallback) { | 5882 if (?successCallback) { |
| 5883 var options_2 = _convertDartToNative_Dictionary(options); | 5883 var options_2 = convertDartToNative_Dictionary(options); |
| 5884 _getDirectory_2(path, options_2, successCallback); | 5884 _getDirectory_2(path, options_2, successCallback); |
| 5885 return; | 5885 return; |
| 5886 } | 5886 } |
| 5887 if (?options) { | 5887 if (?options) { |
| 5888 var options_3 = _convertDartToNative_Dictionary(options); | 5888 var options_3 = convertDartToNative_Dictionary(options); |
| 5889 _getDirectory_3(path, options_3); | 5889 _getDirectory_3(path, options_3); |
| 5890 return; | 5890 return; |
| 5891 } | 5891 } |
| 5892 _getDirectory_4(path); | 5892 _getDirectory_4(path); |
| 5893 return; | 5893 return; |
| 5894 } | 5894 } |
| 5895 void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallba
ck errorCallback) native "getDirectory"; | 5895 void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallba
ck errorCallback) native "getDirectory"; |
| 5896 void _getDirectory_2(path, options, EntryCallback successCallback) native "get
Directory"; | 5896 void _getDirectory_2(path, options, EntryCallback successCallback) native "get
Directory"; |
| 5897 void _getDirectory_3(path, options) native "getDirectory"; | 5897 void _getDirectory_3(path, options) native "getDirectory"; |
| 5898 void _getDirectory_4(path) native "getDirectory"; | 5898 void _getDirectory_4(path) native "getDirectory"; |
| 5899 | 5899 |
| 5900 /// @domName DirectoryEntry.getFile; @docsEditable true | 5900 /// @domName DirectoryEntry.getFile; @docsEditable true |
| 5901 void getFile(String path, {Map options, EntryCallback successCallback, ErrorCa
llback errorCallback}) { | 5901 void getFile(String path, {Map options, EntryCallback successCallback, ErrorCa
llback errorCallback}) { |
| 5902 if (?errorCallback) { | 5902 if (?errorCallback) { |
| 5903 var options_1 = _convertDartToNative_Dictionary(options); | 5903 var options_1 = convertDartToNative_Dictionary(options); |
| 5904 _getFile_1(path, options_1, successCallback, errorCallback); | 5904 _getFile_1(path, options_1, successCallback, errorCallback); |
| 5905 return; | 5905 return; |
| 5906 } | 5906 } |
| 5907 if (?successCallback) { | 5907 if (?successCallback) { |
| 5908 var options_2 = _convertDartToNative_Dictionary(options); | 5908 var options_2 = convertDartToNative_Dictionary(options); |
| 5909 _getFile_2(path, options_2, successCallback); | 5909 _getFile_2(path, options_2, successCallback); |
| 5910 return; | 5910 return; |
| 5911 } | 5911 } |
| 5912 if (?options) { | 5912 if (?options) { |
| 5913 var options_3 = _convertDartToNative_Dictionary(options); | 5913 var options_3 = convertDartToNative_Dictionary(options); |
| 5914 _getFile_3(path, options_3); | 5914 _getFile_3(path, options_3); |
| 5915 return; | 5915 return; |
| 5916 } | 5916 } |
| 5917 _getFile_4(path); | 5917 _getFile_4(path); |
| 5918 return; | 5918 return; |
| 5919 } | 5919 } |
| 5920 void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback er
rorCallback) native "getFile"; | 5920 void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback er
rorCallback) native "getFile"; |
| 5921 void _getFile_2(path, options, EntryCallback successCallback) native "getFile"
; | 5921 void _getFile_2(path, options, EntryCallback successCallback) native "getFile"
; |
| 5922 void _getFile_3(path, options) native "getFile"; | 5922 void _getFile_3(path, options) native "getFile"; |
| 5923 void _getFile_4(path) native "getFile"; | 5923 void _getFile_4(path) native "getFile"; |
| 5924 | 5924 |
| 5925 /// @domName DirectoryEntry.removeRecursively; @docsEditable true | 5925 /// @domName DirectoryEntry.removeRecursively; @docsEditable true |
| 5926 void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallb
ack]) native; | 5926 void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallb
ack]) native; |
| 5927 } | 5927 } |
| 5928 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5928 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 5929 // for details. All rights reserved. Use of this source code is governed by a | 5929 // for details. All rights reserved. Use of this source code is governed by a |
| 5930 // BSD-style license that can be found in the LICENSE file. | 5930 // BSD-style license that can be found in the LICENSE file. |
| 5931 | 5931 |
| 5932 | 5932 |
| 5933 /// @domName DirectoryEntrySync; @docsEditable true | 5933 /// @domName DirectoryEntrySync; @docsEditable true |
| 5934 class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" { | 5934 class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" { |
| 5935 | 5935 |
| 5936 /// @domName DirectoryEntrySync.createReader; @docsEditable true | 5936 /// @domName DirectoryEntrySync.createReader; @docsEditable true |
| 5937 DirectoryReaderSync createReader() native; | 5937 DirectoryReaderSync createReader() native; |
| 5938 | 5938 |
| 5939 /// @domName DirectoryEntrySync.getDirectory; @docsEditable true | 5939 /// @domName DirectoryEntrySync.getDirectory; @docsEditable true |
| 5940 DirectoryEntrySync getDirectory(String path, Map flags) { | 5940 DirectoryEntrySync getDirectory(String path, Map flags) { |
| 5941 var flags_1 = _convertDartToNative_Dictionary(flags); | 5941 var flags_1 = convertDartToNative_Dictionary(flags); |
| 5942 return _getDirectory_1(path, flags_1); | 5942 return _getDirectory_1(path, flags_1); |
| 5943 } | 5943 } |
| 5944 DirectoryEntrySync _getDirectory_1(path, flags) native "getDirectory"; | 5944 DirectoryEntrySync _getDirectory_1(path, flags) native "getDirectory"; |
| 5945 | 5945 |
| 5946 /// @domName DirectoryEntrySync.getFile; @docsEditable true | 5946 /// @domName DirectoryEntrySync.getFile; @docsEditable true |
| 5947 FileEntrySync getFile(String path, Map flags) { | 5947 FileEntrySync getFile(String path, Map flags) { |
| 5948 var flags_1 = _convertDartToNative_Dictionary(flags); | 5948 var flags_1 = convertDartToNative_Dictionary(flags); |
| 5949 return _getFile_1(path, flags_1); | 5949 return _getFile_1(path, flags_1); |
| 5950 } | 5950 } |
| 5951 FileEntrySync _getFile_1(path, flags) native "getFile"; | 5951 FileEntrySync _getFile_1(path, flags) native "getFile"; |
| 5952 | 5952 |
| 5953 /// @domName DirectoryEntrySync.removeRecursively; @docsEditable true | 5953 /// @domName DirectoryEntrySync.removeRecursively; @docsEditable true |
| 5954 void removeRecursively() native; | 5954 void removeRecursively() native; |
| 5955 } | 5955 } |
| 5956 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5956 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 5957 // for details. All rights reserved. Use of this source code is governed by a | 5957 // for details. All rights reserved. Use of this source code is governed by a |
| 5958 // BSD-style license that can be found in the LICENSE file. | 5958 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6366 String get title => ""; | 6366 String get title => ""; |
| 6367 String get tagName => ""; | 6367 String get tagName => ""; |
| 6368 String get webkitdropzone => ""; | 6368 String get webkitdropzone => ""; |
| 6369 String get webkitRegionOverflow => ""; | 6369 String get webkitRegionOverflow => ""; |
| 6370 Element get $m_firstElementChild { | 6370 Element get $m_firstElementChild { |
| 6371 if (elements.length > 0) { | 6371 if (elements.length > 0) { |
| 6372 return elements[0]; | 6372 return elements[0]; |
| 6373 } | 6373 } |
| 6374 return null; | 6374 return null; |
| 6375 } | 6375 } |
| 6376 Element get $m_lastElementChild() => elements.last; | 6376 Element get $m_lastElementChild => elements.last; |
| 6377 Element get nextElementSibling => null; | 6377 Element get nextElementSibling => null; |
| 6378 Element get previousElementSibling => null; | 6378 Element get previousElementSibling => null; |
| 6379 Element get offsetParent => null; | 6379 Element get offsetParent => null; |
| 6380 Element get parent => null; | 6380 Element get parent => null; |
| 6381 Map<String, String> get attributes => const {}; | 6381 Map<String, String> get attributes => const {}; |
| 6382 CssClassSet get classes => new _FrozenCssClassSet(); | 6382 CssClassSet get classes => new _FrozenCssClassSet(); |
| 6383 Map<String, String> get dataAttributes => const {}; | 6383 Map<String, String> get dataAttributes => const {}; |
| 6384 CSSStyleDeclaration get style => new Element.tag('div').style; | 6384 CSSStyleDeclaration get style => new Element.tag('div').style; |
| 6385 Future<CSSStyleDeclaration> get computedStyle => | 6385 Future<CSSStyleDeclaration> get computedStyle => |
| 6386 _emptyStyleFuture(); | 6386 _emptyStyleFuture(); |
| (...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8064 final String name; | 8064 final String name; |
| 8065 | 8065 |
| 8066 /// @domName FileException.toString; @docsEditable true | 8066 /// @domName FileException.toString; @docsEditable true |
| 8067 String toString() native; | 8067 String toString() native; |
| 8068 } | 8068 } |
| 8069 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8069 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8070 // for details. All rights reserved. Use of this source code is governed by a | 8070 // for details. All rights reserved. Use of this source code is governed by a |
| 8071 // BSD-style license that can be found in the LICENSE file. | 8071 // BSD-style license that can be found in the LICENSE file. |
| 8072 | 8072 |
| 8073 | 8073 |
| 8074 /// @domName FileList; @docsEditable true |
| 8075 class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
st" { |
| 8076 |
| 8077 /// @domName FileList.length; @docsEditable true |
| 8078 final int length; |
| 8079 |
| 8080 File operator[](int index) => JS("File", "#[#]", this, index); |
| 8081 |
| 8082 void operator[]=(int index, File value) { |
| 8083 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 8084 } |
| 8085 // -- start List<File> mixins. |
| 8086 // File is the element type. |
| 8087 |
| 8088 // From Iterable<File>: |
| 8089 |
| 8090 Iterator<File> iterator() { |
| 8091 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 8092 // be cached in both iterator _and_ forEach method. For now caching it |
| 8093 // for consistency. |
| 8094 return new FixedSizeListIterator<File>(this); |
| 8095 } |
| 8096 |
| 8097 // From Collection<File>: |
| 8098 |
| 8099 void add(File value) { |
| 8100 throw new UnsupportedError("Cannot add to immutable List."); |
| 8101 } |
| 8102 |
| 8103 void addLast(File value) { |
| 8104 throw new UnsupportedError("Cannot add to immutable List."); |
| 8105 } |
| 8106 |
| 8107 void addAll(Collection<File> collection) { |
| 8108 throw new UnsupportedError("Cannot add to immutable List."); |
| 8109 } |
| 8110 |
| 8111 bool contains(File element) => Collections.contains(this, element); |
| 8112 |
| 8113 void forEach(void f(File element)) => Collections.forEach(this, f); |
| 8114 |
| 8115 Collection map(f(File element)) => Collections.map(this, [], f); |
| 8116 |
| 8117 Collection<File> filter(bool f(File element)) => |
| 8118 Collections.filter(this, <File>[], f); |
| 8119 |
| 8120 bool every(bool f(File element)) => Collections.every(this, f); |
| 8121 |
| 8122 bool some(bool f(File element)) => Collections.some(this, f); |
| 8123 |
| 8124 bool get isEmpty => this.length == 0; |
| 8125 |
| 8126 // From List<File>: |
| 8127 |
| 8128 void sort([Comparator<File> compare = Comparable.compare]) { |
| 8129 throw new UnsupportedError("Cannot sort immutable List."); |
| 8130 } |
| 8131 |
| 8132 int indexOf(File element, [int start = 0]) => |
| 8133 _Lists.indexOf(this, element, start, this.length); |
| 8134 |
| 8135 int lastIndexOf(File element, [int start]) { |
| 8136 if (start == null) start = length - 1; |
| 8137 return _Lists.lastIndexOf(this, element, start); |
| 8138 } |
| 8139 |
| 8140 File get first => this[0]; |
| 8141 |
| 8142 File get last => this[length - 1]; |
| 8143 |
| 8144 File removeLast() { |
| 8145 throw new UnsupportedError("Cannot removeLast on immutable List."); |
| 8146 } |
| 8147 |
| 8148 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) { |
| 8149 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 8150 } |
| 8151 |
| 8152 void removeRange(int start, int rangeLength) { |
| 8153 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 8154 } |
| 8155 |
| 8156 void insertRange(int start, int rangeLength, [File initialValue]) { |
| 8157 throw new UnsupportedError("Cannot insertRange on immutable List."); |
| 8158 } |
| 8159 |
| 8160 List<File> getRange(int start, int rangeLength) => |
| 8161 _Lists.getRange(this, start, rangeLength, <File>[]); |
| 8162 |
| 8163 // -- end List<File> mixins. |
| 8164 |
| 8165 /// @domName FileList.item; @docsEditable true |
| 8166 File item(int index) native; |
| 8167 } |
| 8168 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8169 // for details. All rights reserved. Use of this source code is governed by a |
| 8170 // BSD-style license that can be found in the LICENSE file. |
| 8171 |
| 8172 |
| 8074 /// @domName FileReader; @docsEditable true | 8173 /// @domName FileReader; @docsEditable true |
| 8075 class FileReader extends EventTarget native "*FileReader" { | 8174 class FileReader extends EventTarget native "*FileReader" { |
| 8076 | 8175 |
| 8077 factory FileReader() => _FileReaderFactoryProvider.createFileReader(); | 8176 factory FileReader() => _FileReaderFactoryProvider.createFileReader(); |
| 8078 | 8177 |
| 8079 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 8178 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 8080 FileReaderEvents get on => | 8179 FileReaderEvents get on => |
| 8081 new FileReaderEvents(this); | 8180 new FileReaderEvents(this); |
| 8082 | 8181 |
| 8083 static const int DONE = 2; | 8182 static const int DONE = 2; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8307 } | 8406 } |
| 8308 | 8407 |
| 8309 void addLast(num value) { | 8408 void addLast(num value) { |
| 8310 throw new UnsupportedError("Cannot add to immutable List."); | 8409 throw new UnsupportedError("Cannot add to immutable List."); |
| 8311 } | 8410 } |
| 8312 | 8411 |
| 8313 void addAll(Collection<num> collection) { | 8412 void addAll(Collection<num> collection) { |
| 8314 throw new UnsupportedError("Cannot add to immutable List."); | 8413 throw new UnsupportedError("Cannot add to immutable List."); |
| 8315 } | 8414 } |
| 8316 | 8415 |
| 8317 bool contains(num element) => _Collections.contains(this, element); | 8416 bool contains(num element) => Collections.contains(this, element); |
| 8318 | 8417 |
| 8319 void forEach(void f(num element)) => _Collections.forEach(this, f); | 8418 void forEach(void f(num element)) => Collections.forEach(this, f); |
| 8320 | 8419 |
| 8321 Collection map(f(num element)) => _Collections.map(this, [], f); | 8420 Collection map(f(num element)) => Collections.map(this, [], f); |
| 8322 | 8421 |
| 8323 Collection<num> filter(bool f(num element)) => | 8422 Collection<num> filter(bool f(num element)) => |
| 8324 _Collections.filter(this, <num>[], f); | 8423 Collections.filter(this, <num>[], f); |
| 8325 | 8424 |
| 8326 bool every(bool f(num element)) => _Collections.every(this, f); | 8425 bool every(bool f(num element)) => Collections.every(this, f); |
| 8327 | 8426 |
| 8328 bool some(bool f(num element)) => _Collections.some(this, f); | 8427 bool some(bool f(num element)) => Collections.some(this, f); |
| 8329 | 8428 |
| 8330 bool get isEmpty => this.length == 0; | 8429 bool get isEmpty => this.length == 0; |
| 8331 | 8430 |
| 8332 // From List<num>: | 8431 // From List<num>: |
| 8333 | 8432 |
| 8334 void sort([Comparator<num> compare = Comparable.compare]) { | 8433 void sort([Comparator<num> compare = Comparable.compare]) { |
| 8335 throw new UnsupportedError("Cannot sort immutable List."); | 8434 throw new UnsupportedError("Cannot sort immutable List."); |
| 8336 } | 8435 } |
| 8337 | 8436 |
| 8338 int indexOf(num element, [int start = 0]) => | 8437 int indexOf(num element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8417 } | 8516 } |
| 8418 | 8517 |
| 8419 void addLast(num value) { | 8518 void addLast(num value) { |
| 8420 throw new UnsupportedError("Cannot add to immutable List."); | 8519 throw new UnsupportedError("Cannot add to immutable List."); |
| 8421 } | 8520 } |
| 8422 | 8521 |
| 8423 void addAll(Collection<num> collection) { | 8522 void addAll(Collection<num> collection) { |
| 8424 throw new UnsupportedError("Cannot add to immutable List."); | 8523 throw new UnsupportedError("Cannot add to immutable List."); |
| 8425 } | 8524 } |
| 8426 | 8525 |
| 8427 bool contains(num element) => _Collections.contains(this, element); | 8526 bool contains(num element) => Collections.contains(this, element); |
| 8428 | 8527 |
| 8429 void forEach(void f(num element)) => _Collections.forEach(this, f); | 8528 void forEach(void f(num element)) => Collections.forEach(this, f); |
| 8430 | 8529 |
| 8431 Collection map(f(num element)) => _Collections.map(this, [], f); | 8530 Collection map(f(num element)) => Collections.map(this, [], f); |
| 8432 | 8531 |
| 8433 Collection<num> filter(bool f(num element)) => | 8532 Collection<num> filter(bool f(num element)) => |
| 8434 _Collections.filter(this, <num>[], f); | 8533 Collections.filter(this, <num>[], f); |
| 8435 | 8534 |
| 8436 bool every(bool f(num element)) => _Collections.every(this, f); | 8535 bool every(bool f(num element)) => Collections.every(this, f); |
| 8437 | 8536 |
| 8438 bool some(bool f(num element)) => _Collections.some(this, f); | 8537 bool some(bool f(num element)) => Collections.some(this, f); |
| 8439 | 8538 |
| 8440 bool get isEmpty => this.length == 0; | 8539 bool get isEmpty => this.length == 0; |
| 8441 | 8540 |
| 8442 // From List<num>: | 8541 // From List<num>: |
| 8443 | 8542 |
| 8444 void sort([Comparator<num> compare = Comparable.compare]) { | 8543 void sort([Comparator<num> compare = Comparable.compare]) { |
| 8445 throw new UnsupportedError("Cannot sort immutable List."); | 8544 throw new UnsupportedError("Cannot sort immutable List."); |
| 8446 } | 8545 } |
| 8447 | 8546 |
| 8448 int indexOf(num element, [int start = 0]) => | 8547 int indexOf(num element, [int start = 0]) => |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8772 } | 8871 } |
| 8773 | 8872 |
| 8774 void addLast(Node value) { | 8873 void addLast(Node value) { |
| 8775 throw new UnsupportedError("Cannot add to immutable List."); | 8874 throw new UnsupportedError("Cannot add to immutable List."); |
| 8776 } | 8875 } |
| 8777 | 8876 |
| 8778 void addAll(Collection<Node> collection) { | 8877 void addAll(Collection<Node> collection) { |
| 8779 throw new UnsupportedError("Cannot add to immutable List."); | 8878 throw new UnsupportedError("Cannot add to immutable List."); |
| 8780 } | 8879 } |
| 8781 | 8880 |
| 8782 bool contains(Node element) => _Collections.contains(this, element); | 8881 bool contains(Node element) => Collections.contains(this, element); |
| 8783 | 8882 |
| 8784 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 8883 void forEach(void f(Node element)) => Collections.forEach(this, f); |
| 8785 | 8884 |
| 8786 Collection map(f(Node element)) => _Collections.map(this, [], f); | 8885 Collection map(f(Node element)) => Collections.map(this, [], f); |
| 8787 | 8886 |
| 8788 Collection<Node> filter(bool f(Node element)) => | 8887 Collection<Node> filter(bool f(Node element)) => |
| 8789 _Collections.filter(this, <Node>[], f); | 8888 Collections.filter(this, <Node>[], f); |
| 8790 | 8889 |
| 8791 bool every(bool f(Node element)) => _Collections.every(this, f); | 8890 bool every(bool f(Node element)) => Collections.every(this, f); |
| 8792 | 8891 |
| 8793 bool some(bool f(Node element)) => _Collections.some(this, f); | 8892 bool some(bool f(Node element)) => Collections.some(this, f); |
| 8794 | 8893 |
| 8795 bool get isEmpty => this.length == 0; | 8894 bool get isEmpty => this.length == 0; |
| 8796 | 8895 |
| 8797 // From List<Node>: | 8896 // From List<Node>: |
| 8798 | 8897 |
| 8799 void sort([Comparator<Node> compare = Comparable.compare]) { | 8898 void sort([Comparator<Node> compare = Comparable.compare]) { |
| 8800 throw new UnsupportedError("Cannot sort immutable List."); | 8899 throw new UnsupportedError("Cannot sort immutable List."); |
| 8801 } | 8900 } |
| 8802 | 8901 |
| 8803 int indexOf(Node element, [int start = 0]) => | 8902 int indexOf(Node element, [int start = 0]) => |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8878 } | 8977 } |
| 8879 | 8978 |
| 8880 void addLast(Node value) { | 8979 void addLast(Node value) { |
| 8881 throw new UnsupportedError("Cannot add to immutable List."); | 8980 throw new UnsupportedError("Cannot add to immutable List."); |
| 8882 } | 8981 } |
| 8883 | 8982 |
| 8884 void addAll(Collection<Node> collection) { | 8983 void addAll(Collection<Node> collection) { |
| 8885 throw new UnsupportedError("Cannot add to immutable List."); | 8984 throw new UnsupportedError("Cannot add to immutable List."); |
| 8886 } | 8985 } |
| 8887 | 8986 |
| 8888 bool contains(Node element) => _Collections.contains(this, element); | 8987 bool contains(Node element) => Collections.contains(this, element); |
| 8889 | 8988 |
| 8890 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 8989 void forEach(void f(Node element)) => Collections.forEach(this, f); |
| 8891 | 8990 |
| 8892 Collection map(f(Node element)) => _Collections.map(this, [], f); | 8991 Collection map(f(Node element)) => Collections.map(this, [], f); |
| 8893 | 8992 |
| 8894 Collection<Node> filter(bool f(Node element)) => | 8993 Collection<Node> filter(bool f(Node element)) => |
| 8895 _Collections.filter(this, <Node>[], f); | 8994 Collections.filter(this, <Node>[], f); |
| 8896 | 8995 |
| 8897 bool every(bool f(Node element)) => _Collections.every(this, f); | 8996 bool every(bool f(Node element)) => Collections.every(this, f); |
| 8898 | 8997 |
| 8899 bool some(bool f(Node element)) => _Collections.some(this, f); | 8998 bool some(bool f(Node element)) => Collections.some(this, f); |
| 8900 | 8999 |
| 8901 bool get isEmpty => this.length == 0; | 9000 bool get isEmpty => this.length == 0; |
| 8902 | 9001 |
| 8903 // From List<Node>: | 9002 // From List<Node>: |
| 8904 | 9003 |
| 8905 void sort([Comparator<Node> compare = Comparable.compare]) { | 9004 void sort([Comparator<Node> compare = Comparable.compare]) { |
| 8906 throw new UnsupportedError("Cannot sort immutable List."); | 9005 throw new UnsupportedError("Cannot sort immutable List."); |
| 8907 } | 9006 } |
| 8908 | 9007 |
| 8909 int indexOf(Node element, [int start = 0]) => | 9008 int indexOf(Node element, [int start = 0]) => |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9351 return; | 9450 return; |
| 9352 } | 9451 } |
| 9353 void _continueFunction_1(key) native "continue"; | 9452 void _continueFunction_1(key) native "continue"; |
| 9354 void _continueFunction_2() native "continue"; | 9453 void _continueFunction_2() native "continue"; |
| 9355 | 9454 |
| 9356 /// @domName IDBCursor.delete; @docsEditable true | 9455 /// @domName IDBCursor.delete; @docsEditable true |
| 9357 IDBRequest delete() native; | 9456 IDBRequest delete() native; |
| 9358 | 9457 |
| 9359 /// @domName IDBCursor.update; @docsEditable true | 9458 /// @domName IDBCursor.update; @docsEditable true |
| 9360 IDBRequest update(/*any*/ value) { | 9459 IDBRequest update(/*any*/ value) { |
| 9361 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 9460 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 9362 return _update_1(value_1); | 9461 return _update_1(value_1); |
| 9363 } | 9462 } |
| 9364 IDBRequest _update_1(value) native "update"; | 9463 IDBRequest _update_1(value) native "update"; |
| 9365 } | 9464 } |
| 9366 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9465 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9367 // for details. All rights reserved. Use of this source code is governed by a | 9466 // for details. All rights reserved. Use of this source code is governed by a |
| 9368 // BSD-style license that can be found in the LICENSE file. | 9467 // BSD-style license that can be found in the LICENSE file. |
| 9369 | 9468 |
| 9370 | 9469 |
| 9371 /// @domName IDBCursorWithValue; @docsEditable true | 9470 /// @domName IDBCursorWithValue; @docsEditable true |
| 9372 class IDBCursorWithValue extends IDBCursor native "*IDBCursorWithValue" { | 9471 class IDBCursorWithValue extends IDBCursor native "*IDBCursorWithValue" { |
| 9373 | 9472 |
| 9374 /// @domName IDBCursorWithValue.value; @docsEditable true | 9473 /// @domName IDBCursorWithValue.value; @docsEditable true |
| 9375 @_annotation_Creates_SerializedScriptValue @_annotation_Returns_SerializedScri
ptValue | 9474 @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScript
Value |
| 9376 final Object value; | 9475 final Object value; |
| 9377 } | 9476 } |
| 9378 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9477 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9379 // for details. All rights reserved. Use of this source code is governed by a | 9478 // for details. All rights reserved. Use of this source code is governed by a |
| 9380 // BSD-style license that can be found in the LICENSE file. | 9479 // BSD-style license that can be found in the LICENSE file. |
| 9381 | 9480 |
| 9382 | 9481 |
| 9383 /// @domName IDBDatabase | 9482 /// @domName IDBDatabase |
| 9384 class IDBDatabase extends EventTarget native "*IDBDatabase" { | 9483 class IDBDatabase extends EventTarget native "*IDBDatabase" { |
| 9385 | 9484 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9441 | 9540 |
| 9442 /// @domName IDBDatabase.addEventListener; @docsEditable true | 9541 /// @domName IDBDatabase.addEventListener; @docsEditable true |
| 9443 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 9542 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
| 9444 | 9543 |
| 9445 /// @domName IDBDatabase.close; @docsEditable true | 9544 /// @domName IDBDatabase.close; @docsEditable true |
| 9446 void close() native; | 9545 void close() native; |
| 9447 | 9546 |
| 9448 /// @domName IDBDatabase.createObjectStore; @docsEditable true | 9547 /// @domName IDBDatabase.createObjectStore; @docsEditable true |
| 9449 IDBObjectStore createObjectStore(String name, [Map options]) { | 9548 IDBObjectStore createObjectStore(String name, [Map options]) { |
| 9450 if (?options) { | 9549 if (?options) { |
| 9451 var options_1 = _convertDartToNative_Dictionary(options); | 9550 var options_1 = convertDartToNative_Dictionary(options); |
| 9452 return _createObjectStore_1(name, options_1); | 9551 return _createObjectStore_1(name, options_1); |
| 9453 } | 9552 } |
| 9454 return _createObjectStore_2(name); | 9553 return _createObjectStore_2(name); |
| 9455 } | 9554 } |
| 9456 IDBObjectStore _createObjectStore_1(name, options) native "createObjectStore"; | 9555 IDBObjectStore _createObjectStore_1(name, options) native "createObjectStore"; |
| 9457 IDBObjectStore _createObjectStore_2(name) native "createObjectStore"; | 9556 IDBObjectStore _createObjectStore_2(name) native "createObjectStore"; |
| 9458 | 9557 |
| 9459 /// @domName IDBDatabase.deleteObjectStore; @docsEditable true | 9558 /// @domName IDBDatabase.deleteObjectStore; @docsEditable true |
| 9460 void deleteObjectStore(String name) native; | 9559 void deleteObjectStore(String name) native; |
| 9461 | 9560 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9599 IDBRequest get(key) { | 9698 IDBRequest get(key) { |
| 9600 if ((?key && (key is IDBKeyRange || key == null))) { | 9699 if ((?key && (key is IDBKeyRange || key == null))) { |
| 9601 return _get_1(key); | 9700 return _get_1(key); |
| 9602 } | 9701 } |
| 9603 if (?key) { | 9702 if (?key) { |
| 9604 var key_1 = _convertDartToNative_IDBKey(key); | 9703 var key_1 = _convertDartToNative_IDBKey(key); |
| 9605 return _get_2(key_1); | 9704 return _get_2(key_1); |
| 9606 } | 9705 } |
| 9607 throw new ArgumentError("Incorrect number or type of arguments"); | 9706 throw new ArgumentError("Incorrect number or type of arguments"); |
| 9608 } | 9707 } |
| 9609 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 9708 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
| 9610 IDBRequest _get_1(IDBKeyRange key) native "get"; | 9709 IDBRequest _get_1(IDBKeyRange key) native "get"; |
| 9611 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 9710 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
| 9612 IDBRequest _get_2(key) native "get"; | 9711 IDBRequest _get_2(key) native "get"; |
| 9613 | 9712 |
| 9614 /// @domName IDBIndex.getKey; @docsEditable true | 9713 /// @domName IDBIndex.getKey; @docsEditable true |
| 9615 IDBRequest getKey(key) { | 9714 IDBRequest getKey(key) { |
| 9616 if ((?key && (key is IDBKeyRange || key == null))) { | 9715 if ((?key && (key is IDBKeyRange || key == null))) { |
| 9617 return _getKey_1(key); | 9716 return _getKey_1(key); |
| 9618 } | 9717 } |
| 9619 if (?key) { | 9718 if (?key) { |
| 9620 var key_1 = _convertDartToNative_IDBKey(key); | 9719 var key_1 = _convertDartToNative_IDBKey(key); |
| 9621 return _getKey_2(key_1); | 9720 return _getKey_2(key_1); |
| 9622 } | 9721 } |
| 9623 throw new ArgumentError("Incorrect number or type of arguments"); | 9722 throw new ArgumentError("Incorrect number or type of arguments"); |
| 9624 } | 9723 } |
| 9625 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue @Creates('IDBObjectStore') | 9724 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue @Creates('IDBObjectStore') |
| 9626 IDBRequest _getKey_1(IDBKeyRange key) native "getKey"; | 9725 IDBRequest _getKey_1(IDBKeyRange key) native "getKey"; |
| 9627 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue @Creates('IDBObjectStore') | 9726 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue @Creates('IDBObjectStore') |
| 9628 IDBRequest _getKey_2(key) native "getKey"; | 9727 IDBRequest _getKey_2(key) native "getKey"; |
| 9629 | 9728 |
| 9630 /// @domName IDBIndex.openCursor; @docsEditable true | 9729 /// @domName IDBIndex.openCursor; @docsEditable true |
| 9631 IDBRequest openCursor([key_OR_range, String direction]) { | 9730 IDBRequest openCursor([key_OR_range, String direction]) { |
| 9632 if (!?key_OR_range && | 9731 if (!?key_OR_range && |
| 9633 !?direction) { | 9732 !?direction) { |
| 9634 return _openCursor_1(); | 9733 return _openCursor_1(); |
| 9635 } | 9734 } |
| 9636 if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))
&& | 9735 if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))
&& |
| 9637 !?direction) { | 9736 !?direction) { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9825 | 9924 |
| 9826 /// @domName IDBObjectStore.name; @docsEditable true | 9925 /// @domName IDBObjectStore.name; @docsEditable true |
| 9827 final String name; | 9926 final String name; |
| 9828 | 9927 |
| 9829 /// @domName IDBObjectStore.transaction; @docsEditable true | 9928 /// @domName IDBObjectStore.transaction; @docsEditable true |
| 9830 final IDBTransaction transaction; | 9929 final IDBTransaction transaction; |
| 9831 | 9930 |
| 9832 /// @domName IDBObjectStore.add; @docsEditable true | 9931 /// @domName IDBObjectStore.add; @docsEditable true |
| 9833 IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) { | 9932 IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) { |
| 9834 if (?key) { | 9933 if (?key) { |
| 9835 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 9934 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 9836 var key_2 = _convertDartToNative_IDBKey(key); | 9935 var key_2 = _convertDartToNative_IDBKey(key); |
| 9837 return _add_1(value_1, key_2); | 9936 return _add_1(value_1, key_2); |
| 9838 } | 9937 } |
| 9839 var value_3 = _convertDartToNative_SerializedScriptValue(value); | 9938 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 9840 return _add_2(value_3); | 9939 return _add_2(value_3); |
| 9841 } | 9940 } |
| 9842 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 9941 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
| 9843 IDBRequest _add_1(value, key) native "add"; | 9942 IDBRequest _add_1(value, key) native "add"; |
| 9844 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 9943 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
| 9845 IDBRequest _add_2(value) native "add"; | 9944 IDBRequest _add_2(value) native "add"; |
| 9846 | 9945 |
| 9847 /// @domName IDBObjectStore.clear; @docsEditable true | 9946 /// @domName IDBObjectStore.clear; @docsEditable true |
| 9848 IDBRequest clear() native; | 9947 IDBRequest clear() native; |
| 9849 | 9948 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 9862 throw new ArgumentError("Incorrect number or type of arguments"); | 9961 throw new ArgumentError("Incorrect number or type of arguments"); |
| 9863 } | 9962 } |
| 9864 IDBRequest _count_1() native "count"; | 9963 IDBRequest _count_1() native "count"; |
| 9865 IDBRequest _count_2(IDBKeyRange range) native "count"; | 9964 IDBRequest _count_2(IDBKeyRange range) native "count"; |
| 9866 IDBRequest _count_3(key) native "count"; | 9965 IDBRequest _count_3(key) native "count"; |
| 9867 | 9966 |
| 9868 /// @domName IDBObjectStore.createIndex; @docsEditable true | 9967 /// @domName IDBObjectStore.createIndex; @docsEditable true |
| 9869 IDBIndex createIndex(String name, keyPath, [Map options]) { | 9968 IDBIndex createIndex(String name, keyPath, [Map options]) { |
| 9870 if ((?keyPath && (keyPath is List<String> || keyPath == null)) && | 9969 if ((?keyPath && (keyPath is List<String> || keyPath == null)) && |
| 9871 !?options) { | 9970 !?options) { |
| 9872 List keyPath_1 = _convertDartToNative_StringArray(keyPath); | 9971 List keyPath_1 = convertDartToNative_StringArray(keyPath); |
| 9873 return _createIndex_1(name, keyPath_1); | 9972 return _createIndex_1(name, keyPath_1); |
| 9874 } | 9973 } |
| 9875 if ((?keyPath && (keyPath is List<String> || keyPath == null))) { | 9974 if ((?keyPath && (keyPath is List<String> || keyPath == null))) { |
| 9876 List keyPath_2 = _convertDartToNative_StringArray(keyPath); | 9975 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
| 9877 var options_3 = _convertDartToNative_Dictionary(options); | 9976 var options_3 = convertDartToNative_Dictionary(options); |
| 9878 return _createIndex_2(name, keyPath_2, options_3); | 9977 return _createIndex_2(name, keyPath_2, options_3); |
| 9879 } | 9978 } |
| 9880 if ((?keyPath && (keyPath is String || keyPath == null)) && | 9979 if ((?keyPath && (keyPath is String || keyPath == null)) && |
| 9881 !?options) { | 9980 !?options) { |
| 9882 return _createIndex_3(name, keyPath); | 9981 return _createIndex_3(name, keyPath); |
| 9883 } | 9982 } |
| 9884 if ((?keyPath && (keyPath is String || keyPath == null))) { | 9983 if ((?keyPath && (keyPath is String || keyPath == null))) { |
| 9885 var options_4 = _convertDartToNative_Dictionary(options); | 9984 var options_4 = convertDartToNative_Dictionary(options); |
| 9886 return _createIndex_4(name, keyPath, options_4); | 9985 return _createIndex_4(name, keyPath, options_4); |
| 9887 } | 9986 } |
| 9888 throw new ArgumentError("Incorrect number or type of arguments"); | 9987 throw new ArgumentError("Incorrect number or type of arguments"); |
| 9889 } | 9988 } |
| 9890 IDBIndex _createIndex_1(name, List keyPath) native "createIndex"; | 9989 IDBIndex _createIndex_1(name, List keyPath) native "createIndex"; |
| 9891 IDBIndex _createIndex_2(name, List keyPath, options) native "createIndex"; | 9990 IDBIndex _createIndex_2(name, List keyPath, options) native "createIndex"; |
| 9892 IDBIndex _createIndex_3(name, String keyPath) native "createIndex"; | 9991 IDBIndex _createIndex_3(name, String keyPath) native "createIndex"; |
| 9893 IDBIndex _createIndex_4(name, String keyPath, options) native "createIndex"; | 9992 IDBIndex _createIndex_4(name, String keyPath, options) native "createIndex"; |
| 9894 | 9993 |
| 9895 /// @domName IDBObjectStore.delete; @docsEditable true | 9994 /// @domName IDBObjectStore.delete; @docsEditable true |
| (...skipping 17 matching lines...) Expand all Loading... |
| 9913 IDBRequest getObject(key) { | 10012 IDBRequest getObject(key) { |
| 9914 if ((?key && (key is IDBKeyRange || key == null))) { | 10013 if ((?key && (key is IDBKeyRange || key == null))) { |
| 9915 return _getObject_1(key); | 10014 return _getObject_1(key); |
| 9916 } | 10015 } |
| 9917 if (?key) { | 10016 if (?key) { |
| 9918 var key_1 = _convertDartToNative_IDBKey(key); | 10017 var key_1 = _convertDartToNative_IDBKey(key); |
| 9919 return _getObject_2(key_1); | 10018 return _getObject_2(key_1); |
| 9920 } | 10019 } |
| 9921 throw new ArgumentError("Incorrect number or type of arguments"); | 10020 throw new ArgumentError("Incorrect number or type of arguments"); |
| 9922 } | 10021 } |
| 9923 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10022 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
| 9924 IDBRequest _getObject_1(IDBKeyRange key) native "get"; | 10023 IDBRequest _getObject_1(IDBKeyRange key) native "get"; |
| 9925 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_SerializedS
criptValue | 10024 @Returns('IDBRequest') @Creates('IDBRequest') @annotation_Creates_SerializedSc
riptValue |
| 9926 IDBRequest _getObject_2(key) native "get"; | 10025 IDBRequest _getObject_2(key) native "get"; |
| 9927 | 10026 |
| 9928 /// @domName IDBObjectStore.index; @docsEditable true | 10027 /// @domName IDBObjectStore.index; @docsEditable true |
| 9929 IDBIndex index(String name) native; | 10028 IDBIndex index(String name) native; |
| 9930 | 10029 |
| 9931 /// @domName IDBObjectStore.openCursor; @docsEditable true | 10030 /// @domName IDBObjectStore.openCursor; @docsEditable true |
| 9932 IDBRequest openCursor([key_OR_range, String direction]) { | 10031 IDBRequest openCursor([key_OR_range, String direction]) { |
| 9933 if (!?key_OR_range && | 10032 if (!?key_OR_range && |
| 9934 !?direction) { | 10033 !?direction) { |
| 9935 return _openCursor_1(); | 10034 return _openCursor_1(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 9959 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10058 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
| 9960 IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor"; | 10059 IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor"; |
| 9961 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10060 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
| 9962 IDBRequest _openCursor_4(key) native "openCursor"; | 10061 IDBRequest _openCursor_4(key) native "openCursor"; |
| 9963 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') | 10062 @Returns('IDBRequest') @Creates('IDBRequest') @Creates('IDBCursor') |
| 9964 IDBRequest _openCursor_5(key, direction) native "openCursor"; | 10063 IDBRequest _openCursor_5(key, direction) native "openCursor"; |
| 9965 | 10064 |
| 9966 /// @domName IDBObjectStore.put; @docsEditable true | 10065 /// @domName IDBObjectStore.put; @docsEditable true |
| 9967 IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) { | 10066 IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) { |
| 9968 if (?key) { | 10067 if (?key) { |
| 9969 var value_1 = _convertDartToNative_SerializedScriptValue(value); | 10068 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 9970 var key_2 = _convertDartToNative_IDBKey(key); | 10069 var key_2 = _convertDartToNative_IDBKey(key); |
| 9971 return _put_1(value_1, key_2); | 10070 return _put_1(value_1, key_2); |
| 9972 } | 10071 } |
| 9973 var value_3 = _convertDartToNative_SerializedScriptValue(value); | 10072 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 9974 return _put_2(value_3); | 10073 return _put_2(value_3); |
| 9975 } | 10074 } |
| 9976 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10075 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
| 9977 IDBRequest _put_1(value, key) native "put"; | 10076 IDBRequest _put_1(value, key) native "put"; |
| 9978 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey | 10077 @Returns('IDBRequest') @Creates('IDBRequest') @_annotation_Creates_IDBKey |
| 9979 IDBRequest _put_2(value) native "put"; | 10078 IDBRequest _put_2(value) native "put"; |
| 9980 } | 10079 } |
| 9981 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10080 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9982 // for details. All rights reserved. Use of this source code is governed by a | 10081 // for details. All rights reserved. Use of this source code is governed by a |
| 9983 // BSD-style license that can be found in the LICENSE file. | 10082 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10351 /// @domName HTMLInputElement.defaultValue; @docsEditable true | 10450 /// @domName HTMLInputElement.defaultValue; @docsEditable true |
| 10352 String defaultValue; | 10451 String defaultValue; |
| 10353 | 10452 |
| 10354 /// @domName HTMLInputElement.dirName; @docsEditable true | 10453 /// @domName HTMLInputElement.dirName; @docsEditable true |
| 10355 String dirName; | 10454 String dirName; |
| 10356 | 10455 |
| 10357 /// @domName HTMLInputElement.disabled; @docsEditable true | 10456 /// @domName HTMLInputElement.disabled; @docsEditable true |
| 10358 bool disabled; | 10457 bool disabled; |
| 10359 | 10458 |
| 10360 /// @domName HTMLInputElement.files; @docsEditable true | 10459 /// @domName HTMLInputElement.files; @docsEditable true |
| 10361 @Returns('_FileList') @Creates('_FileList') | 10460 FileList files; |
| 10362 List<File> files; | |
| 10363 | 10461 |
| 10364 /// @domName HTMLInputElement.form; @docsEditable true | 10462 /// @domName HTMLInputElement.form; @docsEditable true |
| 10365 final FormElement form; | 10463 final FormElement form; |
| 10366 | 10464 |
| 10367 /// @domName HTMLInputElement.formAction; @docsEditable true | 10465 /// @domName HTMLInputElement.formAction; @docsEditable true |
| 10368 String formAction; | 10466 String formAction; |
| 10369 | 10467 |
| 10370 /// @domName HTMLInputElement.formEnctype; @docsEditable true | 10468 /// @domName HTMLInputElement.formEnctype; @docsEditable true |
| 10371 String formEnctype; | 10469 String formEnctype; |
| 10372 | 10470 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10550 } | 10648 } |
| 10551 | 10649 |
| 10552 void addLast(int value) { | 10650 void addLast(int value) { |
| 10553 throw new UnsupportedError("Cannot add to immutable List."); | 10651 throw new UnsupportedError("Cannot add to immutable List."); |
| 10554 } | 10652 } |
| 10555 | 10653 |
| 10556 void addAll(Collection<int> collection) { | 10654 void addAll(Collection<int> collection) { |
| 10557 throw new UnsupportedError("Cannot add to immutable List."); | 10655 throw new UnsupportedError("Cannot add to immutable List."); |
| 10558 } | 10656 } |
| 10559 | 10657 |
| 10560 bool contains(int element) => _Collections.contains(this, element); | 10658 bool contains(int element) => Collections.contains(this, element); |
| 10561 | 10659 |
| 10562 void forEach(void f(int element)) => _Collections.forEach(this, f); | 10660 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 10563 | 10661 |
| 10564 Collection map(f(int element)) => _Collections.map(this, [], f); | 10662 Collection map(f(int element)) => Collections.map(this, [], f); |
| 10565 | 10663 |
| 10566 Collection<int> filter(bool f(int element)) => | 10664 Collection<int> filter(bool f(int element)) => |
| 10567 _Collections.filter(this, <int>[], f); | 10665 Collections.filter(this, <int>[], f); |
| 10568 | 10666 |
| 10569 bool every(bool f(int element)) => _Collections.every(this, f); | 10667 bool every(bool f(int element)) => Collections.every(this, f); |
| 10570 | 10668 |
| 10571 bool some(bool f(int element)) => _Collections.some(this, f); | 10669 bool some(bool f(int element)) => Collections.some(this, f); |
| 10572 | 10670 |
| 10573 bool get isEmpty => this.length == 0; | 10671 bool get isEmpty => this.length == 0; |
| 10574 | 10672 |
| 10575 // From List<int>: | 10673 // From List<int>: |
| 10576 | 10674 |
| 10577 void sort([Comparator<int> compare = Comparable.compare]) { | 10675 void sort([Comparator<int> compare = Comparable.compare]) { |
| 10578 throw new UnsupportedError("Cannot sort immutable List."); | 10676 throw new UnsupportedError("Cannot sort immutable List."); |
| 10579 } | 10677 } |
| 10580 | 10678 |
| 10581 int indexOf(int element, [int start = 0]) => | 10679 int indexOf(int element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10660 } | 10758 } |
| 10661 | 10759 |
| 10662 void addLast(int value) { | 10760 void addLast(int value) { |
| 10663 throw new UnsupportedError("Cannot add to immutable List."); | 10761 throw new UnsupportedError("Cannot add to immutable List."); |
| 10664 } | 10762 } |
| 10665 | 10763 |
| 10666 void addAll(Collection<int> collection) { | 10764 void addAll(Collection<int> collection) { |
| 10667 throw new UnsupportedError("Cannot add to immutable List."); | 10765 throw new UnsupportedError("Cannot add to immutable List."); |
| 10668 } | 10766 } |
| 10669 | 10767 |
| 10670 bool contains(int element) => _Collections.contains(this, element); | 10768 bool contains(int element) => Collections.contains(this, element); |
| 10671 | 10769 |
| 10672 void forEach(void f(int element)) => _Collections.forEach(this, f); | 10770 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 10673 | 10771 |
| 10674 Collection map(f(int element)) => _Collections.map(this, [], f); | 10772 Collection map(f(int element)) => Collections.map(this, [], f); |
| 10675 | 10773 |
| 10676 Collection<int> filter(bool f(int element)) => | 10774 Collection<int> filter(bool f(int element)) => |
| 10677 _Collections.filter(this, <int>[], f); | 10775 Collections.filter(this, <int>[], f); |
| 10678 | 10776 |
| 10679 bool every(bool f(int element)) => _Collections.every(this, f); | 10777 bool every(bool f(int element)) => Collections.every(this, f); |
| 10680 | 10778 |
| 10681 bool some(bool f(int element)) => _Collections.some(this, f); | 10779 bool some(bool f(int element)) => Collections.some(this, f); |
| 10682 | 10780 |
| 10683 bool get isEmpty => this.length == 0; | 10781 bool get isEmpty => this.length == 0; |
| 10684 | 10782 |
| 10685 // From List<int>: | 10783 // From List<int>: |
| 10686 | 10784 |
| 10687 void sort([Comparator<int> compare = Comparable.compare]) { | 10785 void sort([Comparator<int> compare = Comparable.compare]) { |
| 10688 throw new UnsupportedError("Cannot sort immutable List."); | 10786 throw new UnsupportedError("Cannot sort immutable List."); |
| 10689 } | 10787 } |
| 10690 | 10788 |
| 10691 int indexOf(int element, [int start = 0]) => | 10789 int indexOf(int element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10770 } | 10868 } |
| 10771 | 10869 |
| 10772 void addLast(int value) { | 10870 void addLast(int value) { |
| 10773 throw new UnsupportedError("Cannot add to immutable List."); | 10871 throw new UnsupportedError("Cannot add to immutable List."); |
| 10774 } | 10872 } |
| 10775 | 10873 |
| 10776 void addAll(Collection<int> collection) { | 10874 void addAll(Collection<int> collection) { |
| 10777 throw new UnsupportedError("Cannot add to immutable List."); | 10875 throw new UnsupportedError("Cannot add to immutable List."); |
| 10778 } | 10876 } |
| 10779 | 10877 |
| 10780 bool contains(int element) => _Collections.contains(this, element); | 10878 bool contains(int element) => Collections.contains(this, element); |
| 10781 | 10879 |
| 10782 void forEach(void f(int element)) => _Collections.forEach(this, f); | 10880 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 10783 | 10881 |
| 10784 Collection map(f(int element)) => _Collections.map(this, [], f); | 10882 Collection map(f(int element)) => Collections.map(this, [], f); |
| 10785 | 10883 |
| 10786 Collection<int> filter(bool f(int element)) => | 10884 Collection<int> filter(bool f(int element)) => |
| 10787 _Collections.filter(this, <int>[], f); | 10885 Collections.filter(this, <int>[], f); |
| 10788 | 10886 |
| 10789 bool every(bool f(int element)) => _Collections.every(this, f); | 10887 bool every(bool f(int element)) => Collections.every(this, f); |
| 10790 | 10888 |
| 10791 bool some(bool f(int element)) => _Collections.some(this, f); | 10889 bool some(bool f(int element)) => Collections.some(this, f); |
| 10792 | 10890 |
| 10793 bool get isEmpty => this.length == 0; | 10891 bool get isEmpty => this.length == 0; |
| 10794 | 10892 |
| 10795 // From List<int>: | 10893 // From List<int>: |
| 10796 | 10894 |
| 10797 void sort([Comparator<int> compare = Comparable.compare]) { | 10895 void sort([Comparator<int> compare = Comparable.compare]) { |
| 10798 throw new UnsupportedError("Cannot sort immutable List."); | 10896 throw new UnsupportedError("Cannot sort immutable List."); |
| 10799 } | 10897 } |
| 10800 | 10898 |
| 10801 int indexOf(int element, [int start = 0]) => | 10899 int indexOf(int element, [int start = 0]) => |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11174 if (options == null) { | 11272 if (options == null) { |
| 11175 return _DOMWindowCrossFrame._createSafe(_open2(url, name)); | 11273 return _DOMWindowCrossFrame._createSafe(_open2(url, name)); |
| 11176 } else { | 11274 } else { |
| 11177 return _DOMWindowCrossFrame._createSafe(_open3(url, name, options)); | 11275 return _DOMWindowCrossFrame._createSafe(_open3(url, name, options)); |
| 11178 } | 11276 } |
| 11179 } | 11277 } |
| 11180 | 11278 |
| 11181 // API level getter and setter for Location. | 11279 // API level getter and setter for Location. |
| 11182 // TODO: The cross domain safe wrapper can be inserted here or folded into | 11280 // TODO: The cross domain safe wrapper can be inserted here or folded into |
| 11183 // _LocationWrapper. | 11281 // _LocationWrapper. |
| 11184 LocalLocation get location() { | 11282 LocalLocation get location { |
| 11185 // Firefox work-around for Location. The Firefox location object cannot be | 11283 // Firefox work-around for Location. The Firefox location object cannot be |
| 11186 // made to behave like a Dart object so must be wrapped. | 11284 // made to behave like a Dart object so must be wrapped. |
| 11187 var result = _location; | 11285 var result = _location; |
| 11188 if (_isDartLocation(result)) return result; // e.g. on Chrome. | 11286 if (_isDartLocation(result)) return result; // e.g. on Chrome. |
| 11189 if (null == _location_wrapper) { | 11287 if (null == _location_wrapper) { |
| 11190 _location_wrapper = new _LocationWrapper(result); | 11288 _location_wrapper = new _LocationWrapper(result); |
| 11191 } | 11289 } |
| 11192 return _location_wrapper; | 11290 return _location_wrapper; |
| 11193 } | 11291 } |
| 11194 | 11292 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11271 $this.requestAnimationFrame = function(callback) { | 11369 $this.requestAnimationFrame = function(callback) { |
| 11272 return window.setTimeout(function() { | 11370 return window.setTimeout(function() { |
| 11273 callback(Date.now()); | 11371 callback(Date.now()); |
| 11274 }, 16 /* 16ms ~= 60fps */); | 11372 }, 16 /* 16ms ~= 60fps */); |
| 11275 }; | 11373 }; |
| 11276 $this.cancelAnimationFrame = function(id) { clearTimeout(id); } | 11374 $this.cancelAnimationFrame = function(id) { clearTimeout(id); } |
| 11277 })(#)""", | 11375 })(#)""", |
| 11278 this); | 11376 this); |
| 11279 } | 11377 } |
| 11280 | 11378 |
| 11281 IDBFactory get indexedDB() => | 11379 IDBFactory get indexedDB => |
| 11282 JS('IDBFactory', | 11380 JS('IDBFactory', |
| 11283 '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB', | 11381 '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB', |
| 11284 this, this, this); | 11382 this, this, this); |
| 11285 | 11383 |
| 11286 /** | 11384 /** |
| 11287 * Lookup a port by its [name]. Return null if no port is | 11385 * Lookup a port by its [name]. Return null if no port is |
| 11288 * registered under [name]. | 11386 * registered under [name]. |
| 11289 */ | 11387 */ |
| 11290 SendPortSync lookupPort(String name) { | 11388 SendPortSync lookupPort(String name) { |
| 11291 var port = JSON.parse(document.documentElement.attributes['dart-port:$name']
); | 11389 var port = JSON.parse(document.documentElement.attributes['dart-port:$name']
); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11504 void moveTo(num x, num y) native; | 11602 void moveTo(num x, num y) native; |
| 11505 | 11603 |
| 11506 /// @domName DOMWindow.openDatabase; @docsEditable true | 11604 /// @domName DOMWindow.openDatabase; @docsEditable true |
| 11507 @Creates('Database') @Creates('DatabaseSync') | 11605 @Creates('Database') @Creates('DatabaseSync') |
| 11508 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]) native; | 11606 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]) native; |
| 11509 | 11607 |
| 11510 /// @domName Window.postMessage; @docsEditable true | 11608 /// @domName Window.postMessage; @docsEditable true |
| 11511 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) { | 11609 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) { |
| 11512 if (?message && | 11610 if (?message && |
| 11513 !?messagePorts) { | 11611 !?messagePorts) { |
| 11514 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 11612 var message_1 = convertDartToNative_SerializedScriptValue(message); |
| 11515 _postMessage_1(message_1, targetOrigin); | 11613 _postMessage_1(message_1, targetOrigin); |
| 11516 return; | 11614 return; |
| 11517 } | 11615 } |
| 11518 if (?message) { | 11616 if (?message) { |
| 11519 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 11617 var message_2 = convertDartToNative_SerializedScriptValue(message); |
| 11520 _postMessage_2(message_2, targetOrigin, messagePorts); | 11618 _postMessage_2(message_2, targetOrigin, messagePorts); |
| 11521 return; | 11619 return; |
| 11522 } | 11620 } |
| 11523 throw new ArgumentError("Incorrect number or type of arguments"); | 11621 throw new ArgumentError("Incorrect number or type of arguments"); |
| 11524 } | 11622 } |
| 11525 void _postMessage_1(message, targetOrigin) native "postMessage"; | 11623 void _postMessage_1(message, targetOrigin) native "postMessage"; |
| 11526 void _postMessage_2(message, targetOrigin, List messagePorts) native "postMess
age"; | 11624 void _postMessage_2(message, targetOrigin, List messagePorts) native "postMess
age"; |
| 11527 | 11625 |
| 11528 /// @domName Window.print; @docsEditable true | 11626 /// @domName Window.print; @docsEditable true |
| 11529 void print() native; | 11627 void print() native; |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12425 } | 12523 } |
| 12426 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12524 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 12427 // for details. All rights reserved. Use of this source code is governed by a | 12525 // for details. All rights reserved. Use of this source code is governed by a |
| 12428 // BSD-style license that can be found in the LICENSE file. | 12526 // BSD-style license that can be found in the LICENSE file. |
| 12429 | 12527 |
| 12430 | 12528 |
| 12431 /// @domName MessageEvent; @docsEditable true | 12529 /// @domName MessageEvent; @docsEditable true |
| 12432 class MessageEvent extends Event native "*MessageEvent" { | 12530 class MessageEvent extends Event native "*MessageEvent" { |
| 12433 | 12531 |
| 12434 /// @domName MessageEvent.data; @docsEditable true | 12532 /// @domName MessageEvent.data; @docsEditable true |
| 12435 dynamic get data => _convertNativeToDart_SerializedScriptValue(this._data); | 12533 dynamic get data => convertNativeToDart_SerializedScriptValue(this._data); |
| 12436 dynamic get _data => JS("dynamic", "#.data", this); | 12534 dynamic get _data => JS("dynamic", "#.data", this); |
| 12437 | 12535 |
| 12438 /// @domName MessageEvent.lastEventId; @docsEditable true | 12536 /// @domName MessageEvent.lastEventId; @docsEditable true |
| 12439 final String lastEventId; | 12537 final String lastEventId; |
| 12440 | 12538 |
| 12441 /// @domName MessageEvent.origin; @docsEditable true | 12539 /// @domName MessageEvent.origin; @docsEditable true |
| 12442 final String origin; | 12540 final String origin; |
| 12443 | 12541 |
| 12444 /// @domName MessageEvent.ports; @docsEditable true | 12542 /// @domName MessageEvent.ports; @docsEditable true |
| 12445 @Creates('=List') | 12543 @Creates('=List') |
| (...skipping 26 matching lines...) Expand all Loading... |
| 12472 | 12570 |
| 12473 /// @domName MessagePort.close; @docsEditable true | 12571 /// @domName MessagePort.close; @docsEditable true |
| 12474 void close() native; | 12572 void close() native; |
| 12475 | 12573 |
| 12476 /// @domName MessagePort.dispatchEvent; @docsEditable true | 12574 /// @domName MessagePort.dispatchEvent; @docsEditable true |
| 12477 bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; | 12575 bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; |
| 12478 | 12576 |
| 12479 /// @domName MessagePort.postMessage; @docsEditable true | 12577 /// @domName MessagePort.postMessage; @docsEditable true |
| 12480 void postMessage(/*any*/ message, [List messagePorts]) { | 12578 void postMessage(/*any*/ message, [List messagePorts]) { |
| 12481 if (?messagePorts) { | 12579 if (?messagePorts) { |
| 12482 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 12580 var message_1 = convertDartToNative_SerializedScriptValue(message); |
| 12483 _postMessage_1(message_1, messagePorts); | 12581 _postMessage_1(message_1, messagePorts); |
| 12484 return; | 12582 return; |
| 12485 } | 12583 } |
| 12486 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 12584 var message_2 = convertDartToNative_SerializedScriptValue(message); |
| 12487 _postMessage_2(message_2); | 12585 _postMessage_2(message_2); |
| 12488 return; | 12586 return; |
| 12489 } | 12587 } |
| 12490 void _postMessage_1(message, List messagePorts) native "postMessage"; | 12588 void _postMessage_1(message, List messagePorts) native "postMessage"; |
| 12491 void _postMessage_2(message) native "postMessage"; | 12589 void _postMessage_2(message) native "postMessage"; |
| 12492 | 12590 |
| 12493 /// @domName MessagePort.removeEventListener; @docsEditable true | 12591 /// @domName MessagePort.removeEventListener; @docsEditable true |
| 12494 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; | 12592 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; |
| 12495 | 12593 |
| 12496 /// @domName MessagePort.start; @docsEditable true | 12594 /// @domName MessagePort.start; @docsEditable true |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12745 /// @domName MutationObserver | 12843 /// @domName MutationObserver |
| 12746 class MutationObserver native "*MutationObserver" { | 12844 class MutationObserver native "*MutationObserver" { |
| 12747 | 12845 |
| 12748 factory MutationObserver(MutationCallback callback) => _MutationObserverFactor
yProvider.createMutationObserver(callback); | 12846 factory MutationObserver(MutationCallback callback) => _MutationObserverFactor
yProvider.createMutationObserver(callback); |
| 12749 | 12847 |
| 12750 /// @domName MutationObserver.disconnect; @docsEditable true | 12848 /// @domName MutationObserver.disconnect; @docsEditable true |
| 12751 void disconnect() native; | 12849 void disconnect() native; |
| 12752 | 12850 |
| 12753 /// @domName MutationObserver._observe; @docsEditable true | 12851 /// @domName MutationObserver._observe; @docsEditable true |
| 12754 void _observe(Node target, Map options) { | 12852 void _observe(Node target, Map options) { |
| 12755 var options_1 = _convertDartToNative_Dictionary(options); | 12853 var options_1 = convertDartToNative_Dictionary(options); |
| 12756 __observe_1(target, options_1); | 12854 __observe_1(target, options_1); |
| 12757 return; | 12855 return; |
| 12758 } | 12856 } |
| 12759 void __observe_1(Node target, options) native "observe"; | 12857 void __observe_1(Node target, options) native "observe"; |
| 12760 | 12858 |
| 12761 /// @domName MutationObserver.takeRecords; @docsEditable true | 12859 /// @domName MutationObserver.takeRecords; @docsEditable true |
| 12762 List<MutationRecord> takeRecords() native; | 12860 List<MutationRecord> takeRecords() native; |
| 12763 | 12861 |
| 12764 void observe(Node target, | 12862 void observe(Node target, |
| 12765 {Map options, | 12863 {Map options, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12894 } | 12992 } |
| 12895 | 12993 |
| 12896 void addLast(Node value) { | 12994 void addLast(Node value) { |
| 12897 throw new UnsupportedError("Cannot add to immutable List."); | 12995 throw new UnsupportedError("Cannot add to immutable List."); |
| 12898 } | 12996 } |
| 12899 | 12997 |
| 12900 void addAll(Collection<Node> collection) { | 12998 void addAll(Collection<Node> collection) { |
| 12901 throw new UnsupportedError("Cannot add to immutable List."); | 12999 throw new UnsupportedError("Cannot add to immutable List."); |
| 12902 } | 13000 } |
| 12903 | 13001 |
| 12904 bool contains(Node element) => _Collections.contains(this, element); | 13002 bool contains(Node element) => Collections.contains(this, element); |
| 12905 | 13003 |
| 12906 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 13004 void forEach(void f(Node element)) => Collections.forEach(this, f); |
| 12907 | 13005 |
| 12908 Collection map(f(Node element)) => _Collections.map(this, [], f); | 13006 Collection map(f(Node element)) => Collections.map(this, [], f); |
| 12909 | 13007 |
| 12910 Collection<Node> filter(bool f(Node element)) => | 13008 Collection<Node> filter(bool f(Node element)) => |
| 12911 _Collections.filter(this, <Node>[], f); | 13009 Collections.filter(this, <Node>[], f); |
| 12912 | 13010 |
| 12913 bool every(bool f(Node element)) => _Collections.every(this, f); | 13011 bool every(bool f(Node element)) => Collections.every(this, f); |
| 12914 | 13012 |
| 12915 bool some(bool f(Node element)) => _Collections.some(this, f); | 13013 bool some(bool f(Node element)) => Collections.some(this, f); |
| 12916 | 13014 |
| 12917 bool get isEmpty => this.length == 0; | 13015 bool get isEmpty => this.length == 0; |
| 12918 | 13016 |
| 12919 // From List<Node>: | 13017 // From List<Node>: |
| 12920 | 13018 |
| 12921 void sort([Comparator<Node> compare = Comparable.compare]) { | 13019 void sort([Comparator<Node> compare = Comparable.compare]) { |
| 12922 throw new UnsupportedError("Cannot sort immutable List."); | 13020 throw new UnsupportedError("Cannot sort immutable List."); |
| 12923 } | 13021 } |
| 12924 | 13022 |
| 12925 int indexOf(Node element, [int start = 0]) => | 13023 int indexOf(Node element, [int start = 0]) => |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13038 /// @domName Navigator.javaEnabled; @docsEditable true | 13136 /// @domName Navigator.javaEnabled; @docsEditable true |
| 13039 bool javaEnabled() native; | 13137 bool javaEnabled() native; |
| 13040 | 13138 |
| 13041 /// @domName Navigator.webkitGetGamepads; @docsEditable true | 13139 /// @domName Navigator.webkitGetGamepads; @docsEditable true |
| 13042 @Returns('_GamepadList') @Creates('_GamepadList') | 13140 @Returns('_GamepadList') @Creates('_GamepadList') |
| 13043 List<Gamepad> webkitGetGamepads() native; | 13141 List<Gamepad> webkitGetGamepads() native; |
| 13044 | 13142 |
| 13045 /// @domName Navigator.webkitGetUserMedia; @docsEditable true | 13143 /// @domName Navigator.webkitGetUserMedia; @docsEditable true |
| 13046 void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback success
Callback, [NavigatorUserMediaErrorCallback errorCallback]) { | 13144 void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback success
Callback, [NavigatorUserMediaErrorCallback errorCallback]) { |
| 13047 if (?errorCallback) { | 13145 if (?errorCallback) { |
| 13048 var options_1 = _convertDartToNative_Dictionary(options); | 13146 var options_1 = convertDartToNative_Dictionary(options); |
| 13049 _webkitGetUserMedia_1(options_1, successCallback, errorCallback); | 13147 _webkitGetUserMedia_1(options_1, successCallback, errorCallback); |
| 13050 return; | 13148 return; |
| 13051 } | 13149 } |
| 13052 var options_2 = _convertDartToNative_Dictionary(options); | 13150 var options_2 = convertDartToNative_Dictionary(options); |
| 13053 _webkitGetUserMedia_2(options_2, successCallback); | 13151 _webkitGetUserMedia_2(options_2, successCallback); |
| 13054 return; | 13152 return; |
| 13055 } | 13153 } |
| 13056 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC
allback, NavigatorUserMediaErrorCallback errorCallback) native "webkitGetUserMed
ia"; | 13154 void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successC
allback, NavigatorUserMediaErrorCallback errorCallback) native "webkitGetUserMed
ia"; |
| 13057 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC
allback) native "webkitGetUserMedia"; | 13155 void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successC
allback) native "webkitGetUserMedia"; |
| 13058 } | 13156 } |
| 13059 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 13157 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 13060 // for details. All rights reserved. Use of this source code is governed by a | 13158 // for details. All rights reserved. Use of this source code is governed by a |
| 13061 // BSD-style license that can be found in the LICENSE file. | 13159 // BSD-style license that can be found in the LICENSE file. |
| 13062 | 13160 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13132 } | 13230 } |
| 13133 | 13231 |
| 13134 void operator []=(int index, Node value) { | 13232 void operator []=(int index, Node value) { |
| 13135 _this.$dom_replaceChild(value, this[index]); | 13233 _this.$dom_replaceChild(value, this[index]); |
| 13136 } | 13234 } |
| 13137 | 13235 |
| 13138 Iterator<Node> iterator() => _this.$dom_childNodes.iterator(); | 13236 Iterator<Node> iterator() => _this.$dom_childNodes.iterator(); |
| 13139 | 13237 |
| 13140 // TODO(jacobr): We can implement these methods much more efficiently by | 13238 // TODO(jacobr): We can implement these methods much more efficiently by |
| 13141 // looking up the nodeList only once instead of once per iteration. | 13239 // looking up the nodeList only once instead of once per iteration. |
| 13142 bool contains(Node element) => _Collections.contains(this, element); | 13240 bool contains(Node element) => Collections.contains(this, element); |
| 13143 | 13241 |
| 13144 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 13242 void forEach(void f(Node element)) => Collections.forEach(this, f); |
| 13145 | 13243 |
| 13146 Collection map(f(Node element)) => _Collections.map(this, [], f); | 13244 Collection map(f(Node element)) => Collections.map(this, [], f); |
| 13147 | 13245 |
| 13148 Collection<Node> filter(bool f(Node element)) => | 13246 Collection<Node> filter(bool f(Node element)) => |
| 13149 _Collections.filter(this, <Node>[], f); | 13247 Collections.filter(this, <Node>[], f); |
| 13150 | 13248 |
| 13151 bool every(bool f(Node element)) => _Collections.every(this, f); | 13249 bool every(bool f(Node element)) => Collections.every(this, f); |
| 13152 | 13250 |
| 13153 bool some(bool f(Node element)) => _Collections.some(this, f); | 13251 bool some(bool f(Node element)) => Collections.some(this, f); |
| 13154 | 13252 |
| 13155 bool get isEmpty => this.length == 0; | 13253 bool get isEmpty => this.length == 0; |
| 13156 | 13254 |
| 13157 // From List<Node>: | 13255 // From List<Node>: |
| 13158 | 13256 |
| 13159 // TODO(jacobr): this could be implemented for child node lists. | 13257 // TODO(jacobr): this could be implemented for child node lists. |
| 13160 // The exception we throw here is misleading. | 13258 // The exception we throw here is misleading. |
| 13161 void sort([Comparator<Node> compare = Comparable.compare]) { | 13259 void sort([Comparator<Node> compare = Comparable.compare]) { |
| 13162 throw new UnsupportedError("Cannot sort immutable List."); | 13260 throw new UnsupportedError("Cannot sort immutable List."); |
| 13163 } | 13261 } |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13929 /// @domName PeerConnection00.remoteStreams; @docsEditable true | 14027 /// @domName PeerConnection00.remoteStreams; @docsEditable true |
| 13930 @Returns('_MediaStreamList') @Creates('_MediaStreamList') | 14028 @Returns('_MediaStreamList') @Creates('_MediaStreamList') |
| 13931 final List<MediaStream> remoteStreams; | 14029 final List<MediaStream> remoteStreams; |
| 13932 | 14030 |
| 13933 /// @domName PeerConnection00.addEventListener; @docsEditable true | 14031 /// @domName PeerConnection00.addEventListener; @docsEditable true |
| 13934 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 14032 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
| 13935 | 14033 |
| 13936 /// @domName PeerConnection00.addStream; @docsEditable true | 14034 /// @domName PeerConnection00.addStream; @docsEditable true |
| 13937 void addStream(MediaStream stream, [Map mediaStreamHints]) { | 14035 void addStream(MediaStream stream, [Map mediaStreamHints]) { |
| 13938 if (?mediaStreamHints) { | 14036 if (?mediaStreamHints) { |
| 13939 var mediaStreamHints_1 = _convertDartToNative_Dictionary(mediaStreamHints)
; | 14037 var mediaStreamHints_1 = convertDartToNative_Dictionary(mediaStreamHints); |
| 13940 _addStream_1(stream, mediaStreamHints_1); | 14038 _addStream_1(stream, mediaStreamHints_1); |
| 13941 return; | 14039 return; |
| 13942 } | 14040 } |
| 13943 _addStream_2(stream); | 14041 _addStream_2(stream); |
| 13944 return; | 14042 return; |
| 13945 } | 14043 } |
| 13946 void _addStream_1(MediaStream stream, mediaStreamHints) native "addStream"; | 14044 void _addStream_1(MediaStream stream, mediaStreamHints) native "addStream"; |
| 13947 void _addStream_2(MediaStream stream) native "addStream"; | 14045 void _addStream_2(MediaStream stream) native "addStream"; |
| 13948 | 14046 |
| 13949 /// @domName PeerConnection00.close; @docsEditable true | 14047 /// @domName PeerConnection00.close; @docsEditable true |
| 13950 void close() native; | 14048 void close() native; |
| 13951 | 14049 |
| 13952 /// @domName PeerConnection00.createAnswer; @docsEditable true | 14050 /// @domName PeerConnection00.createAnswer; @docsEditable true |
| 13953 SessionDescription createAnswer(String offer, [Map mediaHints]) { | 14051 SessionDescription createAnswer(String offer, [Map mediaHints]) { |
| 13954 if (?mediaHints) { | 14052 if (?mediaHints) { |
| 13955 var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints); | 14053 var mediaHints_1 = convertDartToNative_Dictionary(mediaHints); |
| 13956 return _createAnswer_1(offer, mediaHints_1); | 14054 return _createAnswer_1(offer, mediaHints_1); |
| 13957 } | 14055 } |
| 13958 return _createAnswer_2(offer); | 14056 return _createAnswer_2(offer); |
| 13959 } | 14057 } |
| 13960 SessionDescription _createAnswer_1(offer, mediaHints) native "createAnswer"; | 14058 SessionDescription _createAnswer_1(offer, mediaHints) native "createAnswer"; |
| 13961 SessionDescription _createAnswer_2(offer) native "createAnswer"; | 14059 SessionDescription _createAnswer_2(offer) native "createAnswer"; |
| 13962 | 14060 |
| 13963 /// @domName PeerConnection00.createOffer; @docsEditable true | 14061 /// @domName PeerConnection00.createOffer; @docsEditable true |
| 13964 SessionDescription createOffer([Map mediaHints]) { | 14062 SessionDescription createOffer([Map mediaHints]) { |
| 13965 if (?mediaHints) { | 14063 if (?mediaHints) { |
| 13966 var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints); | 14064 var mediaHints_1 = convertDartToNative_Dictionary(mediaHints); |
| 13967 return _createOffer_1(mediaHints_1); | 14065 return _createOffer_1(mediaHints_1); |
| 13968 } | 14066 } |
| 13969 return _createOffer_2(); | 14067 return _createOffer_2(); |
| 13970 } | 14068 } |
| 13971 SessionDescription _createOffer_1(mediaHints) native "createOffer"; | 14069 SessionDescription _createOffer_1(mediaHints) native "createOffer"; |
| 13972 SessionDescription _createOffer_2() native "createOffer"; | 14070 SessionDescription _createOffer_2() native "createOffer"; |
| 13973 | 14071 |
| 13974 /// @domName PeerConnection00.dispatchEvent; @docsEditable true | 14072 /// @domName PeerConnection00.dispatchEvent; @docsEditable true |
| 13975 bool $dom_dispatchEvent(Event event) native "dispatchEvent"; | 14073 bool $dom_dispatchEvent(Event event) native "dispatchEvent"; |
| 13976 | 14074 |
| 13977 /// @domName PeerConnection00.processIceMessage; @docsEditable true | 14075 /// @domName PeerConnection00.processIceMessage; @docsEditable true |
| 13978 void processIceMessage(IceCandidate candidate) native; | 14076 void processIceMessage(IceCandidate candidate) native; |
| 13979 | 14077 |
| 13980 /// @domName PeerConnection00.removeEventListener; @docsEditable true | 14078 /// @domName PeerConnection00.removeEventListener; @docsEditable true |
| 13981 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; | 14079 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "removeEventListener"; |
| 13982 | 14080 |
| 13983 /// @domName PeerConnection00.removeStream; @docsEditable true | 14081 /// @domName PeerConnection00.removeStream; @docsEditable true |
| 13984 void removeStream(MediaStream stream) native; | 14082 void removeStream(MediaStream stream) native; |
| 13985 | 14083 |
| 13986 /// @domName PeerConnection00.setLocalDescription; @docsEditable true | 14084 /// @domName PeerConnection00.setLocalDescription; @docsEditable true |
| 13987 void setLocalDescription(int action, SessionDescription desc) native; | 14085 void setLocalDescription(int action, SessionDescription desc) native; |
| 13988 | 14086 |
| 13989 /// @domName PeerConnection00.setRemoteDescription; @docsEditable true | 14087 /// @domName PeerConnection00.setRemoteDescription; @docsEditable true |
| 13990 void setRemoteDescription(int action, SessionDescription desc) native; | 14088 void setRemoteDescription(int action, SessionDescription desc) native; |
| 13991 | 14089 |
| 13992 /// @domName PeerConnection00.startIce; @docsEditable true | 14090 /// @domName PeerConnection00.startIce; @docsEditable true |
| 13993 void startIce([Map iceOptions]) { | 14091 void startIce([Map iceOptions]) { |
| 13994 if (?iceOptions) { | 14092 if (?iceOptions) { |
| 13995 var iceOptions_1 = _convertDartToNative_Dictionary(iceOptions); | 14093 var iceOptions_1 = convertDartToNative_Dictionary(iceOptions); |
| 13996 _startIce_1(iceOptions_1); | 14094 _startIce_1(iceOptions_1); |
| 13997 return; | 14095 return; |
| 13998 } | 14096 } |
| 13999 _startIce_2(); | 14097 _startIce_2(); |
| 14000 return; | 14098 return; |
| 14001 } | 14099 } |
| 14002 void _startIce_1(iceOptions) native "startIce"; | 14100 void _startIce_1(iceOptions) native "startIce"; |
| 14003 void _startIce_2() native "startIce"; | 14101 void _startIce_2() native "startIce"; |
| 14004 } | 14102 } |
| 14005 | 14103 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14149 } | 14247 } |
| 14150 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14248 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14151 // for details. All rights reserved. Use of this source code is governed by a | 14249 // for details. All rights reserved. Use of this source code is governed by a |
| 14152 // BSD-style license that can be found in the LICENSE file. | 14250 // BSD-style license that can be found in the LICENSE file. |
| 14153 | 14251 |
| 14154 | 14252 |
| 14155 /// @domName PopStateEvent; @docsEditable true | 14253 /// @domName PopStateEvent; @docsEditable true |
| 14156 class PopStateEvent extends Event native "*PopStateEvent" { | 14254 class PopStateEvent extends Event native "*PopStateEvent" { |
| 14157 | 14255 |
| 14158 /// @domName PopStateEvent.state; @docsEditable true | 14256 /// @domName PopStateEvent.state; @docsEditable true |
| 14159 dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state); | 14257 dynamic get state => convertNativeToDart_SerializedScriptValue(this._state); |
| 14160 dynamic get _state => JS("dynamic", "#.state", this); | 14258 dynamic get _state => JS("dynamic", "#.state", this); |
| 14161 } | 14259 } |
| 14162 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14260 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14163 // for details. All rights reserved. Use of this source code is governed by a | 14261 // for details. All rights reserved. Use of this source code is governed by a |
| 14164 // BSD-style license that can be found in the LICENSE file. | 14262 // BSD-style license that can be found in the LICENSE file. |
| 14165 | 14263 |
| 14166 // WARNING: Do not edit - generated code. | 14264 // WARNING: Do not edit - generated code. |
| 14167 | 14265 |
| 14168 | 14266 |
| 14169 typedef void PositionCallback(Geoposition position); | 14267 typedef void PositionCallback(Geoposition position); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14440 | 14538 |
| 14441 /// @domName RTCPeerConnection.addEventListener; @docsEditable true | 14539 /// @domName RTCPeerConnection.addEventListener; @docsEditable true |
| 14442 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; | 14540 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "addEventListener"; |
| 14443 | 14541 |
| 14444 /// @domName RTCPeerConnection.addIceCandidate; @docsEditable true | 14542 /// @domName RTCPeerConnection.addIceCandidate; @docsEditable true |
| 14445 void addIceCandidate(RTCIceCandidate candidate) native; | 14543 void addIceCandidate(RTCIceCandidate candidate) native; |
| 14446 | 14544 |
| 14447 /// @domName RTCPeerConnection.addStream; @docsEditable true | 14545 /// @domName RTCPeerConnection.addStream; @docsEditable true |
| 14448 void addStream(MediaStream stream, [Map mediaConstraints]) { | 14546 void addStream(MediaStream stream, [Map mediaConstraints]) { |
| 14449 if (?mediaConstraints) { | 14547 if (?mediaConstraints) { |
| 14450 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 14548 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
| 14451 _addStream_1(stream, mediaConstraints_1); | 14549 _addStream_1(stream, mediaConstraints_1); |
| 14452 return; | 14550 return; |
| 14453 } | 14551 } |
| 14454 _addStream_2(stream); | 14552 _addStream_2(stream); |
| 14455 return; | 14553 return; |
| 14456 } | 14554 } |
| 14457 void _addStream_1(MediaStream stream, mediaConstraints) native "addStream"; | 14555 void _addStream_1(MediaStream stream, mediaConstraints) native "addStream"; |
| 14458 void _addStream_2(MediaStream stream) native "addStream"; | 14556 void _addStream_2(MediaStream stream) native "addStream"; |
| 14459 | 14557 |
| 14460 /// @domName RTCPeerConnection.close; @docsEditable true | 14558 /// @domName RTCPeerConnection.close; @docsEditable true |
| 14461 void close() native; | 14559 void close() native; |
| 14462 | 14560 |
| 14463 /// @domName RTCPeerConnection.createAnswer; @docsEditable true | 14561 /// @domName RTCPeerConnection.createAnswer; @docsEditable true |
| 14464 void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCall
back failureCallback, Map mediaConstraints]) { | 14562 void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCall
back failureCallback, Map mediaConstraints]) { |
| 14465 if (?mediaConstraints) { | 14563 if (?mediaConstraints) { |
| 14466 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 14564 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
| 14467 _createAnswer_1(successCallback, failureCallback, mediaConstraints_1); | 14565 _createAnswer_1(successCallback, failureCallback, mediaConstraints_1); |
| 14468 return; | 14566 return; |
| 14469 } | 14567 } |
| 14470 _createAnswer_2(successCallback, failureCallback); | 14568 _createAnswer_2(successCallback, failureCallback); |
| 14471 return; | 14569 return; |
| 14472 } | 14570 } |
| 14473 void _createAnswer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback, mediaConstraints) native "createAnswer"; | 14571 void _createAnswer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback, mediaConstraints) native "createAnswer"; |
| 14474 void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback) native "createAnswer"; | 14572 void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCa
llback failureCallback) native "createAnswer"; |
| 14475 | 14573 |
| 14476 /// @domName RTCPeerConnection.createDataChannel; @docsEditable true | 14574 /// @domName RTCPeerConnection.createDataChannel; @docsEditable true |
| 14477 RTCDataChannel createDataChannel(String label, [Map options]) { | 14575 RTCDataChannel createDataChannel(String label, [Map options]) { |
| 14478 if (?options) { | 14576 if (?options) { |
| 14479 var options_1 = _convertDartToNative_Dictionary(options); | 14577 var options_1 = convertDartToNative_Dictionary(options); |
| 14480 return _createDataChannel_1(label, options_1); | 14578 return _createDataChannel_1(label, options_1); |
| 14481 } | 14579 } |
| 14482 return _createDataChannel_2(label); | 14580 return _createDataChannel_2(label); |
| 14483 } | 14581 } |
| 14484 RTCDataChannel _createDataChannel_1(label, options) native "createDataChannel"
; | 14582 RTCDataChannel _createDataChannel_1(label, options) native "createDataChannel"
; |
| 14485 RTCDataChannel _createDataChannel_2(label) native "createDataChannel"; | 14583 RTCDataChannel _createDataChannel_2(label) native "createDataChannel"; |
| 14486 | 14584 |
| 14487 /// @domName RTCPeerConnection.createOffer; @docsEditable true | 14585 /// @domName RTCPeerConnection.createOffer; @docsEditable true |
| 14488 void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallb
ack failureCallback, Map mediaConstraints]) { | 14586 void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallb
ack failureCallback, Map mediaConstraints]) { |
| 14489 if (?mediaConstraints) { | 14587 if (?mediaConstraints) { |
| 14490 var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints)
; | 14588 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
| 14491 _createOffer_1(successCallback, failureCallback, mediaConstraints_1); | 14589 _createOffer_1(successCallback, failureCallback, mediaConstraints_1); |
| 14492 return; | 14590 return; |
| 14493 } | 14591 } |
| 14494 _createOffer_2(successCallback, failureCallback); | 14592 _createOffer_2(successCallback, failureCallback); |
| 14495 return; | 14593 return; |
| 14496 } | 14594 } |
| 14497 void _createOffer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback, mediaConstraints) native "createOffer"; | 14595 void _createOffer_1(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback, mediaConstraints) native "createOffer"; |
| 14498 void _createOffer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback) native "createOffer"; | 14596 void _createOffer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCal
lback failureCallback) native "createOffer"; |
| 14499 | 14597 |
| 14500 /// @domName RTCPeerConnection.dispatchEvent; @docsEditable true | 14598 /// @domName RTCPeerConnection.dispatchEvent; @docsEditable true |
| (...skipping 10 matching lines...) Expand all Loading... |
| 14511 | 14609 |
| 14512 /// @domName RTCPeerConnection.setLocalDescription; @docsEditable true | 14610 /// @domName RTCPeerConnection.setLocalDescription; @docsEditable true |
| 14513 void setLocalDescription(RTCSessionDescription description, [VoidCallback succ
essCallback, RTCErrorCallback failureCallback]) native; | 14611 void setLocalDescription(RTCSessionDescription description, [VoidCallback succ
essCallback, RTCErrorCallback failureCallback]) native; |
| 14514 | 14612 |
| 14515 /// @domName RTCPeerConnection.setRemoteDescription; @docsEditable true | 14613 /// @domName RTCPeerConnection.setRemoteDescription; @docsEditable true |
| 14516 void setRemoteDescription(RTCSessionDescription description, [VoidCallback suc
cessCallback, RTCErrorCallback failureCallback]) native; | 14614 void setRemoteDescription(RTCSessionDescription description, [VoidCallback suc
cessCallback, RTCErrorCallback failureCallback]) native; |
| 14517 | 14615 |
| 14518 /// @domName RTCPeerConnection.updateIce; @docsEditable true | 14616 /// @domName RTCPeerConnection.updateIce; @docsEditable true |
| 14519 void updateIce([Map configuration, Map mediaConstraints]) { | 14617 void updateIce([Map configuration, Map mediaConstraints]) { |
| 14520 if (?mediaConstraints) { | 14618 if (?mediaConstraints) { |
| 14521 var configuration_1 = _convertDartToNative_Dictionary(configuration); | 14619 var configuration_1 = convertDartToNative_Dictionary(configuration); |
| 14522 var mediaConstraints_2 = _convertDartToNative_Dictionary(mediaConstraints)
; | 14620 var mediaConstraints_2 = convertDartToNative_Dictionary(mediaConstraints); |
| 14523 _updateIce_1(configuration_1, mediaConstraints_2); | 14621 _updateIce_1(configuration_1, mediaConstraints_2); |
| 14524 return; | 14622 return; |
| 14525 } | 14623 } |
| 14526 if (?configuration) { | 14624 if (?configuration) { |
| 14527 var configuration_3 = _convertDartToNative_Dictionary(configuration); | 14625 var configuration_3 = convertDartToNative_Dictionary(configuration); |
| 14528 _updateIce_2(configuration_3); | 14626 _updateIce_2(configuration_3); |
| 14529 return; | 14627 return; |
| 14530 } | 14628 } |
| 14531 _updateIce_3(); | 14629 _updateIce_3(); |
| 14532 return; | 14630 return; |
| 14533 } | 14631 } |
| 14534 void _updateIce_1(configuration, mediaConstraints) native "updateIce"; | 14632 void _updateIce_1(configuration, mediaConstraints) native "updateIce"; |
| 14535 void _updateIce_2(configuration) native "updateIce"; | 14633 void _updateIce_2(configuration) native "updateIce"; |
| 14536 void _updateIce_3() native "updateIce"; | 14634 void _updateIce_3() native "updateIce"; |
| 14537 } | 14635 } |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14917 } | 15015 } |
| 14918 | 15016 |
| 14919 void addLast(Map value) { | 15017 void addLast(Map value) { |
| 14920 throw new UnsupportedError("Cannot add to immutable List."); | 15018 throw new UnsupportedError("Cannot add to immutable List."); |
| 14921 } | 15019 } |
| 14922 | 15020 |
| 14923 void addAll(Collection<Map> collection) { | 15021 void addAll(Collection<Map> collection) { |
| 14924 throw new UnsupportedError("Cannot add to immutable List."); | 15022 throw new UnsupportedError("Cannot add to immutable List."); |
| 14925 } | 15023 } |
| 14926 | 15024 |
| 14927 bool contains(Map element) => _Collections.contains(this, element); | 15025 bool contains(Map element) => Collections.contains(this, element); |
| 14928 | 15026 |
| 14929 void forEach(void f(Map element)) => _Collections.forEach(this, f); | 15027 void forEach(void f(Map element)) => Collections.forEach(this, f); |
| 14930 | 15028 |
| 14931 Collection map(f(Map element)) => _Collections.map(this, [], f); | 15029 Collection map(f(Map element)) => Collections.map(this, [], f); |
| 14932 | 15030 |
| 14933 Collection<Map> filter(bool f(Map element)) => | 15031 Collection<Map> filter(bool f(Map element)) => |
| 14934 _Collections.filter(this, <Map>[], f); | 15032 Collections.filter(this, <Map>[], f); |
| 14935 | 15033 |
| 14936 bool every(bool f(Map element)) => _Collections.every(this, f); | 15034 bool every(bool f(Map element)) => Collections.every(this, f); |
| 14937 | 15035 |
| 14938 bool some(bool f(Map element)) => _Collections.some(this, f); | 15036 bool some(bool f(Map element)) => Collections.some(this, f); |
| 14939 | 15037 |
| 14940 bool get isEmpty => this.length == 0; | 15038 bool get isEmpty => this.length == 0; |
| 14941 | 15039 |
| 14942 // From List<Map>: | 15040 // From List<Map>: |
| 14943 | 15041 |
| 14944 void sort([Comparator<Map> compare = Comparable.compare]) { | 15042 void sort([Comparator<Map> compare = Comparable.compare]) { |
| 14945 throw new UnsupportedError("Cannot sort immutable List."); | 15043 throw new UnsupportedError("Cannot sort immutable List."); |
| 14946 } | 15044 } |
| 14947 | 15045 |
| 14948 int indexOf(Map element, [int start = 0]) => | 15046 int indexOf(Map element, [int start = 0]) => |
| (...skipping 24 matching lines...) Expand all Loading... |
| 14973 throw new UnsupportedError("Cannot insertRange on immutable List."); | 15071 throw new UnsupportedError("Cannot insertRange on immutable List."); |
| 14974 } | 15072 } |
| 14975 | 15073 |
| 14976 List<Map> getRange(int start, int rangeLength) => | 15074 List<Map> getRange(int start, int rangeLength) => |
| 14977 _Lists.getRange(this, start, rangeLength, <Map>[]); | 15075 _Lists.getRange(this, start, rangeLength, <Map>[]); |
| 14978 | 15076 |
| 14979 // -- end List<Map> mixins. | 15077 // -- end List<Map> mixins. |
| 14980 | 15078 |
| 14981 /// @domName SQLResultSetRowList.item; @docsEditable true | 15079 /// @domName SQLResultSetRowList.item; @docsEditable true |
| 14982 Map item(int index) { | 15080 Map item(int index) { |
| 14983 return _convertNativeToDart_Dictionary(_item_1(index)); | 15081 return convertNativeToDart_Dictionary(_item_1(index)); |
| 14984 } | 15082 } |
| 14985 @Creates('=Object') | 15083 @Creates('=Object') |
| 14986 _item_1(index) native "item"; | 15084 _item_1(index) native "item"; |
| 14987 } | 15085 } |
| 14988 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 15086 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14989 // for details. All rights reserved. Use of this source code is governed by a | 15087 // for details. All rights reserved. Use of this source code is governed by a |
| 14990 // BSD-style license that can be found in the LICENSE file. | 15088 // BSD-style license that can be found in the LICENSE file. |
| 14991 | 15089 |
| 14992 // WARNING: Do not edit - generated code. | 15090 // WARNING: Do not edit - generated code. |
| 14993 | 15091 |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15419 } | 15517 } |
| 15420 | 15518 |
| 15421 void addLast(SourceBuffer value) { | 15519 void addLast(SourceBuffer value) { |
| 15422 throw new UnsupportedError("Cannot add to immutable List."); | 15520 throw new UnsupportedError("Cannot add to immutable List."); |
| 15423 } | 15521 } |
| 15424 | 15522 |
| 15425 void addAll(Collection<SourceBuffer> collection) { | 15523 void addAll(Collection<SourceBuffer> collection) { |
| 15426 throw new UnsupportedError("Cannot add to immutable List."); | 15524 throw new UnsupportedError("Cannot add to immutable List."); |
| 15427 } | 15525 } |
| 15428 | 15526 |
| 15429 bool contains(SourceBuffer element) => _Collections.contains(this, element); | 15527 bool contains(SourceBuffer element) => Collections.contains(this, element); |
| 15430 | 15528 |
| 15431 void forEach(void f(SourceBuffer element)) => _Collections.forEach(this, f); | 15529 void forEach(void f(SourceBuffer element)) => Collections.forEach(this, f); |
| 15432 | 15530 |
| 15433 Collection map(f(SourceBuffer element)) => _Collections.map(this, [], f); | 15531 Collection map(f(SourceBuffer element)) => Collections.map(this, [], f); |
| 15434 | 15532 |
| 15435 Collection<SourceBuffer> filter(bool f(SourceBuffer element)) => | 15533 Collection<SourceBuffer> filter(bool f(SourceBuffer element)) => |
| 15436 _Collections.filter(this, <SourceBuffer>[], f); | 15534 Collections.filter(this, <SourceBuffer>[], f); |
| 15437 | 15535 |
| 15438 bool every(bool f(SourceBuffer element)) => _Collections.every(this, f); | 15536 bool every(bool f(SourceBuffer element)) => Collections.every(this, f); |
| 15439 | 15537 |
| 15440 bool some(bool f(SourceBuffer element)) => _Collections.some(this, f); | 15538 bool some(bool f(SourceBuffer element)) => Collections.some(this, f); |
| 15441 | 15539 |
| 15442 bool get isEmpty => this.length == 0; | 15540 bool get isEmpty => this.length == 0; |
| 15443 | 15541 |
| 15444 // From List<SourceBuffer>: | 15542 // From List<SourceBuffer>: |
| 15445 | 15543 |
| 15446 void sort([Comparator<SourceBuffer> compare = Comparable.compare]) { | 15544 void sort([Comparator<SourceBuffer> compare = Comparable.compare]) { |
| 15447 throw new UnsupportedError("Cannot sort immutable List."); | 15545 throw new UnsupportedError("Cannot sort immutable List."); |
| 15448 } | 15546 } |
| 15449 | 15547 |
| 15450 int indexOf(SourceBuffer element, [int start = 0]) => | 15548 int indexOf(SourceBuffer element, [int start = 0]) => |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15574 } | 15672 } |
| 15575 | 15673 |
| 15576 void addLast(SpeechGrammar value) { | 15674 void addLast(SpeechGrammar value) { |
| 15577 throw new UnsupportedError("Cannot add to immutable List."); | 15675 throw new UnsupportedError("Cannot add to immutable List."); |
| 15578 } | 15676 } |
| 15579 | 15677 |
| 15580 void addAll(Collection<SpeechGrammar> collection) { | 15678 void addAll(Collection<SpeechGrammar> collection) { |
| 15581 throw new UnsupportedError("Cannot add to immutable List."); | 15679 throw new UnsupportedError("Cannot add to immutable List."); |
| 15582 } | 15680 } |
| 15583 | 15681 |
| 15584 bool contains(SpeechGrammar element) => _Collections.contains(this, element); | 15682 bool contains(SpeechGrammar element) => Collections.contains(this, element); |
| 15585 | 15683 |
| 15586 void forEach(void f(SpeechGrammar element)) => _Collections.forEach(this, f); | 15684 void forEach(void f(SpeechGrammar element)) => Collections.forEach(this, f); |
| 15587 | 15685 |
| 15588 Collection map(f(SpeechGrammar element)) => _Collections.map(this, [], f); | 15686 Collection map(f(SpeechGrammar element)) => Collections.map(this, [], f); |
| 15589 | 15687 |
| 15590 Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) => | 15688 Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) => |
| 15591 _Collections.filter(this, <SpeechGrammar>[], f); | 15689 Collections.filter(this, <SpeechGrammar>[], f); |
| 15592 | 15690 |
| 15593 bool every(bool f(SpeechGrammar element)) => _Collections.every(this, f); | 15691 bool every(bool f(SpeechGrammar element)) => Collections.every(this, f); |
| 15594 | 15692 |
| 15595 bool some(bool f(SpeechGrammar element)) => _Collections.some(this, f); | 15693 bool some(bool f(SpeechGrammar element)) => Collections.some(this, f); |
| 15596 | 15694 |
| 15597 bool get isEmpty => this.length == 0; | 15695 bool get isEmpty => this.length == 0; |
| 15598 | 15696 |
| 15599 // From List<SpeechGrammar>: | 15697 // From List<SpeechGrammar>: |
| 15600 | 15698 |
| 15601 void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) { | 15699 void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) { |
| 15602 throw new UnsupportedError("Cannot sort immutable List."); | 15700 throw new UnsupportedError("Cannot sort immutable List."); |
| 15603 } | 15701 } |
| 15604 | 15702 |
| 15605 int indexOf(SpeechGrammar element, [int start = 0]) => | 15703 int indexOf(SpeechGrammar element, [int start = 0]) => |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16595 } | 16693 } |
| 16596 | 16694 |
| 16597 void addLast(TextTrackCue value) { | 16695 void addLast(TextTrackCue value) { |
| 16598 throw new UnsupportedError("Cannot add to immutable List."); | 16696 throw new UnsupportedError("Cannot add to immutable List."); |
| 16599 } | 16697 } |
| 16600 | 16698 |
| 16601 void addAll(Collection<TextTrackCue> collection) { | 16699 void addAll(Collection<TextTrackCue> collection) { |
| 16602 throw new UnsupportedError("Cannot add to immutable List."); | 16700 throw new UnsupportedError("Cannot add to immutable List."); |
| 16603 } | 16701 } |
| 16604 | 16702 |
| 16605 bool contains(TextTrackCue element) => _Collections.contains(this, element); | 16703 bool contains(TextTrackCue element) => Collections.contains(this, element); |
| 16606 | 16704 |
| 16607 void forEach(void f(TextTrackCue element)) => _Collections.forEach(this, f); | 16705 void forEach(void f(TextTrackCue element)) => Collections.forEach(this, f); |
| 16608 | 16706 |
| 16609 Collection map(f(TextTrackCue element)) => _Collections.map(this, [], f); | 16707 Collection map(f(TextTrackCue element)) => Collections.map(this, [], f); |
| 16610 | 16708 |
| 16611 Collection<TextTrackCue> filter(bool f(TextTrackCue element)) => | 16709 Collection<TextTrackCue> filter(bool f(TextTrackCue element)) => |
| 16612 _Collections.filter(this, <TextTrackCue>[], f); | 16710 Collections.filter(this, <TextTrackCue>[], f); |
| 16613 | 16711 |
| 16614 bool every(bool f(TextTrackCue element)) => _Collections.every(this, f); | 16712 bool every(bool f(TextTrackCue element)) => Collections.every(this, f); |
| 16615 | 16713 |
| 16616 bool some(bool f(TextTrackCue element)) => _Collections.some(this, f); | 16714 bool some(bool f(TextTrackCue element)) => Collections.some(this, f); |
| 16617 | 16715 |
| 16618 bool get isEmpty => this.length == 0; | 16716 bool get isEmpty => this.length == 0; |
| 16619 | 16717 |
| 16620 // From List<TextTrackCue>: | 16718 // From List<TextTrackCue>: |
| 16621 | 16719 |
| 16622 void sort([Comparator<TextTrackCue> compare = Comparable.compare]) { | 16720 void sort([Comparator<TextTrackCue> compare = Comparable.compare]) { |
| 16623 throw new UnsupportedError("Cannot sort immutable List."); | 16721 throw new UnsupportedError("Cannot sort immutable List."); |
| 16624 } | 16722 } |
| 16625 | 16723 |
| 16626 int indexOf(TextTrackCue element, [int start = 0]) => | 16724 int indexOf(TextTrackCue element, [int start = 0]) => |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16701 } | 16799 } |
| 16702 | 16800 |
| 16703 void addLast(TextTrack value) { | 16801 void addLast(TextTrack value) { |
| 16704 throw new UnsupportedError("Cannot add to immutable List."); | 16802 throw new UnsupportedError("Cannot add to immutable List."); |
| 16705 } | 16803 } |
| 16706 | 16804 |
| 16707 void addAll(Collection<TextTrack> collection) { | 16805 void addAll(Collection<TextTrack> collection) { |
| 16708 throw new UnsupportedError("Cannot add to immutable List."); | 16806 throw new UnsupportedError("Cannot add to immutable List."); |
| 16709 } | 16807 } |
| 16710 | 16808 |
| 16711 bool contains(TextTrack element) => _Collections.contains(this, element); | 16809 bool contains(TextTrack element) => Collections.contains(this, element); |
| 16712 | 16810 |
| 16713 void forEach(void f(TextTrack element)) => _Collections.forEach(this, f); | 16811 void forEach(void f(TextTrack element)) => Collections.forEach(this, f); |
| 16714 | 16812 |
| 16715 Collection map(f(TextTrack element)) => _Collections.map(this, [], f); | 16813 Collection map(f(TextTrack element)) => Collections.map(this, [], f); |
| 16716 | 16814 |
| 16717 Collection<TextTrack> filter(bool f(TextTrack element)) => | 16815 Collection<TextTrack> filter(bool f(TextTrack element)) => |
| 16718 _Collections.filter(this, <TextTrack>[], f); | 16816 Collections.filter(this, <TextTrack>[], f); |
| 16719 | 16817 |
| 16720 bool every(bool f(TextTrack element)) => _Collections.every(this, f); | 16818 bool every(bool f(TextTrack element)) => Collections.every(this, f); |
| 16721 | 16819 |
| 16722 bool some(bool f(TextTrack element)) => _Collections.some(this, f); | 16820 bool some(bool f(TextTrack element)) => Collections.some(this, f); |
| 16723 | 16821 |
| 16724 bool get isEmpty => this.length == 0; | 16822 bool get isEmpty => this.length == 0; |
| 16725 | 16823 |
| 16726 // From List<TextTrack>: | 16824 // From List<TextTrack>: |
| 16727 | 16825 |
| 16728 void sort([Comparator<TextTrack> compare = Comparable.compare]) { | 16826 void sort([Comparator<TextTrack> compare = Comparable.compare]) { |
| 16729 throw new UnsupportedError("Cannot sort immutable List."); | 16827 throw new UnsupportedError("Cannot sort immutable List."); |
| 16730 } | 16828 } |
| 16731 | 16829 |
| 16732 int indexOf(TextTrack element, [int start = 0]) => | 16830 int indexOf(TextTrack element, [int start = 0]) => |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16927 } | 17025 } |
| 16928 | 17026 |
| 16929 void addLast(Touch value) { | 17027 void addLast(Touch value) { |
| 16930 throw new UnsupportedError("Cannot add to immutable List."); | 17028 throw new UnsupportedError("Cannot add to immutable List."); |
| 16931 } | 17029 } |
| 16932 | 17030 |
| 16933 void addAll(Collection<Touch> collection) { | 17031 void addAll(Collection<Touch> collection) { |
| 16934 throw new UnsupportedError("Cannot add to immutable List."); | 17032 throw new UnsupportedError("Cannot add to immutable List."); |
| 16935 } | 17033 } |
| 16936 | 17034 |
| 16937 bool contains(Touch element) => _Collections.contains(this, element); | 17035 bool contains(Touch element) => Collections.contains(this, element); |
| 16938 | 17036 |
| 16939 void forEach(void f(Touch element)) => _Collections.forEach(this, f); | 17037 void forEach(void f(Touch element)) => Collections.forEach(this, f); |
| 16940 | 17038 |
| 16941 Collection map(f(Touch element)) => _Collections.map(this, [], f); | 17039 Collection map(f(Touch element)) => Collections.map(this, [], f); |
| 16942 | 17040 |
| 16943 Collection<Touch> filter(bool f(Touch element)) => | 17041 Collection<Touch> filter(bool f(Touch element)) => |
| 16944 _Collections.filter(this, <Touch>[], f); | 17042 Collections.filter(this, <Touch>[], f); |
| 16945 | 17043 |
| 16946 bool every(bool f(Touch element)) => _Collections.every(this, f); | 17044 bool every(bool f(Touch element)) => Collections.every(this, f); |
| 16947 | 17045 |
| 16948 bool some(bool f(Touch element)) => _Collections.some(this, f); | 17046 bool some(bool f(Touch element)) => Collections.some(this, f); |
| 16949 | 17047 |
| 16950 bool get isEmpty => this.length == 0; | 17048 bool get isEmpty => this.length == 0; |
| 16951 | 17049 |
| 16952 // From List<Touch>: | 17050 // From List<Touch>: |
| 16953 | 17051 |
| 16954 void sort([Comparator<Touch> compare = Comparable.compare]) { | 17052 void sort([Comparator<Touch> compare = Comparable.compare]) { |
| 16955 throw new UnsupportedError("Cannot sort immutable List."); | 17053 throw new UnsupportedError("Cannot sort immutable List."); |
| 16956 } | 17054 } |
| 16957 | 17055 |
| 16958 int indexOf(Touch element, [int start = 0]) => | 17056 int indexOf(Touch element, [int start = 0]) => |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17202 } | 17300 } |
| 17203 | 17301 |
| 17204 void addLast(int value) { | 17302 void addLast(int value) { |
| 17205 throw new UnsupportedError("Cannot add to immutable List."); | 17303 throw new UnsupportedError("Cannot add to immutable List."); |
| 17206 } | 17304 } |
| 17207 | 17305 |
| 17208 void addAll(Collection<int> collection) { | 17306 void addAll(Collection<int> collection) { |
| 17209 throw new UnsupportedError("Cannot add to immutable List."); | 17307 throw new UnsupportedError("Cannot add to immutable List."); |
| 17210 } | 17308 } |
| 17211 | 17309 |
| 17212 bool contains(int element) => _Collections.contains(this, element); | 17310 bool contains(int element) => Collections.contains(this, element); |
| 17213 | 17311 |
| 17214 void forEach(void f(int element)) => _Collections.forEach(this, f); | 17312 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 17215 | 17313 |
| 17216 Collection map(f(int element)) => _Collections.map(this, [], f); | 17314 Collection map(f(int element)) => Collections.map(this, [], f); |
| 17217 | 17315 |
| 17218 Collection<int> filter(bool f(int element)) => | 17316 Collection<int> filter(bool f(int element)) => |
| 17219 _Collections.filter(this, <int>[], f); | 17317 Collections.filter(this, <int>[], f); |
| 17220 | 17318 |
| 17221 bool every(bool f(int element)) => _Collections.every(this, f); | 17319 bool every(bool f(int element)) => Collections.every(this, f); |
| 17222 | 17320 |
| 17223 bool some(bool f(int element)) => _Collections.some(this, f); | 17321 bool some(bool f(int element)) => Collections.some(this, f); |
| 17224 | 17322 |
| 17225 bool get isEmpty => this.length == 0; | 17323 bool get isEmpty => this.length == 0; |
| 17226 | 17324 |
| 17227 // From List<int>: | 17325 // From List<int>: |
| 17228 | 17326 |
| 17229 void sort([Comparator<int> compare = Comparable.compare]) { | 17327 void sort([Comparator<int> compare = Comparable.compare]) { |
| 17230 throw new UnsupportedError("Cannot sort immutable List."); | 17328 throw new UnsupportedError("Cannot sort immutable List."); |
| 17231 } | 17329 } |
| 17232 | 17330 |
| 17233 int indexOf(int element, [int start = 0]) => | 17331 int indexOf(int element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17312 } | 17410 } |
| 17313 | 17411 |
| 17314 void addLast(int value) { | 17412 void addLast(int value) { |
| 17315 throw new UnsupportedError("Cannot add to immutable List."); | 17413 throw new UnsupportedError("Cannot add to immutable List."); |
| 17316 } | 17414 } |
| 17317 | 17415 |
| 17318 void addAll(Collection<int> collection) { | 17416 void addAll(Collection<int> collection) { |
| 17319 throw new UnsupportedError("Cannot add to immutable List."); | 17417 throw new UnsupportedError("Cannot add to immutable List."); |
| 17320 } | 17418 } |
| 17321 | 17419 |
| 17322 bool contains(int element) => _Collections.contains(this, element); | 17420 bool contains(int element) => Collections.contains(this, element); |
| 17323 | 17421 |
| 17324 void forEach(void f(int element)) => _Collections.forEach(this, f); | 17422 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 17325 | 17423 |
| 17326 Collection map(f(int element)) => _Collections.map(this, [], f); | 17424 Collection map(f(int element)) => Collections.map(this, [], f); |
| 17327 | 17425 |
| 17328 Collection<int> filter(bool f(int element)) => | 17426 Collection<int> filter(bool f(int element)) => |
| 17329 _Collections.filter(this, <int>[], f); | 17427 Collections.filter(this, <int>[], f); |
| 17330 | 17428 |
| 17331 bool every(bool f(int element)) => _Collections.every(this, f); | 17429 bool every(bool f(int element)) => Collections.every(this, f); |
| 17332 | 17430 |
| 17333 bool some(bool f(int element)) => _Collections.some(this, f); | 17431 bool some(bool f(int element)) => Collections.some(this, f); |
| 17334 | 17432 |
| 17335 bool get isEmpty => this.length == 0; | 17433 bool get isEmpty => this.length == 0; |
| 17336 | 17434 |
| 17337 // From List<int>: | 17435 // From List<int>: |
| 17338 | 17436 |
| 17339 void sort([Comparator<int> compare = Comparable.compare]) { | 17437 void sort([Comparator<int> compare = Comparable.compare]) { |
| 17340 throw new UnsupportedError("Cannot sort immutable List."); | 17438 throw new UnsupportedError("Cannot sort immutable List."); |
| 17341 } | 17439 } |
| 17342 | 17440 |
| 17343 int indexOf(int element, [int start = 0]) => | 17441 int indexOf(int element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17422 } | 17520 } |
| 17423 | 17521 |
| 17424 void addLast(int value) { | 17522 void addLast(int value) { |
| 17425 throw new UnsupportedError("Cannot add to immutable List."); | 17523 throw new UnsupportedError("Cannot add to immutable List."); |
| 17426 } | 17524 } |
| 17427 | 17525 |
| 17428 void addAll(Collection<int> collection) { | 17526 void addAll(Collection<int> collection) { |
| 17429 throw new UnsupportedError("Cannot add to immutable List."); | 17527 throw new UnsupportedError("Cannot add to immutable List."); |
| 17430 } | 17528 } |
| 17431 | 17529 |
| 17432 bool contains(int element) => _Collections.contains(this, element); | 17530 bool contains(int element) => Collections.contains(this, element); |
| 17433 | 17531 |
| 17434 void forEach(void f(int element)) => _Collections.forEach(this, f); | 17532 void forEach(void f(int element)) => Collections.forEach(this, f); |
| 17435 | 17533 |
| 17436 Collection map(f(int element)) => _Collections.map(this, [], f); | 17534 Collection map(f(int element)) => Collections.map(this, [], f); |
| 17437 | 17535 |
| 17438 Collection<int> filter(bool f(int element)) => | 17536 Collection<int> filter(bool f(int element)) => |
| 17439 _Collections.filter(this, <int>[], f); | 17537 Collections.filter(this, <int>[], f); |
| 17440 | 17538 |
| 17441 bool every(bool f(int element)) => _Collections.every(this, f); | 17539 bool every(bool f(int element)) => Collections.every(this, f); |
| 17442 | 17540 |
| 17443 bool some(bool f(int element)) => _Collections.some(this, f); | 17541 bool some(bool f(int element)) => Collections.some(this, f); |
| 17444 | 17542 |
| 17445 bool get isEmpty => this.length == 0; | 17543 bool get isEmpty => this.length == 0; |
| 17446 | 17544 |
| 17447 // From List<int>: | 17545 // From List<int>: |
| 17448 | 17546 |
| 17449 void sort([Comparator<int> compare = Comparable.compare]) { | 17547 void sort([Comparator<int> compare = Comparable.compare]) { |
| 17450 throw new UnsupportedError("Cannot sort immutable List."); | 17548 throw new UnsupportedError("Cannot sort immutable List."); |
| 17451 } | 17549 } |
| 17452 | 17550 |
| 17453 int indexOf(int element, [int start = 0]) => | 17551 int indexOf(int element, [int start = 0]) => |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19173 | 19271 |
| 19174 factory Worker(String scriptUrl) => _WorkerFactoryProvider.createWorker(script
Url); | 19272 factory Worker(String scriptUrl) => _WorkerFactoryProvider.createWorker(script
Url); |
| 19175 | 19273 |
| 19176 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 19274 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 19177 WorkerEvents get on => | 19275 WorkerEvents get on => |
| 19178 new WorkerEvents(this); | 19276 new WorkerEvents(this); |
| 19179 | 19277 |
| 19180 /// @domName Worker.postMessage; @docsEditable true | 19278 /// @domName Worker.postMessage; @docsEditable true |
| 19181 void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) { | 19279 void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) { |
| 19182 if (?messagePorts) { | 19280 if (?messagePorts) { |
| 19183 var message_1 = _convertDartToNative_SerializedScriptValue(message); | 19281 var message_1 = convertDartToNative_SerializedScriptValue(message); |
| 19184 _postMessage_1(message_1, messagePorts); | 19282 _postMessage_1(message_1, messagePorts); |
| 19185 return; | 19283 return; |
| 19186 } | 19284 } |
| 19187 var message_2 = _convertDartToNative_SerializedScriptValue(message); | 19285 var message_2 = convertDartToNative_SerializedScriptValue(message); |
| 19188 _postMessage_2(message_2); | 19286 _postMessage_2(message_2); |
| 19189 return; | 19287 return; |
| 19190 } | 19288 } |
| 19191 void _postMessage_1(message, List messagePorts) native "postMessage"; | 19289 void _postMessage_1(message, List messagePorts) native "postMessage"; |
| 19192 void _postMessage_2(message) native "postMessage"; | 19290 void _postMessage_2(message) native "postMessage"; |
| 19193 | 19291 |
| 19194 /// @domName Worker.terminate; @docsEditable true | 19292 /// @domName Worker.terminate; @docsEditable true |
| 19195 void terminate() native; | 19293 void terminate() native; |
| 19196 } | 19294 } |
| 19197 | 19295 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19588 } | 19686 } |
| 19589 | 19687 |
| 19590 void addLast(CSSRule value) { | 19688 void addLast(CSSRule value) { |
| 19591 throw new UnsupportedError("Cannot add to immutable List."); | 19689 throw new UnsupportedError("Cannot add to immutable List."); |
| 19592 } | 19690 } |
| 19593 | 19691 |
| 19594 void addAll(Collection<CSSRule> collection) { | 19692 void addAll(Collection<CSSRule> collection) { |
| 19595 throw new UnsupportedError("Cannot add to immutable List."); | 19693 throw new UnsupportedError("Cannot add to immutable List."); |
| 19596 } | 19694 } |
| 19597 | 19695 |
| 19598 bool contains(CSSRule element) => _Collections.contains(this, element); | 19696 bool contains(CSSRule element) => Collections.contains(this, element); |
| 19599 | 19697 |
| 19600 void forEach(void f(CSSRule element)) => _Collections.forEach(this, f); | 19698 void forEach(void f(CSSRule element)) => Collections.forEach(this, f); |
| 19601 | 19699 |
| 19602 Collection map(f(CSSRule element)) => _Collections.map(this, [], f); | 19700 Collection map(f(CSSRule element)) => Collections.map(this, [], f); |
| 19603 | 19701 |
| 19604 Collection<CSSRule> filter(bool f(CSSRule element)) => | 19702 Collection<CSSRule> filter(bool f(CSSRule element)) => |
| 19605 _Collections.filter(this, <CSSRule>[], f); | 19703 Collections.filter(this, <CSSRule>[], f); |
| 19606 | 19704 |
| 19607 bool every(bool f(CSSRule element)) => _Collections.every(this, f); | 19705 bool every(bool f(CSSRule element)) => Collections.every(this, f); |
| 19608 | 19706 |
| 19609 bool some(bool f(CSSRule element)) => _Collections.some(this, f); | 19707 bool some(bool f(CSSRule element)) => Collections.some(this, f); |
| 19610 | 19708 |
| 19611 bool get isEmpty => this.length == 0; | 19709 bool get isEmpty => this.length == 0; |
| 19612 | 19710 |
| 19613 // From List<CSSRule>: | 19711 // From List<CSSRule>: |
| 19614 | 19712 |
| 19615 void sort([Comparator<CSSRule> compare = Comparable.compare]) { | 19713 void sort([Comparator<CSSRule> compare = Comparable.compare]) { |
| 19616 throw new UnsupportedError("Cannot sort immutable List."); | 19714 throw new UnsupportedError("Cannot sort immutable List."); |
| 19617 } | 19715 } |
| 19618 | 19716 |
| 19619 int indexOf(CSSRule element, [int start = 0]) => | 19717 int indexOf(CSSRule element, [int start = 0]) => |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19687 } | 19785 } |
| 19688 | 19786 |
| 19689 void addLast(CSSValue value) { | 19787 void addLast(CSSValue value) { |
| 19690 throw new UnsupportedError("Cannot add to immutable List."); | 19788 throw new UnsupportedError("Cannot add to immutable List."); |
| 19691 } | 19789 } |
| 19692 | 19790 |
| 19693 void addAll(Collection<CSSValue> collection) { | 19791 void addAll(Collection<CSSValue> collection) { |
| 19694 throw new UnsupportedError("Cannot add to immutable List."); | 19792 throw new UnsupportedError("Cannot add to immutable List."); |
| 19695 } | 19793 } |
| 19696 | 19794 |
| 19697 bool contains(CSSValue element) => _Collections.contains(this, element); | 19795 bool contains(CSSValue element) => Collections.contains(this, element); |
| 19698 | 19796 |
| 19699 void forEach(void f(CSSValue element)) => _Collections.forEach(this, f); | 19797 void forEach(void f(CSSValue element)) => Collections.forEach(this, f); |
| 19700 | 19798 |
| 19701 Collection map(f(CSSValue element)) => _Collections.map(this, [], f); | 19799 Collection map(f(CSSValue element)) => Collections.map(this, [], f); |
| 19702 | 19800 |
| 19703 Collection<CSSValue> filter(bool f(CSSValue element)) => | 19801 Collection<CSSValue> filter(bool f(CSSValue element)) => |
| 19704 _Collections.filter(this, <CSSValue>[], f); | 19802 Collections.filter(this, <CSSValue>[], f); |
| 19705 | 19803 |
| 19706 bool every(bool f(CSSValue element)) => _Collections.every(this, f); | 19804 bool every(bool f(CSSValue element)) => Collections.every(this, f); |
| 19707 | 19805 |
| 19708 bool some(bool f(CSSValue element)) => _Collections.some(this, f); | 19806 bool some(bool f(CSSValue element)) => Collections.some(this, f); |
| 19709 | 19807 |
| 19710 bool get isEmpty => this.length == 0; | 19808 bool get isEmpty => this.length == 0; |
| 19711 | 19809 |
| 19712 // From List<CSSValue>: | 19810 // From List<CSSValue>: |
| 19713 | 19811 |
| 19714 void sort([Comparator<CSSValue> compare = Comparable.compare]) { | 19812 void sort([Comparator<CSSValue> compare = Comparable.compare]) { |
| 19715 throw new UnsupportedError("Cannot sort immutable List."); | 19813 throw new UnsupportedError("Cannot sort immutable List."); |
| 19716 } | 19814 } |
| 19717 | 19815 |
| 19718 int indexOf(CSSValue element, [int start = 0]) => | 19816 int indexOf(CSSValue element, [int start = 0]) => |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19786 } | 19884 } |
| 19787 | 19885 |
| 19788 void addLast(ClientRect value) { | 19886 void addLast(ClientRect value) { |
| 19789 throw new UnsupportedError("Cannot add to immutable List."); | 19887 throw new UnsupportedError("Cannot add to immutable List."); |
| 19790 } | 19888 } |
| 19791 | 19889 |
| 19792 void addAll(Collection<ClientRect> collection) { | 19890 void addAll(Collection<ClientRect> collection) { |
| 19793 throw new UnsupportedError("Cannot add to immutable List."); | 19891 throw new UnsupportedError("Cannot add to immutable List."); |
| 19794 } | 19892 } |
| 19795 | 19893 |
| 19796 bool contains(ClientRect element) => _Collections.contains(this, element); | 19894 bool contains(ClientRect element) => Collections.contains(this, element); |
| 19797 | 19895 |
| 19798 void forEach(void f(ClientRect element)) => _Collections.forEach(this, f); | 19896 void forEach(void f(ClientRect element)) => Collections.forEach(this, f); |
| 19799 | 19897 |
| 19800 Collection map(f(ClientRect element)) => _Collections.map(this, [], f); | 19898 Collection map(f(ClientRect element)) => Collections.map(this, [], f); |
| 19801 | 19899 |
| 19802 Collection<ClientRect> filter(bool f(ClientRect element)) => | 19900 Collection<ClientRect> filter(bool f(ClientRect element)) => |
| 19803 _Collections.filter(this, <ClientRect>[], f); | 19901 Collections.filter(this, <ClientRect>[], f); |
| 19804 | 19902 |
| 19805 bool every(bool f(ClientRect element)) => _Collections.every(this, f); | 19903 bool every(bool f(ClientRect element)) => Collections.every(this, f); |
| 19806 | 19904 |
| 19807 bool some(bool f(ClientRect element)) => _Collections.some(this, f); | 19905 bool some(bool f(ClientRect element)) => Collections.some(this, f); |
| 19808 | 19906 |
| 19809 bool get isEmpty => this.length == 0; | 19907 bool get isEmpty => this.length == 0; |
| 19810 | 19908 |
| 19811 // From List<ClientRect>: | 19909 // From List<ClientRect>: |
| 19812 | 19910 |
| 19813 void sort([Comparator<ClientRect> compare = Comparable.compare]) { | 19911 void sort([Comparator<ClientRect> compare = Comparable.compare]) { |
| 19814 throw new UnsupportedError("Cannot sort immutable List."); | 19912 throw new UnsupportedError("Cannot sort immutable List."); |
| 19815 } | 19913 } |
| 19816 | 19914 |
| 19817 int indexOf(ClientRect element, [int start = 0]) => | 19915 int indexOf(ClientRect element, [int start = 0]) => |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19896 void addLast(String value) { | 19994 void addLast(String value) { |
| 19897 throw new UnsupportedError("Cannot add to immutable List."); | 19995 throw new UnsupportedError("Cannot add to immutable List."); |
| 19898 } | 19996 } |
| 19899 | 19997 |
| 19900 void addAll(Collection<String> collection) { | 19998 void addAll(Collection<String> collection) { |
| 19901 throw new UnsupportedError("Cannot add to immutable List."); | 19999 throw new UnsupportedError("Cannot add to immutable List."); |
| 19902 } | 20000 } |
| 19903 | 20001 |
| 19904 // contains() defined by IDL. | 20002 // contains() defined by IDL. |
| 19905 | 20003 |
| 19906 void forEach(void f(String element)) => _Collections.forEach(this, f); | 20004 void forEach(void f(String element)) => Collections.forEach(this, f); |
| 19907 | 20005 |
| 19908 Collection map(f(String element)) => _Collections.map(this, [], f); | 20006 Collection map(f(String element)) => Collections.map(this, [], f); |
| 19909 | 20007 |
| 19910 Collection<String> filter(bool f(String element)) => | 20008 Collection<String> filter(bool f(String element)) => |
| 19911 _Collections.filter(this, <String>[], f); | 20009 Collections.filter(this, <String>[], f); |
| 19912 | 20010 |
| 19913 bool every(bool f(String element)) => _Collections.every(this, f); | 20011 bool every(bool f(String element)) => Collections.every(this, f); |
| 19914 | 20012 |
| 19915 bool some(bool f(String element)) => _Collections.some(this, f); | 20013 bool some(bool f(String element)) => Collections.some(this, f); |
| 19916 | 20014 |
| 19917 bool get isEmpty => this.length == 0; | 20015 bool get isEmpty => this.length == 0; |
| 19918 | 20016 |
| 19919 // From List<String>: | 20017 // From List<String>: |
| 19920 | 20018 |
| 19921 void sort([Comparator<String> compare = Comparable.compare]) { | 20019 void sort([Comparator<String> compare = Comparable.compare]) { |
| 19922 throw new UnsupportedError("Cannot sort immutable List."); | 20020 throw new UnsupportedError("Cannot sort immutable List."); |
| 19923 } | 20021 } |
| 19924 | 20022 |
| 19925 int indexOf(String element, [int start = 0]) => | 20023 int indexOf(String element, [int start = 0]) => |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20013 } | 20111 } |
| 20014 | 20112 |
| 20015 void addLast(Entry value) { | 20113 void addLast(Entry value) { |
| 20016 throw new UnsupportedError("Cannot add to immutable List."); | 20114 throw new UnsupportedError("Cannot add to immutable List."); |
| 20017 } | 20115 } |
| 20018 | 20116 |
| 20019 void addAll(Collection<Entry> collection) { | 20117 void addAll(Collection<Entry> collection) { |
| 20020 throw new UnsupportedError("Cannot add to immutable List."); | 20118 throw new UnsupportedError("Cannot add to immutable List."); |
| 20021 } | 20119 } |
| 20022 | 20120 |
| 20023 bool contains(Entry element) => _Collections.contains(this, element); | 20121 bool contains(Entry element) => Collections.contains(this, element); |
| 20024 | 20122 |
| 20025 void forEach(void f(Entry element)) => _Collections.forEach(this, f); | 20123 void forEach(void f(Entry element)) => Collections.forEach(this, f); |
| 20026 | 20124 |
| 20027 Collection map(f(Entry element)) => _Collections.map(this, [], f); | 20125 Collection map(f(Entry element)) => Collections.map(this, [], f); |
| 20028 | 20126 |
| 20029 Collection<Entry> filter(bool f(Entry element)) => | 20127 Collection<Entry> filter(bool f(Entry element)) => |
| 20030 _Collections.filter(this, <Entry>[], f); | 20128 Collections.filter(this, <Entry>[], f); |
| 20031 | 20129 |
| 20032 bool every(bool f(Entry element)) => _Collections.every(this, f); | 20130 bool every(bool f(Entry element)) => Collections.every(this, f); |
| 20033 | 20131 |
| 20034 bool some(bool f(Entry element)) => _Collections.some(this, f); | 20132 bool some(bool f(Entry element)) => Collections.some(this, f); |
| 20035 | 20133 |
| 20036 bool get isEmpty => this.length == 0; | 20134 bool get isEmpty => this.length == 0; |
| 20037 | 20135 |
| 20038 // From List<Entry>: | 20136 // From List<Entry>: |
| 20039 | 20137 |
| 20040 void sort([Comparator<Entry> compare = Comparable.compare]) { | 20138 void sort([Comparator<Entry> compare = Comparable.compare]) { |
| 20041 throw new UnsupportedError("Cannot sort immutable List."); | 20139 throw new UnsupportedError("Cannot sort immutable List."); |
| 20042 } | 20140 } |
| 20043 | 20141 |
| 20044 int indexOf(Entry element, [int start = 0]) => | 20142 int indexOf(Entry element, [int start = 0]) => |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20112 } | 20210 } |
| 20113 | 20211 |
| 20114 void addLast(EntrySync value) { | 20212 void addLast(EntrySync value) { |
| 20115 throw new UnsupportedError("Cannot add to immutable List."); | 20213 throw new UnsupportedError("Cannot add to immutable List."); |
| 20116 } | 20214 } |
| 20117 | 20215 |
| 20118 void addAll(Collection<EntrySync> collection) { | 20216 void addAll(Collection<EntrySync> collection) { |
| 20119 throw new UnsupportedError("Cannot add to immutable List."); | 20217 throw new UnsupportedError("Cannot add to immutable List."); |
| 20120 } | 20218 } |
| 20121 | 20219 |
| 20122 bool contains(EntrySync element) => _Collections.contains(this, element); | 20220 bool contains(EntrySync element) => Collections.contains(this, element); |
| 20123 | 20221 |
| 20124 void forEach(void f(EntrySync element)) => _Collections.forEach(this, f); | 20222 void forEach(void f(EntrySync element)) => Collections.forEach(this, f); |
| 20125 | 20223 |
| 20126 Collection map(f(EntrySync element)) => _Collections.map(this, [], f); | 20224 Collection map(f(EntrySync element)) => Collections.map(this, [], f); |
| 20127 | 20225 |
| 20128 Collection<EntrySync> filter(bool f(EntrySync element)) => | 20226 Collection<EntrySync> filter(bool f(EntrySync element)) => |
| 20129 _Collections.filter(this, <EntrySync>[], f); | 20227 Collections.filter(this, <EntrySync>[], f); |
| 20130 | 20228 |
| 20131 bool every(bool f(EntrySync element)) => _Collections.every(this, f); | 20229 bool every(bool f(EntrySync element)) => Collections.every(this, f); |
| 20132 | 20230 |
| 20133 bool some(bool f(EntrySync element)) => _Collections.some(this, f); | 20231 bool some(bool f(EntrySync element)) => Collections.some(this, f); |
| 20134 | 20232 |
| 20135 bool get isEmpty => this.length == 0; | 20233 bool get isEmpty => this.length == 0; |
| 20136 | 20234 |
| 20137 // From List<EntrySync>: | 20235 // From List<EntrySync>: |
| 20138 | 20236 |
| 20139 void sort([Comparator<EntrySync> compare = Comparable.compare]) { | 20237 void sort([Comparator<EntrySync> compare = Comparable.compare]) { |
| 20140 throw new UnsupportedError("Cannot sort immutable List."); | 20238 throw new UnsupportedError("Cannot sort immutable List."); |
| 20141 } | 20239 } |
| 20142 | 20240 |
| 20143 int indexOf(EntrySync element, [int start = 0]) => | 20241 int indexOf(EntrySync element, [int start = 0]) => |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20183 | 20281 |
| 20184 class _EventSourceFactoryProvider { | 20282 class _EventSourceFactoryProvider { |
| 20185 static EventSource createEventSource(String scriptUrl) => | 20283 static EventSource createEventSource(String scriptUrl) => |
| 20186 JS('EventSource', 'new EventSource(#)', scriptUrl); | 20284 JS('EventSource', 'new EventSource(#)', scriptUrl); |
| 20187 } | 20285 } |
| 20188 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20286 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 20189 // for details. All rights reserved. Use of this source code is governed by a | 20287 // for details. All rights reserved. Use of this source code is governed by a |
| 20190 // BSD-style license that can be found in the LICENSE file. | 20288 // BSD-style license that can be found in the LICENSE file. |
| 20191 | 20289 |
| 20192 | 20290 |
| 20193 /// @domName FileList; @docsEditable true | |
| 20194 class _FileList implements JavaScriptIndexingBehavior, List<File> native "*FileL
ist" { | |
| 20195 | |
| 20196 /// @domName FileList.length; @docsEditable true | |
| 20197 final int length; | |
| 20198 | |
| 20199 File operator[](int index) => JS("File", "#[#]", this, index); | |
| 20200 | |
| 20201 void operator[]=(int index, File value) { | |
| 20202 throw new UnsupportedError("Cannot assign element of immutable List."); | |
| 20203 } | |
| 20204 // -- start List<File> mixins. | |
| 20205 // File is the element type. | |
| 20206 | |
| 20207 // From Iterable<File>: | |
| 20208 | |
| 20209 Iterator<File> iterator() { | |
| 20210 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
| 20211 // be cached in both iterator _and_ forEach method. For now caching it | |
| 20212 // for consistency. | |
| 20213 return new FixedSizeListIterator<File>(this); | |
| 20214 } | |
| 20215 | |
| 20216 // From Collection<File>: | |
| 20217 | |
| 20218 void add(File value) { | |
| 20219 throw new UnsupportedError("Cannot add to immutable List."); | |
| 20220 } | |
| 20221 | |
| 20222 void addLast(File value) { | |
| 20223 throw new UnsupportedError("Cannot add to immutable List."); | |
| 20224 } | |
| 20225 | |
| 20226 void addAll(Collection<File> collection) { | |
| 20227 throw new UnsupportedError("Cannot add to immutable List."); | |
| 20228 } | |
| 20229 | |
| 20230 bool contains(File element) => _Collections.contains(this, element); | |
| 20231 | |
| 20232 void forEach(void f(File element)) => _Collections.forEach(this, f); | |
| 20233 | |
| 20234 Collection map(f(File element)) => _Collections.map(this, [], f); | |
| 20235 | |
| 20236 Collection<File> filter(bool f(File element)) => | |
| 20237 _Collections.filter(this, <File>[], f); | |
| 20238 | |
| 20239 bool every(bool f(File element)) => _Collections.every(this, f); | |
| 20240 | |
| 20241 bool some(bool f(File element)) => _Collections.some(this, f); | |
| 20242 | |
| 20243 bool get isEmpty => this.length == 0; | |
| 20244 | |
| 20245 // From List<File>: | |
| 20246 | |
| 20247 void sort([Comparator<File> compare = Comparable.compare]) { | |
| 20248 throw new UnsupportedError("Cannot sort immutable List."); | |
| 20249 } | |
| 20250 | |
| 20251 int indexOf(File element, [int start = 0]) => | |
| 20252 _Lists.indexOf(this, element, start, this.length); | |
| 20253 | |
| 20254 int lastIndexOf(File element, [int start]) { | |
| 20255 if (start == null) start = length - 1; | |
| 20256 return _Lists.lastIndexOf(this, element, start); | |
| 20257 } | |
| 20258 | |
| 20259 File get first => this[0]; | |
| 20260 | |
| 20261 File get last => this[length - 1]; | |
| 20262 | |
| 20263 File removeLast() { | |
| 20264 throw new UnsupportedError("Cannot removeLast on immutable List."); | |
| 20265 } | |
| 20266 | |
| 20267 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) { | |
| 20268 throw new UnsupportedError("Cannot setRange on immutable List."); | |
| 20269 } | |
| 20270 | |
| 20271 void removeRange(int start, int rangeLength) { | |
| 20272 throw new UnsupportedError("Cannot removeRange on immutable List."); | |
| 20273 } | |
| 20274 | |
| 20275 void insertRange(int start, int rangeLength, [File initialValue]) { | |
| 20276 throw new UnsupportedError("Cannot insertRange on immutable List."); | |
| 20277 } | |
| 20278 | |
| 20279 List<File> getRange(int start, int rangeLength) => | |
| 20280 _Lists.getRange(this, start, rangeLength, <File>[]); | |
| 20281 | |
| 20282 // -- end List<File> mixins. | |
| 20283 | |
| 20284 /// @domName FileList.item; @docsEditable true | |
| 20285 File item(int index) native; | |
| 20286 } | |
| 20287 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 20288 // for details. All rights reserved. Use of this source code is governed by a | |
| 20289 // BSD-style license that can be found in the LICENSE file. | |
| 20290 | |
| 20291 | |
| 20292 class _FileReaderFactoryProvider { | 20291 class _FileReaderFactoryProvider { |
| 20293 static FileReader createFileReader() => | 20292 static FileReader createFileReader() => |
| 20294 JS('FileReader', 'new FileReader()' ); | 20293 JS('FileReader', 'new FileReader()' ); |
| 20295 } | 20294 } |
| 20296 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20295 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 20297 // for details. All rights reserved. Use of this source code is governed by a | 20296 // for details. All rights reserved. Use of this source code is governed by a |
| 20298 // BSD-style license that can be found in the LICENSE file. | 20297 // BSD-style license that can be found in the LICENSE file. |
| 20299 | 20298 |
| 20300 | 20299 |
| 20301 class _FileReaderSyncFactoryProvider { | 20300 class _FileReaderSyncFactoryProvider { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20348 } | 20347 } |
| 20349 | 20348 |
| 20350 void addLast(Gamepad value) { | 20349 void addLast(Gamepad value) { |
| 20351 throw new UnsupportedError("Cannot add to immutable List."); | 20350 throw new UnsupportedError("Cannot add to immutable List."); |
| 20352 } | 20351 } |
| 20353 | 20352 |
| 20354 void addAll(Collection<Gamepad> collection) { | 20353 void addAll(Collection<Gamepad> collection) { |
| 20355 throw new UnsupportedError("Cannot add to immutable List."); | 20354 throw new UnsupportedError("Cannot add to immutable List."); |
| 20356 } | 20355 } |
| 20357 | 20356 |
| 20358 bool contains(Gamepad element) => _Collections.contains(this, element); | 20357 bool contains(Gamepad element) => Collections.contains(this, element); |
| 20359 | 20358 |
| 20360 void forEach(void f(Gamepad element)) => _Collections.forEach(this, f); | 20359 void forEach(void f(Gamepad element)) => Collections.forEach(this, f); |
| 20361 | 20360 |
| 20362 Collection map(f(Gamepad element)) => _Collections.map(this, [], f); | 20361 Collection map(f(Gamepad element)) => Collections.map(this, [], f); |
| 20363 | 20362 |
| 20364 Collection<Gamepad> filter(bool f(Gamepad element)) => | 20363 Collection<Gamepad> filter(bool f(Gamepad element)) => |
| 20365 _Collections.filter(this, <Gamepad>[], f); | 20364 Collections.filter(this, <Gamepad>[], f); |
| 20366 | 20365 |
| 20367 bool every(bool f(Gamepad element)) => _Collections.every(this, f); | 20366 bool every(bool f(Gamepad element)) => Collections.every(this, f); |
| 20368 | 20367 |
| 20369 bool some(bool f(Gamepad element)) => _Collections.some(this, f); | 20368 bool some(bool f(Gamepad element)) => Collections.some(this, f); |
| 20370 | 20369 |
| 20371 bool get isEmpty => this.length == 0; | 20370 bool get isEmpty => this.length == 0; |
| 20372 | 20371 |
| 20373 // From List<Gamepad>: | 20372 // From List<Gamepad>: |
| 20374 | 20373 |
| 20375 void sort([Comparator<Gamepad> compare = Comparable.compare]) { | 20374 void sort([Comparator<Gamepad> compare = Comparable.compare]) { |
| 20376 throw new UnsupportedError("Cannot sort immutable List."); | 20375 throw new UnsupportedError("Cannot sort immutable List."); |
| 20377 } | 20376 } |
| 20378 | 20377 |
| 20379 int indexOf(Gamepad element, [int start = 0]) => | 20378 int indexOf(Gamepad element, [int start = 0]) => |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20500 } | 20499 } |
| 20501 | 20500 |
| 20502 void addLast(MediaStream value) { | 20501 void addLast(MediaStream value) { |
| 20503 throw new UnsupportedError("Cannot add to immutable List."); | 20502 throw new UnsupportedError("Cannot add to immutable List."); |
| 20504 } | 20503 } |
| 20505 | 20504 |
| 20506 void addAll(Collection<MediaStream> collection) { | 20505 void addAll(Collection<MediaStream> collection) { |
| 20507 throw new UnsupportedError("Cannot add to immutable List."); | 20506 throw new UnsupportedError("Cannot add to immutable List."); |
| 20508 } | 20507 } |
| 20509 | 20508 |
| 20510 bool contains(MediaStream element) => _Collections.contains(this, element); | 20509 bool contains(MediaStream element) => Collections.contains(this, element); |
| 20511 | 20510 |
| 20512 void forEach(void f(MediaStream element)) => _Collections.forEach(this, f); | 20511 void forEach(void f(MediaStream element)) => Collections.forEach(this, f); |
| 20513 | 20512 |
| 20514 Collection map(f(MediaStream element)) => _Collections.map(this, [], f); | 20513 Collection map(f(MediaStream element)) => Collections.map(this, [], f); |
| 20515 | 20514 |
| 20516 Collection<MediaStream> filter(bool f(MediaStream element)) => | 20515 Collection<MediaStream> filter(bool f(MediaStream element)) => |
| 20517 _Collections.filter(this, <MediaStream>[], f); | 20516 Collections.filter(this, <MediaStream>[], f); |
| 20518 | 20517 |
| 20519 bool every(bool f(MediaStream element)) => _Collections.every(this, f); | 20518 bool every(bool f(MediaStream element)) => Collections.every(this, f); |
| 20520 | 20519 |
| 20521 bool some(bool f(MediaStream element)) => _Collections.some(this, f); | 20520 bool some(bool f(MediaStream element)) => Collections.some(this, f); |
| 20522 | 20521 |
| 20523 bool get isEmpty => this.length == 0; | 20522 bool get isEmpty => this.length == 0; |
| 20524 | 20523 |
| 20525 // From List<MediaStream>: | 20524 // From List<MediaStream>: |
| 20526 | 20525 |
| 20527 void sort([Comparator<MediaStream> compare = Comparable.compare]) { | 20526 void sort([Comparator<MediaStream> compare = Comparable.compare]) { |
| 20528 throw new UnsupportedError("Cannot sort immutable List."); | 20527 throw new UnsupportedError("Cannot sort immutable List."); |
| 20529 } | 20528 } |
| 20530 | 20529 |
| 20531 int indexOf(MediaStream element, [int start = 0]) => | 20530 int indexOf(MediaStream element, [int start = 0]) => |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20634 } | 20633 } |
| 20635 | 20634 |
| 20636 void addLast(Node value) { | 20635 void addLast(Node value) { |
| 20637 throw new UnsupportedError("Cannot add to immutable List."); | 20636 throw new UnsupportedError("Cannot add to immutable List."); |
| 20638 } | 20637 } |
| 20639 | 20638 |
| 20640 void addAll(Collection<Node> collection) { | 20639 void addAll(Collection<Node> collection) { |
| 20641 throw new UnsupportedError("Cannot add to immutable List."); | 20640 throw new UnsupportedError("Cannot add to immutable List."); |
| 20642 } | 20641 } |
| 20643 | 20642 |
| 20644 bool contains(Node element) => _Collections.contains(this, element); | 20643 bool contains(Node element) => Collections.contains(this, element); |
| 20645 | 20644 |
| 20646 void forEach(void f(Node element)) => _Collections.forEach(this, f); | 20645 void forEach(void f(Node element)) => Collections.forEach(this, f); |
| 20647 | 20646 |
| 20648 Collection map(f(Node element)) => _Collections.map(this, [], f); | 20647 Collection map(f(Node element)) => Collections.map(this, [], f); |
| 20649 | 20648 |
| 20650 Collection<Node> filter(bool f(Node element)) => | 20649 Collection<Node> filter(bool f(Node element)) => |
| 20651 _Collections.filter(this, <Node>[], f); | 20650 Collections.filter(this, <Node>[], f); |
| 20652 | 20651 |
| 20653 bool every(bool f(Node element)) => _Collections.every(this, f); | 20652 bool every(bool f(Node element)) => Collections.every(this, f); |
| 20654 | 20653 |
| 20655 bool some(bool f(Node element)) => _Collections.some(this, f); | 20654 bool some(bool f(Node element)) => Collections.some(this, f); |
| 20656 | 20655 |
| 20657 bool get isEmpty => this.length == 0; | 20656 bool get isEmpty => this.length == 0; |
| 20658 | 20657 |
| 20659 // From List<Node>: | 20658 // From List<Node>: |
| 20660 | 20659 |
| 20661 void sort([Comparator<Node> compare = Comparable.compare]) { | 20660 void sort([Comparator<Node> compare = Comparable.compare]) { |
| 20662 throw new UnsupportedError("Cannot sort immutable List."); | 20661 throw new UnsupportedError("Cannot sort immutable List."); |
| 20663 } | 20662 } |
| 20664 | 20663 |
| 20665 int indexOf(Node element, [int start = 0]) => | 20664 int indexOf(Node element, [int start = 0]) => |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20851 } | 20850 } |
| 20852 | 20851 |
| 20853 void addLast(SpeechInputResult value) { | 20852 void addLast(SpeechInputResult value) { |
| 20854 throw new UnsupportedError("Cannot add to immutable List."); | 20853 throw new UnsupportedError("Cannot add to immutable List."); |
| 20855 } | 20854 } |
| 20856 | 20855 |
| 20857 void addAll(Collection<SpeechInputResult> collection) { | 20856 void addAll(Collection<SpeechInputResult> collection) { |
| 20858 throw new UnsupportedError("Cannot add to immutable List."); | 20857 throw new UnsupportedError("Cannot add to immutable List."); |
| 20859 } | 20858 } |
| 20860 | 20859 |
| 20861 bool contains(SpeechInputResult element) => _Collections.contains(this, elemen
t); | 20860 bool contains(SpeechInputResult element) => Collections.contains(this, element
); |
| 20862 | 20861 |
| 20863 void forEach(void f(SpeechInputResult element)) => _Collections.forEach(this,
f); | 20862 void forEach(void f(SpeechInputResult element)) => Collections.forEach(this, f
); |
| 20864 | 20863 |
| 20865 Collection map(f(SpeechInputResult element)) => _Collections.map(this, [], f); | 20864 Collection map(f(SpeechInputResult element)) => Collections.map(this, [], f); |
| 20866 | 20865 |
| 20867 Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) => | 20866 Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) => |
| 20868 _Collections.filter(this, <SpeechInputResult>[], f); | 20867 Collections.filter(this, <SpeechInputResult>[], f); |
| 20869 | 20868 |
| 20870 bool every(bool f(SpeechInputResult element)) => _Collections.every(this, f); | 20869 bool every(bool f(SpeechInputResult element)) => Collections.every(this, f); |
| 20871 | 20870 |
| 20872 bool some(bool f(SpeechInputResult element)) => _Collections.some(this, f); | 20871 bool some(bool f(SpeechInputResult element)) => Collections.some(this, f); |
| 20873 | 20872 |
| 20874 bool get isEmpty => this.length == 0; | 20873 bool get isEmpty => this.length == 0; |
| 20875 | 20874 |
| 20876 // From List<SpeechInputResult>: | 20875 // From List<SpeechInputResult>: |
| 20877 | 20876 |
| 20878 void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) { | 20877 void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) { |
| 20879 throw new UnsupportedError("Cannot sort immutable List."); | 20878 throw new UnsupportedError("Cannot sort immutable List."); |
| 20880 } | 20879 } |
| 20881 | 20880 |
| 20882 int indexOf(SpeechInputResult element, [int start = 0]) => | 20881 int indexOf(SpeechInputResult element, [int start = 0]) => |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20959 } | 20958 } |
| 20960 | 20959 |
| 20961 void addLast(SpeechRecognitionResult value) { | 20960 void addLast(SpeechRecognitionResult value) { |
| 20962 throw new UnsupportedError("Cannot add to immutable List."); | 20961 throw new UnsupportedError("Cannot add to immutable List."); |
| 20963 } | 20962 } |
| 20964 | 20963 |
| 20965 void addAll(Collection<SpeechRecognitionResult> collection) { | 20964 void addAll(Collection<SpeechRecognitionResult> collection) { |
| 20966 throw new UnsupportedError("Cannot add to immutable List."); | 20965 throw new UnsupportedError("Cannot add to immutable List."); |
| 20967 } | 20966 } |
| 20968 | 20967 |
| 20969 bool contains(SpeechRecognitionResult element) => _Collections.contains(this,
element); | 20968 bool contains(SpeechRecognitionResult element) => Collections.contains(this, e
lement); |
| 20970 | 20969 |
| 20971 void forEach(void f(SpeechRecognitionResult element)) => _Collections.forEach(
this, f); | 20970 void forEach(void f(SpeechRecognitionResult element)) => Collections.forEach(t
his, f); |
| 20972 | 20971 |
| 20973 Collection map(f(SpeechRecognitionResult element)) => _Collections.map(this, [
], f); | 20972 Collection map(f(SpeechRecognitionResult element)) => Collections.map(this, []
, f); |
| 20974 | 20973 |
| 20975 Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult elem
ent)) => | 20974 Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult elem
ent)) => |
| 20976 _Collections.filter(this, <SpeechRecognitionResult>[], f); | 20975 Collections.filter(this, <SpeechRecognitionResult>[], f); |
| 20977 | 20976 |
| 20978 bool every(bool f(SpeechRecognitionResult element)) => _Collections.every(this
, f); | 20977 bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this,
f); |
| 20979 | 20978 |
| 20980 bool some(bool f(SpeechRecognitionResult element)) => _Collections.some(this,
f); | 20979 bool some(bool f(SpeechRecognitionResult element)) => Collections.some(this, f
); |
| 20981 | 20980 |
| 20982 bool get isEmpty => this.length == 0; | 20981 bool get isEmpty => this.length == 0; |
| 20983 | 20982 |
| 20984 // From List<SpeechRecognitionResult>: | 20983 // From List<SpeechRecognitionResult>: |
| 20985 | 20984 |
| 20986 void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare])
{ | 20985 void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare])
{ |
| 20987 throw new UnsupportedError("Cannot sort immutable List."); | 20986 throw new UnsupportedError("Cannot sort immutable List."); |
| 20988 } | 20987 } |
| 20989 | 20988 |
| 20990 int indexOf(SpeechRecognitionResult element, [int start = 0]) => | 20989 int indexOf(SpeechRecognitionResult element, [int start = 0]) => |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21058 } | 21057 } |
| 21059 | 21058 |
| 21060 void addLast(StyleSheet value) { | 21059 void addLast(StyleSheet value) { |
| 21061 throw new UnsupportedError("Cannot add to immutable List."); | 21060 throw new UnsupportedError("Cannot add to immutable List."); |
| 21062 } | 21061 } |
| 21063 | 21062 |
| 21064 void addAll(Collection<StyleSheet> collection) { | 21063 void addAll(Collection<StyleSheet> collection) { |
| 21065 throw new UnsupportedError("Cannot add to immutable List."); | 21064 throw new UnsupportedError("Cannot add to immutable List."); |
| 21066 } | 21065 } |
| 21067 | 21066 |
| 21068 bool contains(StyleSheet element) => _Collections.contains(this, element); | 21067 bool contains(StyleSheet element) => Collections.contains(this, element); |
| 21069 | 21068 |
| 21070 void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f); | 21069 void forEach(void f(StyleSheet element)) => Collections.forEach(this, f); |
| 21071 | 21070 |
| 21072 Collection map(f(StyleSheet element)) => _Collections.map(this, [], f); | 21071 Collection map(f(StyleSheet element)) => Collections.map(this, [], f); |
| 21073 | 21072 |
| 21074 Collection<StyleSheet> filter(bool f(StyleSheet element)) => | 21073 Collection<StyleSheet> filter(bool f(StyleSheet element)) => |
| 21075 _Collections.filter(this, <StyleSheet>[], f); | 21074 Collections.filter(this, <StyleSheet>[], f); |
| 21076 | 21075 |
| 21077 bool every(bool f(StyleSheet element)) => _Collections.every(this, f); | 21076 bool every(bool f(StyleSheet element)) => Collections.every(this, f); |
| 21078 | 21077 |
| 21079 bool some(bool f(StyleSheet element)) => _Collections.some(this, f); | 21078 bool some(bool f(StyleSheet element)) => Collections.some(this, f); |
| 21080 | 21079 |
| 21081 bool get isEmpty => this.length == 0; | 21080 bool get isEmpty => this.length == 0; |
| 21082 | 21081 |
| 21083 // From List<StyleSheet>: | 21082 // From List<StyleSheet>: |
| 21084 | 21083 |
| 21085 void sort([Comparator<StyleSheet> compare = Comparable.compare]) { | 21084 void sort([Comparator<StyleSheet> compare = Comparable.compare]) { |
| 21086 throw new UnsupportedError("Cannot sort immutable List."); | 21085 throw new UnsupportedError("Cannot sort immutable List."); |
| 21087 } | 21086 } |
| 21088 | 21087 |
| 21089 int indexOf(StyleSheet element, [int start = 0]) => | 21088 int indexOf(StyleSheet element, [int start = 0]) => |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21181 } | 21180 } |
| 21182 | 21181 |
| 21183 void addLast(Animation value) { | 21182 void addLast(Animation value) { |
| 21184 throw new UnsupportedError("Cannot add to immutable List."); | 21183 throw new UnsupportedError("Cannot add to immutable List."); |
| 21185 } | 21184 } |
| 21186 | 21185 |
| 21187 void addAll(Collection<Animation> collection) { | 21186 void addAll(Collection<Animation> collection) { |
| 21188 throw new UnsupportedError("Cannot add to immutable List."); | 21187 throw new UnsupportedError("Cannot add to immutable List."); |
| 21189 } | 21188 } |
| 21190 | 21189 |
| 21191 bool contains(Animation element) => _Collections.contains(this, element); | 21190 bool contains(Animation element) => Collections.contains(this, element); |
| 21192 | 21191 |
| 21193 void forEach(void f(Animation element)) => _Collections.forEach(this, f); | 21192 void forEach(void f(Animation element)) => Collections.forEach(this, f); |
| 21194 | 21193 |
| 21195 Collection map(f(Animation element)) => _Collections.map(this, [], f); | 21194 Collection map(f(Animation element)) => Collections.map(this, [], f); |
| 21196 | 21195 |
| 21197 Collection<Animation> filter(bool f(Animation element)) => | 21196 Collection<Animation> filter(bool f(Animation element)) => |
| 21198 _Collections.filter(this, <Animation>[], f); | 21197 Collections.filter(this, <Animation>[], f); |
| 21199 | 21198 |
| 21200 bool every(bool f(Animation element)) => _Collections.every(this, f); | 21199 bool every(bool f(Animation element)) => Collections.every(this, f); |
| 21201 | 21200 |
| 21202 bool some(bool f(Animation element)) => _Collections.some(this, f); | 21201 bool some(bool f(Animation element)) => Collections.some(this, f); |
| 21203 | 21202 |
| 21204 bool get isEmpty => this.length == 0; | 21203 bool get isEmpty => this.length == 0; |
| 21205 | 21204 |
| 21206 // From List<Animation>: | 21205 // From List<Animation>: |
| 21207 | 21206 |
| 21208 void sort([Comparator<Animation> compare = Comparable.compare]) { | 21207 void sort([Comparator<Animation> compare = Comparable.compare]) { |
| 21209 throw new UnsupportedError("Cannot sort immutable List."); | 21208 throw new UnsupportedError("Cannot sort immutable List."); |
| 21210 } | 21209 } |
| 21211 | 21210 |
| 21212 int indexOf(Animation element, [int start = 0]) => | 21211 int indexOf(Animation element, [int start = 0]) => |
| (...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22686 canceller = window.clearInterval; | 22685 canceller = window.clearInterval; |
| 22687 } else { | 22686 } else { |
| 22688 maker = window.setTimeout; | 22687 maker = window.setTimeout; |
| 22689 canceller = window.clearTimeout; | 22688 canceller = window.clearTimeout; |
| 22690 } | 22689 } |
| 22691 Timer timer; | 22690 Timer timer; |
| 22692 final int id = maker(() { callback(timer); }, milliSeconds); | 22691 final int id = maker(() { callback(timer); }, milliSeconds); |
| 22693 timer = new _Timer(() { canceller(id); }); | 22692 timer = new _Timer(() { canceller(id); }); |
| 22694 return timer; | 22693 return timer; |
| 22695 }; | 22694 }; |
| 22696 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 22697 // for details. All rights reserved. Use of this source code is governed by a | |
| 22698 // BSD-style license that can be found in the LICENSE file. | |
| 22699 | |
| 22700 | |
| 22701 /** | |
| 22702 * The [Collections] class implements static methods useful when | |
| 22703 * writing a class that implements [Collection] and the [iterator] | |
| 22704 * method. | |
| 22705 */ | |
| 22706 class _Collections { | |
| 22707 static bool contains(Iterable<Object> iterable, Object element) { | |
| 22708 for (final e in iterable) { | |
| 22709 if (e == element) return true; | |
| 22710 } | |
| 22711 return false; | |
| 22712 } | |
| 22713 | |
| 22714 static void forEach(Iterable<Object> iterable, void f(Object o)) { | |
| 22715 for (final e in iterable) { | |
| 22716 f(e); | |
| 22717 } | |
| 22718 } | |
| 22719 | |
| 22720 static List map(Iterable<Object> source, | |
| 22721 List<Object> destination, | |
| 22722 f(o)) { | |
| 22723 for (final e in source) { | |
| 22724 destination.add(f(e)); | |
| 22725 } | |
| 22726 return destination; | |
| 22727 } | |
| 22728 | |
| 22729 static bool some(Iterable<Object> iterable, bool f(Object o)) { | |
| 22730 for (final e in iterable) { | |
| 22731 if (f(e)) return true; | |
| 22732 } | |
| 22733 return false; | |
| 22734 } | |
| 22735 | |
| 22736 static bool every(Iterable<Object> iterable, bool f(Object o)) { | |
| 22737 for (final e in iterable) { | |
| 22738 if (!f(e)) return false; | |
| 22739 } | |
| 22740 return true; | |
| 22741 } | |
| 22742 | |
| 22743 static List filter(Iterable<Object> source, | |
| 22744 List<Object> destination, | |
| 22745 bool f(o)) { | |
| 22746 for (final e in source) { | |
| 22747 if (f(e)) destination.add(e); | |
| 22748 } | |
| 22749 return destination; | |
| 22750 } | |
| 22751 | |
| 22752 static bool isEmpty(Iterable<Object> iterable) { | |
| 22753 return !iterable.iterator().hasNext; | |
| 22754 } | |
| 22755 } | |
| 22756 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22695 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 22757 // for details. All rights reserved. Use of this source code is governed by a | 22696 // for details. All rights reserved. Use of this source code is governed by a |
| 22758 // BSD-style license that can be found in the LICENSE file. | 22697 // BSD-style license that can be found in the LICENSE file. |
| 22759 | 22698 |
| 22760 | 22699 |
| 22761 class _HttpRequestUtils { | 22700 class _HttpRequestUtils { |
| 22762 | 22701 |
| 22763 // Helper for factory HttpRequest.get | 22702 // Helper for factory HttpRequest.get |
| 22764 static HttpRequest get(String url, | 22703 static HttpRequest get(String url, |
| 22765 onSuccess(HttpRequest request), | 22704 onSuccess(HttpRequest request), |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 23568 // with native names. | 23507 // with native names. |
| 23569 _convertDartToNative_ImageData(ImageData imageData) { | 23508 _convertDartToNative_ImageData(ImageData imageData) { |
| 23570 if (imageData is _TypedImageData) { | 23509 if (imageData is _TypedImageData) { |
| 23571 return JS('', '{data: #, height: #, width: #}', | 23510 return JS('', '{data: #, height: #, width: #}', |
| 23572 imageData.data, imageData.height, imageData.width); | 23511 imageData.data, imageData.height, imageData.width); |
| 23573 } | 23512 } |
| 23574 return imageData; | 23513 return imageData; |
| 23575 } | 23514 } |
| 23576 | 23515 |
| 23577 | 23516 |
| 23578 /// Converts a JavaScript object with properties into a Dart Map. | |
| 23579 /// Not suitable for nested objects. | |
| 23580 Map _convertNativeToDart_Dictionary(object) { | |
| 23581 if (object == null) return null; | |
| 23582 var dict = {}; | |
| 23583 for (final key in JS('=List', 'Object.getOwnPropertyNames(#)', object)) { | |
| 23584 dict[key] = JS('var', '#[#]', object, key); | |
| 23585 } | |
| 23586 return dict; | |
| 23587 } | |
| 23588 | |
| 23589 /// Converts a flat Dart map into a JavaScript object with properties. | |
| 23590 _convertDartToNative_Dictionary(Map dict) { | |
| 23591 if (dict == null) return null; | |
| 23592 var object = JS('var', '{}'); | |
| 23593 dict.forEach((String key, value) { | |
| 23594 JS('void', '#[#] = #', object, key, value); | |
| 23595 }); | |
| 23596 return object; | |
| 23597 } | |
| 23598 | |
| 23599 | |
| 23600 /** | |
| 23601 * Ensures that the input is a JavaScript Array. | |
| 23602 * | |
| 23603 * Creates a new JavaScript array if necessary, otherwise returns the original. | |
| 23604 */ | |
| 23605 List _convertDartToNative_StringArray(List<String> input) { | |
| 23606 // TODO(sra). Implement this. | |
| 23607 return input; | |
| 23608 } | |
| 23609 | |
| 23610 | |
| 23611 // ----------------------------------------------------------------------------- | 23517 // ----------------------------------------------------------------------------- |
| 23612 | 23518 |
| 23613 /** | 23519 /** |
| 23614 * Converts a native IDBKey into a Dart object. | 23520 * Converts a native IDBKey into a Dart object. |
| 23615 * | 23521 * |
| 23616 * May return the original input. May mutate the original input (but will be | 23522 * May return the original input. May mutate the original input (but will be |
| 23617 * idempotent if mutation occurs). It is assumed that this conversion happens | 23523 * idempotent if mutation occurs). It is assumed that this conversion happens |
| 23618 * on native IDBKeys on all paths that return IDBKeys from native DOM calls. | 23524 * on native IDBKeys on all paths that return IDBKeys from native DOM calls. |
| 23619 * | 23525 * |
| 23620 * If necessary, JavaScript Dates are converted into Dart Dates. | 23526 * If necessary, JavaScript Dates are converted into Dart Dates. |
| 23621 */ | 23527 */ |
| 23622 _convertNativeToDart_IDBKey(nativeKey) { | 23528 _convertNativeToDart_IDBKey(nativeKey) { |
| 23623 containsDate(object) { | 23529 containsDate(object) { |
| 23624 if (_isJavaScriptDate(object)) return true; | 23530 if (isJavaScriptDate(object)) return true; |
| 23625 if (object is List) { | 23531 if (object is List) { |
| 23626 for (int i = 0; i < object.length; i++) { | 23532 for (int i = 0; i < object.length; i++) { |
| 23627 if (containsDate(object[i])) return true; | 23533 if (containsDate(object[i])) return true; |
| 23628 } | 23534 } |
| 23629 } | 23535 } |
| 23630 return false; // number, string. | 23536 return false; // number, string. |
| 23631 } | 23537 } |
| 23632 if (containsDate(nativeKey)) { | 23538 if (containsDate(nativeKey)) { |
| 23633 throw new UnimplementedError('IDBKey containing Date'); | 23539 throw new UnimplementedError('IDBKey containing Date'); |
| 23634 } | 23540 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 23646 */ | 23552 */ |
| 23647 _convertDartToNative_IDBKey(dartKey) { | 23553 _convertDartToNative_IDBKey(dartKey) { |
| 23648 // TODO: Implement. | 23554 // TODO: Implement. |
| 23649 return dartKey; | 23555 return dartKey; |
| 23650 } | 23556 } |
| 23651 | 23557 |
| 23652 | 23558 |
| 23653 | 23559 |
| 23654 /// May modify original. If so, action is idempotent. | 23560 /// May modify original. If so, action is idempotent. |
| 23655 _convertNativeToDart_IDBAny(object) { | 23561 _convertNativeToDart_IDBAny(object) { |
| 23656 return _convertNativeToDart_AcceptStructuredClone(object, mustCopy: false); | 23562 return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false); |
| 23657 } | |
| 23658 | |
| 23659 /// Converts a Dart value into a JavaScript SerializedScriptValue. | |
| 23660 _convertDartToNative_SerializedScriptValue(value) { | |
| 23661 return _convertDartToNative_PrepareForStructuredClone(value); | |
| 23662 } | |
| 23663 | |
| 23664 /// Since the source object may be viewed via a JavaScript event listener the | |
| 23665 /// original may not be modified. | |
| 23666 _convertNativeToDart_SerializedScriptValue(object) { | |
| 23667 return _convertNativeToDart_AcceptStructuredClone(object, mustCopy: true); | |
| 23668 } | 23563 } |
| 23669 | 23564 |
| 23670 | 23565 |
| 23671 /** | |
| 23672 * Converts a Dart value into a JavaScript SerializedScriptValue. Returns the | |
| 23673 * original input or a functional 'copy'. Does not mutate the original. | |
| 23674 * | |
| 23675 * The main transformation is the translation of Dart Maps are converted to | |
| 23676 * JavaScript Objects. | |
| 23677 * | |
| 23678 * The algorithm is essentially a dry-run of the structured clone algorithm | |
| 23679 * described at | |
| 23680 * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interf
aces.html#structured-clone | |
| 23681 * https://www.khronos.org/registry/typedarray/specs/latest/#9 | |
| 23682 * | |
| 23683 * Since the result of this function is expected to be passed only to JavaScript | |
| 23684 * operations that perform the structured clone algorithm which does not mutate | |
| 23685 * its output, the result may share structure with the input [value]. | |
| 23686 */ | |
| 23687 _convertDartToNative_PrepareForStructuredClone(value) { | |
| 23688 | |
| 23689 // TODO(sra): Replace slots with identity hash table. | |
| 23690 var values = []; | |
| 23691 var copies = []; // initially 'null', 'true' during initial DFS, then a copy. | |
| 23692 | |
| 23693 int findSlot(value) { | |
| 23694 int length = values.length; | |
| 23695 for (int i = 0; i < length; i++) { | |
| 23696 if (identical(values[i], value)) return i; | |
| 23697 } | |
| 23698 values.add(value); | |
| 23699 copies.add(null); | |
| 23700 return length; | |
| 23701 } | |
| 23702 readSlot(int i) => copies[i]; | |
| 23703 writeSlot(int i, x) { copies[i] = x; } | |
| 23704 cleanupSlots() {} // Will be needed if we mark objects with a property. | |
| 23705 | |
| 23706 // Returns the input, or a clone of the input. | |
| 23707 walk(e) { | |
| 23708 if (e == null) return e; | |
| 23709 if (e is bool) return e; | |
| 23710 if (e is num) return e; | |
| 23711 if (e is String) return e; | |
| 23712 if (e is Date) { | |
| 23713 // TODO(sra). | |
| 23714 throw new UnimplementedError('structured clone of Date'); | |
| 23715 } | |
| 23716 if (e is RegExp) { | |
| 23717 // TODO(sra). | |
| 23718 throw new UnimplementedError('structured clone of RegExp'); | |
| 23719 } | |
| 23720 | |
| 23721 // The browser's internal structured cloning algorithm will copy certain | |
| 23722 // types of object, but it will copy only its own implementations and not | |
| 23723 // just any Dart implementations of the interface. | |
| 23724 | |
| 23725 // TODO(sra): The JavaScript objects suitable for direct cloning by the | |
| 23726 // structured clone algorithm could be tagged with an private interface. | |
| 23727 | |
| 23728 if (e is File) return e; | |
| 23729 if (e is Blob) return e; | |
| 23730 if (e is _FileList) return e; | |
| 23731 | |
| 23732 // TODO(sra): Firefox: How to convert _TypedImageData on the other end? | |
| 23733 if (e is ImageData) return e; | |
| 23734 if (e is ArrayBuffer) return e; | |
| 23735 | |
| 23736 if (e is ArrayBufferView) return e; | |
| 23737 | |
| 23738 if (e is Map) { | |
| 23739 var slot = findSlot(e); | |
| 23740 var copy = readSlot(slot); | |
| 23741 if (copy != null) return copy; | |
| 23742 copy = JS('var', '{}'); | |
| 23743 writeSlot(slot, copy); | |
| 23744 e.forEach((key, value) { | |
| 23745 JS('void', '#[#] = #', copy, key, walk(value)); | |
| 23746 }); | |
| 23747 return copy; | |
| 23748 } | |
| 23749 | |
| 23750 if (e is List) { | |
| 23751 // Since a JavaScript Array is an instance of Dart List it is possible to | |
| 23752 // avoid making a copy of the list if there is no need to copy anything | |
| 23753 // reachable from the array. We defer creating a new array until a cycle | |
| 23754 // is detected or a subgraph was copied. | |
| 23755 int length = e.length; | |
| 23756 var slot = findSlot(e); | |
| 23757 var copy = readSlot(slot); | |
| 23758 if (copy != null) { | |
| 23759 if (true == copy) { // Cycle, so commit to making a copy. | |
| 23760 copy = JS('=List', 'new Array(#)', length); | |
| 23761 writeSlot(slot, copy); | |
| 23762 } | |
| 23763 return copy; | |
| 23764 } | |
| 23765 | |
| 23766 int i = 0; | |
| 23767 | |
| 23768 if (_isJavaScriptArray(e) && | |
| 23769 // We have to copy immutable lists, otherwise the structured clone | |
| 23770 // algorithm will copy the .immutable$list marker property, making the | |
| 23771 // list immutable when received! | |
| 23772 !_isImmutableJavaScriptArray(e)) { | |
| 23773 writeSlot(slot, true); // Deferred copy. | |
| 23774 for ( ; i < length; i++) { | |
| 23775 var element = e[i]; | |
| 23776 var elementCopy = walk(element); | |
| 23777 if (!identical(elementCopy, element)) { | |
| 23778 copy = readSlot(slot); // Cyclic reference may have created it. | |
| 23779 if (true == copy) { | |
| 23780 copy = JS('=List', 'new Array(#)', length); | |
| 23781 writeSlot(slot, copy); | |
| 23782 } | |
| 23783 for (int j = 0; j < i; j++) { | |
| 23784 copy[j] = e[j]; | |
| 23785 } | |
| 23786 copy[i] = elementCopy; | |
| 23787 i++; | |
| 23788 break; | |
| 23789 } | |
| 23790 } | |
| 23791 if (copy == null) { | |
| 23792 copy = e; | |
| 23793 writeSlot(slot, copy); | |
| 23794 } | |
| 23795 } else { | |
| 23796 // Not a JavaScript Array. We are forced to make a copy. | |
| 23797 copy = JS('=List', 'new Array(#)', length); | |
| 23798 writeSlot(slot, copy); | |
| 23799 } | |
| 23800 | |
| 23801 for ( ; i < length; i++) { | |
| 23802 copy[i] = walk(e[i]); | |
| 23803 } | |
| 23804 return copy; | |
| 23805 } | |
| 23806 | |
| 23807 throw new UnimplementedError('structured clone of other type'); | |
| 23808 } | |
| 23809 | |
| 23810 var copy = walk(value); | |
| 23811 cleanupSlots(); | |
| 23812 return copy; | |
| 23813 } | |
| 23814 | |
| 23815 /** | |
| 23816 * Converts a native value into a Dart object. | |
| 23817 * | |
| 23818 * If [mustCopy] is [:false:], may return the original input. May mutate the | |
| 23819 * original input (but will be idempotent if mutation occurs). It is assumed | |
| 23820 * that this conversion happens on native serializable script values such values | |
| 23821 * from native DOM calls. | |
| 23822 * | |
| 23823 * [object] is the result of a structured clone operation. | |
| 23824 * | |
| 23825 * If necessary, JavaScript Dates are converted into Dart Dates. | |
| 23826 * | |
| 23827 * If [mustCopy] is [:true:], the entire object is copied and the original input | |
| 23828 * is not mutated. This should be the case where Dart and JavaScript code can | |
| 23829 * access the value, for example, via multiple event listeners for | |
| 23830 * MessageEvents. Mutating the object to make it more 'Dart-like' would corrupt | |
| 23831 * the value as seen from the JavaScript listeners. | |
| 23832 */ | |
| 23833 _convertNativeToDart_AcceptStructuredClone(object, {mustCopy = false}) { | |
| 23834 | |
| 23835 // TODO(sra): Replace slots with identity hash table that works on non-dart | |
| 23836 // objects. | |
| 23837 var values = []; | |
| 23838 var copies = []; | |
| 23839 | |
| 23840 int findSlot(value) { | |
| 23841 int length = values.length; | |
| 23842 for (int i = 0; i < length; i++) { | |
| 23843 if (identical(values[i], value)) return i; | |
| 23844 } | |
| 23845 values.add(value); | |
| 23846 copies.add(null); | |
| 23847 return length; | |
| 23848 } | |
| 23849 readSlot(int i) => copies[i]; | |
| 23850 writeSlot(int i, x) { copies[i] = x; } | |
| 23851 | |
| 23852 walk(e) { | |
| 23853 if (e == null) return e; | |
| 23854 if (e is bool) return e; | |
| 23855 if (e is num) return e; | |
| 23856 if (e is String) return e; | |
| 23857 | |
| 23858 if (_isJavaScriptDate(e)) { | |
| 23859 // TODO(sra). | |
| 23860 throw new UnimplementedError('structured clone of Date'); | |
| 23861 } | |
| 23862 | |
| 23863 if (_isJavaScriptRegExp(e)) { | |
| 23864 // TODO(sra). | |
| 23865 throw new UnimplementedError('structured clone of RegExp'); | |
| 23866 } | |
| 23867 | |
| 23868 if (_isJavaScriptSimpleObject(e)) { | |
| 23869 // TODO(sra): If mustCopy is false, swizzle the prototype for one of a Map | |
| 23870 // implementation that uses the properies as storage. | |
| 23871 var slot = findSlot(e); | |
| 23872 var copy = readSlot(slot); | |
| 23873 if (copy != null) return copy; | |
| 23874 copy = {}; | |
| 23875 | |
| 23876 writeSlot(slot, copy); | |
| 23877 for (final key in JS('=List', 'Object.keys(#)', e)) { | |
| 23878 copy[key] = walk(JS('var', '#[#]', e, key)); | |
| 23879 } | |
| 23880 return copy; | |
| 23881 } | |
| 23882 | |
| 23883 if (_isJavaScriptArray(e)) { | |
| 23884 var slot = findSlot(e); | |
| 23885 var copy = readSlot(slot); | |
| 23886 if (copy != null) return copy; | |
| 23887 | |
| 23888 int length = e.length; | |
| 23889 // Since a JavaScript Array is an instance of Dart List, we can modify it | |
| 23890 // in-place unless we must copy. | |
| 23891 copy = mustCopy ? JS('=List', 'new Array(#)', length) : e; | |
| 23892 writeSlot(slot, copy); | |
| 23893 | |
| 23894 for (int i = 0; i < length; i++) { | |
| 23895 copy[i] = walk(e[i]); | |
| 23896 } | |
| 23897 return copy; | |
| 23898 } | |
| 23899 | |
| 23900 // Assume anything else is already a valid Dart object, either by having | |
| 23901 // already been processed, or e.g. a clonable native class. | |
| 23902 return e; | |
| 23903 } | |
| 23904 | |
| 23905 var copy = walk(object); | |
| 23906 return copy; | |
| 23907 } | |
| 23908 | |
| 23909 | |
| 23910 bool _isJavaScriptDate(value) => JS('bool', '# instanceof Date', value); | |
| 23911 bool _isJavaScriptRegExp(value) => JS('bool', '# instanceof RegExp', value); | |
| 23912 bool _isJavaScriptArray(value) => JS('bool', '# instanceof Array', value); | |
| 23913 bool _isJavaScriptSimpleObject(value) => | |
| 23914 JS('bool', 'Object.getPrototypeOf(#) === Object.prototype', value); | |
| 23915 bool _isImmutableJavaScriptArray(value) => | |
| 23916 JS('bool', r'!!(#.immutable$list)', value); | |
| 23917 | |
| 23918 | |
| 23919 | |
| 23920 const String _serializedScriptValue = | |
| 23921 'num|String|bool|' | |
| 23922 '=List|=Object|' | |
| 23923 'Blob|File|ArrayBuffer|ArrayBufferView' | |
| 23924 // TODO(sra): Add Date, RegExp. | |
| 23925 ; | |
| 23926 const _annotation_Creates_SerializedScriptValue = | |
| 23927 const Creates(_serializedScriptValue); | |
| 23928 const _annotation_Returns_SerializedScriptValue = | |
| 23929 const Returns(_serializedScriptValue); | |
| 23930 | |
| 23931 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. | 23566 const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date. |
| 23932 const _annotation_Creates_IDBKey = const Creates(_idbKey); | 23567 const _annotation_Creates_IDBKey = const Creates(_idbKey); |
| 23933 const _annotation_Returns_IDBKey = const Returns(_idbKey); | 23568 const _annotation_Returns_IDBKey = const Returns(_idbKey); |
| 23934 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 23569 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 23935 // for details. All rights reserved. Use of this source code is governed by a | 23570 // for details. All rights reserved. Use of this source code is governed by a |
| 23936 // BSD-style license that can be found in the LICENSE file. | 23571 // BSD-style license that can be found in the LICENSE file. |
| 23937 | 23572 |
| 23938 | 23573 |
| 23939 // TODO(vsm): Unify with Dartium version. | 23574 // TODO(vsm): Unify with Dartium version. |
| 23940 class _DOMWindowCrossFrame implements Window { | 23575 class _DOMWindowCrossFrame implements Window { |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24459 if (length < 0) throw new ArgumentError('length'); | 24094 if (length < 0) throw new ArgumentError('length'); |
| 24460 if (start < 0) throw new RangeError.value(start); | 24095 if (start < 0) throw new RangeError.value(start); |
| 24461 int end = start + length; | 24096 int end = start + length; |
| 24462 if (end > a.length) throw new RangeError.value(end); | 24097 if (end > a.length) throw new RangeError.value(end); |
| 24463 for (int i = start; i < end; i++) { | 24098 for (int i = start; i < end; i++) { |
| 24464 accumulator.add(a[i]); | 24099 accumulator.add(a[i]); |
| 24465 } | 24100 } |
| 24466 return accumulator; | 24101 return accumulator; |
| 24467 } | 24102 } |
| 24468 } | 24103 } |
| OLD | NEW |