| 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:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 142 } |
| 143 | 143 |
| 144 | 144 |
| 145 // To suppress missing implicit constructor warnings. | 145 // To suppress missing implicit constructor warnings. |
| 146 factory Database._() { throw new UnsupportedError("Not supported"); } | 146 factory Database._() { throw new UnsupportedError("Not supported"); } |
| 147 | 147 |
| 148 @DomName('IDBDatabase.abortEvent') | 148 @DomName('IDBDatabase.abortEvent') |
| 149 @DocsEditable() | 149 @DocsEditable() |
| 150 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); | 150 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); |
| 151 | 151 |
| 152 @DomName('IDBDatabase.closeEvent') |
| 153 @DocsEditable() |
| 154 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 |
| 155 @Experimental() |
| 156 static const EventStreamProvider<Event> closeEvent = const EventStreamProvider
<Event>('close'); |
| 157 |
| 152 @DomName('IDBDatabase.errorEvent') | 158 @DomName('IDBDatabase.errorEvent') |
| 153 @DocsEditable() | 159 @DocsEditable() |
| 154 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 160 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 155 | 161 |
| 156 @DomName('IDBDatabase.versionchangeEvent') | 162 @DomName('IDBDatabase.versionchangeEvent') |
| 157 @DocsEditable() | 163 @DocsEditable() |
| 158 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons
t EventStreamProvider<VersionChangeEvent>('versionchange'); | 164 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons
t EventStreamProvider<VersionChangeEvent>('versionchange'); |
| 159 | 165 |
| 160 @DomName('IDBDatabase.name') | 166 @DomName('IDBDatabase.name') |
| 161 @DocsEditable() | 167 @DocsEditable() |
| 162 String get name native "IDBDatabase_name_Getter"; | 168 String get name native "IDBDatabase_name_Getter"; |
| 163 | 169 |
| 164 @DomName('IDBDatabase.objectStoreNames') | 170 @DomName('IDBDatabase.objectStoreNames') |
| 165 @DocsEditable() | 171 @DocsEditable() |
| 166 List<String> get objectStoreNames native "IDBDatabase_objectStoreNames_Getter"
; | 172 List<String> get objectStoreNames native "IDBDatabase_objectStoreNames_Getter"
; |
| 167 | 173 |
| 168 @DomName('IDBDatabase.version') | 174 @DomName('IDBDatabase.version') |
| 169 @DocsEditable() | 175 @DocsEditable() |
| 170 dynamic get version native "IDBDatabase_version_Getter"; | 176 dynamic get version native "IDBDatabase_version_Getter"; |
| 171 | 177 |
| 172 @DomName('IDBDatabase.addEventListener') | |
| 173 @DocsEditable() | |
| 174 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "IDBDatabase_addEventListener_Callback"; | |
| 175 | |
| 176 @DomName('IDBDatabase.close') | 178 @DomName('IDBDatabase.close') |
| 177 @DocsEditable() | 179 @DocsEditable() |
| 178 void close() native "IDBDatabase_close_Callback"; | 180 void close() native "IDBDatabase_close_Callback"; |
| 179 | 181 |
| 180 @DomName('IDBDatabase.createObjectStore') | 182 @DomName('IDBDatabase.createObjectStore') |
| 181 @DocsEditable() | 183 @DocsEditable() |
| 182 ObjectStore $dom_createObjectStore(String name, [Map options]) native "IDBData
base_createObjectStore_Callback"; | 184 ObjectStore $dom_createObjectStore(String name, [Map options]) native "IDBData
base_createObjectStore_Callback"; |
| 183 | 185 |
| 184 @DomName('IDBDatabase.deleteObjectStore') | 186 @DomName('IDBDatabase.deleteObjectStore') |
| 185 @DocsEditable() | 187 @DocsEditable() |
| 186 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; | 188 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; |
| 187 | 189 |
| 188 @DomName('IDBDatabase.dispatchEvent') | |
| 189 @DocsEditable() | |
| 190 bool dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback"; | |
| 191 | |
| 192 @DomName('IDBDatabase.removeEventListener') | |
| 193 @DocsEditable() | |
| 194 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBDatabase_removeEventListener_Callback"; | |
| 195 | |
| 196 Transaction transaction(storeName_OR_storeNames, String mode) { | 190 Transaction transaction(storeName_OR_storeNames, String mode) { |
| 197 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { | 191 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { |
| 198 return _transaction_1(storeName_OR_storeNames, mode); | 192 return _transaction_1(storeName_OR_storeNames, mode); |
| 199 } | 193 } |
| 200 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { | 194 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { |
| 201 return _transaction_2(storeName_OR_storeNames, mode); | 195 return _transaction_2(storeName_OR_storeNames, mode); |
| 202 } | 196 } |
| 203 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { | 197 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { |
| 204 return _transaction_3(storeName_OR_storeNames, mode); | 198 return _transaction_3(storeName_OR_storeNames, mode); |
| 205 } | 199 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 221 Transaction transactionStore(String storeName, String mode) native "IDBDatabas
e_transactionStore_Callback"; | 215 Transaction transactionStore(String storeName, String mode) native "IDBDatabas
e_transactionStore_Callback"; |
| 222 | 216 |
| 223 @DomName('IDBDatabase.transactionStores') | 217 @DomName('IDBDatabase.transactionStores') |
| 224 @DocsEditable() | 218 @DocsEditable() |
| 225 Transaction transactionStores(List<String> storeNames, String mode) native "ID
BDatabase_transactionStores_Callback"; | 219 Transaction transactionStores(List<String> storeNames, String mode) native "ID
BDatabase_transactionStores_Callback"; |
| 226 | 220 |
| 227 @DomName('IDBDatabase.onabort') | 221 @DomName('IDBDatabase.onabort') |
| 228 @DocsEditable() | 222 @DocsEditable() |
| 229 Stream<Event> get onAbort => abortEvent.forTarget(this); | 223 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 230 | 224 |
| 225 @DomName('IDBDatabase.onclose') |
| 226 @DocsEditable() |
| 227 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 |
| 228 @Experimental() |
| 229 Stream<Event> get onClose => closeEvent.forTarget(this); |
| 230 |
| 231 @DomName('IDBDatabase.onerror') | 231 @DomName('IDBDatabase.onerror') |
| 232 @DocsEditable() | 232 @DocsEditable() |
| 233 Stream<Event> get onError => errorEvent.forTarget(this); | 233 Stream<Event> get onError => errorEvent.forTarget(this); |
| 234 | 234 |
| 235 @DomName('IDBDatabase.onversionchange') | 235 @DomName('IDBDatabase.onversionchange') |
| 236 @DocsEditable() | 236 @DocsEditable() |
| 237 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget
(this); | 237 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget
(this); |
| 238 } | 238 } |
| 239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 240 // for details. All rights reserved. Use of this source code is governed by a | 240 // for details. All rights reserved. Use of this source code is governed by a |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 910 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 911 // for details. All rights reserved. Use of this source code is governed by a | 911 // for details. All rights reserved. Use of this source code is governed by a |
| 912 // BSD-style license that can be found in the LICENSE file. | 912 // BSD-style license that can be found in the LICENSE file. |
| 913 | 913 |
| 914 // WARNING: Do not edit - generated code. | 914 // WARNING: Do not edit - generated code. |
| 915 | 915 |
| 916 | 916 |
| 917 @DocsEditable() | 917 @DocsEditable() |
| 918 @DomName('IDBOpenDBRequest') | 918 @DomName('IDBOpenDBRequest') |
| 919 @Unstable() | 919 @Unstable() |
| 920 class OpenDBRequest extends Request implements EventTarget { | 920 class OpenDBRequest extends Request { |
| 921 // To suppress missing implicit constructor warnings. | 921 // To suppress missing implicit constructor warnings. |
| 922 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); } | 922 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); } |
| 923 | 923 |
| 924 @DomName('IDBOpenDBRequest.blockedEvent') | 924 @DomName('IDBOpenDBRequest.blockedEvent') |
| 925 @DocsEditable() | 925 @DocsEditable() |
| 926 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); | 926 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid
er<Event>('blocked'); |
| 927 | 927 |
| 928 @DomName('IDBOpenDBRequest.upgradeneededEvent') | 928 @DomName('IDBOpenDBRequest.upgradeneededEvent') |
| 929 @DocsEditable() | 929 @DocsEditable() |
| 930 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); | 930 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons
t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 dynamic get result native "IDBRequest_result_Getter"; | 973 dynamic get result native "IDBRequest_result_Getter"; |
| 974 | 974 |
| 975 @DomName('IDBRequest.source') | 975 @DomName('IDBRequest.source') |
| 976 @DocsEditable() | 976 @DocsEditable() |
| 977 dynamic get source native "IDBRequest_source_Getter"; | 977 dynamic get source native "IDBRequest_source_Getter"; |
| 978 | 978 |
| 979 @DomName('IDBRequest.transaction') | 979 @DomName('IDBRequest.transaction') |
| 980 @DocsEditable() | 980 @DocsEditable() |
| 981 Transaction get transaction native "IDBRequest_transaction_Getter"; | 981 Transaction get transaction native "IDBRequest_transaction_Getter"; |
| 982 | 982 |
| 983 @DomName('IDBRequest.addEventListener') | |
| 984 @DocsEditable() | |
| 985 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "IDBRequest_addEventListener_Callback"; | |
| 986 | |
| 987 @DomName('IDBRequest.dispatchEvent') | |
| 988 @DocsEditable() | |
| 989 bool dispatchEvent(Event evt) native "IDBRequest_dispatchEvent_Callback"; | |
| 990 | |
| 991 @DomName('IDBRequest.removeEventListener') | |
| 992 @DocsEditable() | |
| 993 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBRequest_removeEventListener_Callback"; | |
| 994 | |
| 995 @DomName('IDBRequest.onerror') | 983 @DomName('IDBRequest.onerror') |
| 996 @DocsEditable() | 984 @DocsEditable() |
| 997 Stream<Event> get onError => errorEvent.forTarget(this); | 985 Stream<Event> get onError => errorEvent.forTarget(this); |
| 998 | 986 |
| 999 @DomName('IDBRequest.onsuccess') | 987 @DomName('IDBRequest.onsuccess') |
| 1000 @DocsEditable() | 988 @DocsEditable() |
| 1001 Stream<Event> get onSuccess => successEvent.forTarget(this); | 989 Stream<Event> get onSuccess => successEvent.forTarget(this); |
| 1002 | 990 |
| 1003 } | 991 } |
| 1004 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 992 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 DomError get error native "IDBTransaction_error_Getter"; | 1047 DomError get error native "IDBTransaction_error_Getter"; |
| 1060 | 1048 |
| 1061 @DomName('IDBTransaction.mode') | 1049 @DomName('IDBTransaction.mode') |
| 1062 @DocsEditable() | 1050 @DocsEditable() |
| 1063 String get mode native "IDBTransaction_mode_Getter"; | 1051 String get mode native "IDBTransaction_mode_Getter"; |
| 1064 | 1052 |
| 1065 @DomName('IDBTransaction.abort') | 1053 @DomName('IDBTransaction.abort') |
| 1066 @DocsEditable() | 1054 @DocsEditable() |
| 1067 void abort() native "IDBTransaction_abort_Callback"; | 1055 void abort() native "IDBTransaction_abort_Callback"; |
| 1068 | 1056 |
| 1069 @DomName('IDBTransaction.addEventListener') | |
| 1070 @DocsEditable() | |
| 1071 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native "IDBTransaction_addEventListener_Callback"; | |
| 1072 | |
| 1073 @DomName('IDBTransaction.dispatchEvent') | |
| 1074 @DocsEditable() | |
| 1075 bool dispatchEvent(Event evt) native "IDBTransaction_dispatchEvent_Callback"; | |
| 1076 | |
| 1077 @DomName('IDBTransaction.objectStore') | 1057 @DomName('IDBTransaction.objectStore') |
| 1078 @DocsEditable() | 1058 @DocsEditable() |
| 1079 ObjectStore objectStore(String name) native "IDBTransaction_objectStore_Callba
ck"; | 1059 ObjectStore objectStore(String name) native "IDBTransaction_objectStore_Callba
ck"; |
| 1080 | 1060 |
| 1081 @DomName('IDBTransaction.removeEventListener') | |
| 1082 @DocsEditable() | |
| 1083 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBTransaction_removeEventListener_Callback"; | |
| 1084 | |
| 1085 @DomName('IDBTransaction.onabort') | 1061 @DomName('IDBTransaction.onabort') |
| 1086 @DocsEditable() | 1062 @DocsEditable() |
| 1087 Stream<Event> get onAbort => abortEvent.forTarget(this); | 1063 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 1088 | 1064 |
| 1089 @DomName('IDBTransaction.oncomplete') | 1065 @DomName('IDBTransaction.oncomplete') |
| 1090 @DocsEditable() | 1066 @DocsEditable() |
| 1091 Stream<Event> get onComplete => completeEvent.forTarget(this); | 1067 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 1092 | 1068 |
| 1093 @DomName('IDBTransaction.onerror') | 1069 @DomName('IDBTransaction.onerror') |
| 1094 @DocsEditable() | 1070 @DocsEditable() |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 | 1105 |
| 1130 // WARNING: Do not edit - generated code. | 1106 // WARNING: Do not edit - generated code. |
| 1131 | 1107 |
| 1132 | 1108 |
| 1133 @DocsEditable() | 1109 @DocsEditable() |
| 1134 @DomName('IDBAny') | 1110 @DomName('IDBAny') |
| 1135 @deprecated // nonstandard | 1111 @deprecated // nonstandard |
| 1136 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1112 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1137 | 1113 |
| 1138 } | 1114 } |
| OLD | NEW |