Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

Issue 1762063002: Basline of dart2js w/ regen'd sdk/libs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * An API for storing data in the browser that can be queried with SQL. 2 * An API for storing data in the browser that can be queried with SQL.
3 * 3 *
4 * **Caution:** this specification is no longer actively maintained by the Web 4 * **Caution:** this specification is no longer actively maintained by the Web
5 * Applications Working Group and may be removed at any time. 5 * Applications Working Group and may be removed at any time.
6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /) 6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /)
7 * for more information. 7 * for more information.
8 * 8 *
9 * The [dart:indexed_db] APIs is a recommended alternatives. 9 * The [dart:indexed_db] APIs is a recommended alternatives.
10 */ 10 */
11 library dart.dom.web_sql; 11 library dart.dom.web_sql;
12 12
13 import 'dart:async'; 13 import 'dart:async';
14 import 'dart:collection'; 14 import 'dart:collection';
15 import 'dart:_internal'; 15 import 'dart:_internal';
16 import 'dart:html'; 16 import 'dart:html';
17 import 'dart:html_common'; 17 import 'dart:html_common';
18 import 'dart:_js_helper' show convertDartClosureToJS, Creates, JSName, Native;
19 import 'dart:_foreign_helper' show JS; 18 import 'dart:_foreign_helper' show JS;
20 import 'dart:_interceptors' show Interceptor; 19 import 'dart:_interceptors' show Interceptor;
21 // DO NOT EDIT - unless you are editing documentation as per: 20 // DO NOT EDIT - unless you are editing documentation as per:
22 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation 21 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
23 // Auto-generated dart:audio library. 22 // Auto-generated dart:audio library.
24 23
25 24
25 import 'dart:_js_helper' show convertDartClosureToJS, Creates, JSName, Native,
26 JavaScriptIndexingBehavior;
26 27
27 28
28 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 29 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
29 // for details. All rights reserved. Use of this source code is governed by a 30 // for details. All rights reserved. Use of this source code is governed by a
30 // BSD-style license that can be found in the LICENSE file. 31 // BSD-style license that can be found in the LICENSE file.
31 32
32 // WARNING: Do not edit - generated code. 33 // WARNING: Do not edit - generated code.
33 34
34 35
35 @DomName('SQLStatementCallback') 36 @DomName('SQLStatementCallback')
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 203 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
203 // for details. All rights reserved. Use of this source code is governed by a 204 // for details. All rights reserved. Use of this source code is governed by a
204 // BSD-style license that can be found in the LICENSE file. 205 // BSD-style license that can be found in the LICENSE file.
205 206
206 207
207 @DocsEditable() 208 @DocsEditable()
208 @DomName('SQLResultSetRowList') 209 @DomName('SQLResultSetRowList')
209 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 210 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
210 @Experimental() // deprecated 211 @Experimental() // deprecated
211 @Native("SQLResultSetRowList") 212 @Native("SQLResultSetRowList")
212 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements List<Map> { 213 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> {
213 // To suppress missing implicit constructor warnings. 214 // To suppress missing implicit constructor warnings.
214 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 215 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
215 216
216 @DomName('SQLResultSetRowList.length') 217 @DomName('SQLResultSetRowList.length')
217 @DocsEditable() 218 @DocsEditable()
218 int get length => JS("int", "#.length", this); 219 int get length => JS("int", "#.length", this);
219 220
220 Map operator[](int index) { 221 Map operator[](int index) {
221 if (JS("bool", "# >>> 0 !== # || # >= #", index, 222 if (JS("bool", "# >>> 0 !== # || # >= #", index,
222 index, index, length)) 223 index, index, length))
223 throw new RangeError.index(index, this); 224 throw new RangeError.index(index, this);
224 return this.item(index); 225 return JS("Map", "#[#]", this, index);
225 } 226 }
226 void operator[]=(int index, Map value) { 227 void operator[]=(int index, Map value) {
227 throw new UnsupportedError("Cannot assign element of immutable List."); 228 throw new UnsupportedError("Cannot assign element of immutable List.");
228 } 229 }
229 // -- start List<Map> mixins. 230 // -- start List<Map> mixins.
230 // Map is the element type. 231 // Map is the element type.
231 232
232 233
233 set length(int value) { 234 set length(int value) {
234 throw new UnsupportedError("Cannot resize immutable List."); 235 throw new UnsupportedError("Cannot resize immutable List.");
(...skipping 22 matching lines...) Expand all
257 if (len == 0) throw new StateError("No elements"); 258 if (len == 0) throw new StateError("No elements");
258 throw new StateError("More than one element"); 259 throw new StateError("More than one element");
259 } 260 }
260 261
261 Map elementAt(int index) => this[index]; 262 Map elementAt(int index) => this[index];
262 // -- end List<Map> mixins. 263 // -- end List<Map> mixins.
263 264
264 @DomName('SQLResultSetRowList.item') 265 @DomName('SQLResultSetRowList.item')
265 @DocsEditable() 266 @DocsEditable()
266 @Creates('=Object') 267 @Creates('=Object')
267 Map item(int index) { 268 Object item(int index) native;
268 return convertNativeToDart_Dictionary(_item_1(index));
269 }
270 @JSName('item')
271 @DomName('SQLResultSetRowList.item')
272 @DocsEditable()
273 @Creates('=Object')
274 _item_1(index) native;
275 } 269 }
276 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 270 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
277 // for details. All rights reserved. Use of this source code is governed by a 271 // for details. All rights reserved. Use of this source code is governed by a
278 // BSD-style license that can be found in the LICENSE file. 272 // BSD-style license that can be found in the LICENSE file.
279 273
280 274
281 @DocsEditable() 275 @DocsEditable()
282 @DomName('SQLTransaction') 276 @DomName('SQLTransaction')
283 @SupportedBrowser(SupportedBrowser.CHROME) 277 @SupportedBrowser(SupportedBrowser.CHROME)
284 @SupportedBrowser(SupportedBrowser.SAFARI) 278 @SupportedBrowser(SupportedBrowser.SAFARI)
285 @Experimental() 279 @Experimental()
286 // http://www.w3.org/TR/webdatabase/#sqltransaction 280 // http://www.w3.org/TR/webdatabase/#sqltransaction
287 @deprecated // deprecated 281 @deprecated // deprecated
288 @Native("SQLTransaction") 282 @Native("SQLTransaction")
289 class SqlTransaction extends Interceptor { 283 class SqlTransaction extends Interceptor {
290 // To suppress missing implicit constructor warnings. 284 // To suppress missing implicit constructor warnings.
291 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } 285 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
292 286
293 @DomName('SQLTransaction.executeSql') 287 @DomName('SQLTransaction.executeSql')
294 @DocsEditable() 288 @DocsEditable()
295 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) native; 289 void executeSql(String sqlStatement, [List arguments, SqlStatementCallback cal lback, SqlStatementErrorCallback errorCallback]) native;
296 } 290 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698