OLD | NEW |
1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
2 | 2 |
3 import 'dart:async'; | 3 import 'dart:async'; |
4 import 'dart:html'; | 4 import 'dart:html'; |
5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
6 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; | 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; |
8 import 'dart:_foreign_helper' show JS; | 8 import 'dart:_foreign_helper' show JS; |
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
10 // for details. All rights reserved. Use of this source code is governed by a | 10 // for details. All rights reserved. Use of this source code is governed by a |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 @DocsEditable | 298 @DocsEditable |
299 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 299 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
300 | 300 |
301 @DomName('IDBDatabase.close') | 301 @DomName('IDBDatabase.close') |
302 @DocsEditable | 302 @DocsEditable |
303 void close() native; | 303 void close() native; |
304 | 304 |
305 @DomName('IDBDatabase.createObjectStore') | 305 @DomName('IDBDatabase.createObjectStore') |
306 @DocsEditable | 306 @DocsEditable |
307 ObjectStore $dom_createObjectStore(String name, [Map options]) { | 307 ObjectStore $dom_createObjectStore(String name, [Map options]) { |
308 if (?options) { | 308 if (options != null) { |
309 var options_1 = convertDartToNative_Dictionary(options); | 309 var options_1 = convertDartToNative_Dictionary(options); |
310 return _$dom_createObjectStore_1(name, options_1); | 310 return _$dom_createObjectStore_1(name, options_1); |
311 } | 311 } |
312 return _$dom_createObjectStore_2(name); | 312 return _$dom_createObjectStore_2(name); |
313 } | 313 } |
314 @JSName('createObjectStore') | 314 @JSName('createObjectStore') |
315 @DomName('IDBDatabase.createObjectStore') | 315 @DomName('IDBDatabase.createObjectStore') |
316 @DocsEditable | 316 @DocsEditable |
317 ObjectStore _$dom_createObjectStore_1(name, options) native; | 317 ObjectStore _$dom_createObjectStore_1(name, options) native; |
318 @JSName('createObjectStore') | 318 @JSName('createObjectStore') |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 @DomName('IDBObjectStore.transaction') | 871 @DomName('IDBObjectStore.transaction') |
872 @DocsEditable | 872 @DocsEditable |
873 final Transaction transaction; | 873 final Transaction transaction; |
874 | 874 |
875 @DomName('IDBObjectStore.add') | 875 @DomName('IDBObjectStore.add') |
876 @DocsEditable | 876 @DocsEditable |
877 @Returns('Request') | 877 @Returns('Request') |
878 @Creates('Request') | 878 @Creates('Request') |
879 @_annotation_Creates_IDBKey | 879 @_annotation_Creates_IDBKey |
880 Request $dom_add(/*any*/ value, [/*any*/ key]) { | 880 Request $dom_add(/*any*/ value, [/*any*/ key]) { |
881 if (?key) { | 881 if (key != null) { |
882 var value_1 = convertDartToNative_SerializedScriptValue(value); | 882 var value_1 = convertDartToNative_SerializedScriptValue(value); |
883 var key_2 = convertDartToNative_SerializedScriptValue(key); | 883 var key_2 = convertDartToNative_SerializedScriptValue(key); |
884 return _$dom_add_1(value_1, key_2); | 884 return _$dom_add_1(value_1, key_2); |
885 } | 885 } |
886 var value_3 = convertDartToNative_SerializedScriptValue(value); | 886 var value_3 = convertDartToNative_SerializedScriptValue(value); |
887 return _$dom_add_2(value_3); | 887 return _$dom_add_2(value_3); |
888 } | 888 } |
889 @JSName('add') | 889 @JSName('add') |
890 @DomName('IDBObjectStore.add') | 890 @DomName('IDBObjectStore.add') |
891 @DocsEditable | 891 @DocsEditable |
(...skipping 15 matching lines...) Expand all Loading... |
907 Request $dom_clear() native; | 907 Request $dom_clear() native; |
908 | 908 |
909 @JSName('count') | 909 @JSName('count') |
910 @DomName('IDBObjectStore.count') | 910 @DomName('IDBObjectStore.count') |
911 @DocsEditable | 911 @DocsEditable |
912 Request $dom_count([key_OR_range]) native; | 912 Request $dom_count([key_OR_range]) native; |
913 | 913 |
914 @DomName('IDBObjectStore.createIndex') | 914 @DomName('IDBObjectStore.createIndex') |
915 @DocsEditable | 915 @DocsEditable |
916 Index $dom_createIndex(String name, keyPath, [Map options]) { | 916 Index $dom_createIndex(String name, keyPath, [Map options]) { |
917 if ((keyPath is List<String> || keyPath == null) && !?options) { | 917 if ((keyPath is List<String> || keyPath == null) && options == null) { |
918 List keyPath_1 = convertDartToNative_StringArray(keyPath); | 918 List keyPath_1 = convertDartToNative_StringArray(keyPath); |
919 return _$dom_createIndex_1(name, keyPath_1); | 919 return _$dom_createIndex_1(name, keyPath_1); |
920 } | 920 } |
921 if ((keyPath is List<String> || keyPath == null) && ?options) { | 921 if (options != null && (keyPath is List<String> || keyPath == null)) { |
922 List keyPath_2 = convertDartToNative_StringArray(keyPath); | 922 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
923 var options_3 = convertDartToNative_Dictionary(options); | 923 var options_3 = convertDartToNative_Dictionary(options); |
924 return _$dom_createIndex_2(name, keyPath_2, options_3); | 924 return _$dom_createIndex_2(name, keyPath_2, options_3); |
925 } | 925 } |
926 if ((keyPath is String || keyPath == null) && !?options) { | 926 if ((keyPath is String || keyPath == null) && options == null) { |
927 return _$dom_createIndex_3(name, keyPath); | 927 return _$dom_createIndex_3(name, keyPath); |
928 } | 928 } |
929 if ((keyPath is String || keyPath == null) && ?options) { | 929 if (options != null && (keyPath is String || keyPath == null)) { |
930 var options_4 = convertDartToNative_Dictionary(options); | 930 var options_4 = convertDartToNative_Dictionary(options); |
931 return _$dom_createIndex_4(name, keyPath, options_4); | 931 return _$dom_createIndex_4(name, keyPath, options_4); |
932 } | 932 } |
933 throw new ArgumentError("Incorrect number or type of arguments"); | 933 throw new ArgumentError("Incorrect number or type of arguments"); |
934 } | 934 } |
935 @JSName('createIndex') | 935 @JSName('createIndex') |
936 @DomName('IDBObjectStore.createIndex') | 936 @DomName('IDBObjectStore.createIndex') |
937 @DocsEditable | 937 @DocsEditable |
938 Index _$dom_createIndex_1(name, List keyPath) native; | 938 Index _$dom_createIndex_1(name, List keyPath) native; |
939 @JSName('createIndex') | 939 @JSName('createIndex') |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 @Creates('Request') | 977 @Creates('Request') |
978 @Creates('Cursor') | 978 @Creates('Cursor') |
979 Request $dom_openCursor([key_OR_range, String direction]) native; | 979 Request $dom_openCursor([key_OR_range, String direction]) native; |
980 | 980 |
981 @DomName('IDBObjectStore.put') | 981 @DomName('IDBObjectStore.put') |
982 @DocsEditable | 982 @DocsEditable |
983 @Returns('Request') | 983 @Returns('Request') |
984 @Creates('Request') | 984 @Creates('Request') |
985 @_annotation_Creates_IDBKey | 985 @_annotation_Creates_IDBKey |
986 Request $dom_put(/*any*/ value, [/*any*/ key]) { | 986 Request $dom_put(/*any*/ value, [/*any*/ key]) { |
987 if (?key) { | 987 if (key != null) { |
988 var value_1 = convertDartToNative_SerializedScriptValue(value); | 988 var value_1 = convertDartToNative_SerializedScriptValue(value); |
989 var key_2 = convertDartToNative_SerializedScriptValue(key); | 989 var key_2 = convertDartToNative_SerializedScriptValue(key); |
990 return _$dom_put_1(value_1, key_2); | 990 return _$dom_put_1(value_1, key_2); |
991 } | 991 } |
992 var value_3 = convertDartToNative_SerializedScriptValue(value); | 992 var value_3 = convertDartToNative_SerializedScriptValue(value); |
993 return _$dom_put_2(value_3); | 993 return _$dom_put_2(value_3); |
994 } | 994 } |
995 @JSName('put') | 995 @JSName('put') |
996 @DomName('IDBObjectStore.put') | 996 @DomName('IDBObjectStore.put') |
997 @DocsEditable | 997 @DocsEditable |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1258 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1259 // for details. All rights reserved. Use of this source code is governed by a | 1259 // for details. All rights reserved. Use of this source code is governed by a |
1260 // BSD-style license that can be found in the LICENSE file. | 1260 // BSD-style license that can be found in the LICENSE file. |
1261 | 1261 |
1262 | 1262 |
1263 @DocsEditable | 1263 @DocsEditable |
1264 @DomName('IDBAny') | 1264 @DomName('IDBAny') |
1265 @deprecated // nonstandard | 1265 @deprecated // nonstandard |
1266 abstract class _IDBAny native "IDBAny" { | 1266 abstract class _IDBAny native "IDBAny" { |
1267 } | 1267 } |
OLD | NEW |