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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 11419300: Dartifying dart:html type names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unminifying & fixing Stephen's feedback. Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 library indexed_db; 1 library indexed_db;
2 2
3 import 'dart:html'; 3 import 'dart:html';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6 // for details. All rights reserved. Use of this source code is governed by a 6 // for details. All rights reserved. Use of this source code is governed by a
7 // BSD-style license that can be found in the LICENSE file. 7 // BSD-style license that can be found in the LICENSE file.
8 8
9 // DO NOT EDIT 9 // DO NOT EDIT
10 // Auto-generated dart:svg library. 10 // Auto-generated dart:svg library.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 JS('KeyRange', '#.lowerBound(#, #)', cls, bound, open); 52 JS('KeyRange', '#.lowerBound(#, #)', cls, bound, open);
53 53
54 static KeyRange _upperBound(cls, bound, open) => 54 static KeyRange _upperBound(cls, bound, open) =>
55 JS('KeyRange', '#.upperBound(#, #)', cls, bound, open); 55 JS('KeyRange', '#.upperBound(#, #)', cls, bound, open);
56 56
57 static KeyRange _bound(cls, lower, upper, lowerOpen, upperOpen) => 57 static KeyRange _bound(cls, lower, upper, lowerOpen, upperOpen) =>
58 JS('KeyRange', '#.bound(#, #, #, #)', 58 JS('KeyRange', '#.bound(#, #, #, #)',
59 cls, lower, upper, lowerOpen, upperOpen); 59 cls, lower, upper, lowerOpen, upperOpen);
60 } 60 }
61 61
62 // Conversions for IDBKey.
63 //
64 // Per http://www.w3.org/TR/IndexedDB/#key-construct
65 //
66 // "A value is said to be a valid key if it is one of the following types: Array
67 // JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float
68 // [WEBIDL]. However Arrays are only valid keys if every item in the array is
69 // defined and is a valid key (i.e. sparse arrays can not be valid keys) and if
70 // the Array doesn't directly or indirectly contain itself. Any non-numeric
71 // properties are ignored, and thus does not affect whether the Array is a valid
72 // key. Additionally, if the value is of type float, it is only a valid key if
73 // it is not NaN, and if the value is of type Date it is only a valid key if its
74 // [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN."
75
76 // What is required is to ensure that an Lists in the key are actually
77 // JavaScript arrays, and any Dates are JavaScript Dates.
78
62 79
63 /** 80 /**
64 * Converts a native IDBKey into a Dart object. 81 * Converts a native IDBKey into a Dart object.
65 * 82 *
66 * May return the original input. May mutate the original input (but will be 83 * May return the original input. May mutate the original input (but will be
67 * idempotent if mutation occurs). It is assumed that this conversion happens 84 * idempotent if mutation occurs). It is assumed that this conversion happens
68 * on native IDBKeys on all paths that return IDBKeys from native DOM calls. 85 * on native IDBKeys on all paths that return IDBKeys from native DOM calls.
69 * 86 *
70 * If necessary, JavaScript Dates are converted into Dart Dates. 87 * If necessary, JavaScript Dates are converted into Dart Dates.
71 */ 88 */
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 257
241 258
242 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true 259 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true
243 DatabaseEvents get on => 260 DatabaseEvents get on =>
244 new DatabaseEvents(this); 261 new DatabaseEvents(this);
245 262
246 /// @domName IDBDatabase.name; @docsEditable true 263 /// @domName IDBDatabase.name; @docsEditable true
247 final String name; 264 final String name;
248 265
249 /// @domName IDBDatabase.objectStoreNames; @docsEditable true 266 /// @domName IDBDatabase.objectStoreNames; @docsEditable true
250 @Returns('_DOMStringList') @Creates('_DOMStringList') 267 @Returns('_DomStringList') @Creates('_DomStringList')
251 final List<String> objectStoreNames; 268 final List<String> objectStoreNames;
252 269
253 /// @domName IDBDatabase.version; @docsEditable true 270 /// @domName IDBDatabase.version; @docsEditable true
254 final dynamic version; 271 final dynamic version;
255 272
256 /// @domName IDBDatabase.addEventListener; @docsEditable true 273 /// @domName IDBDatabase.addEventListener; @docsEditable true
257 @JSName('addEventListener') 274 @JSName('addEventListener')
258 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 275 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
259 276
260 /// @domName IDBDatabase.close; @docsEditable true 277 /// @domName IDBDatabase.close; @docsEditable true
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 // BSD-style license that can be found in the LICENSE file. 674 // BSD-style license that can be found in the LICENSE file.
658 675
659 676
660 /// @domName IDBObjectStore; @docsEditable true 677 /// @domName IDBObjectStore; @docsEditable true
661 class ObjectStore native "*IDBObjectStore" { 678 class ObjectStore native "*IDBObjectStore" {
662 679
663 /// @domName IDBObjectStore.autoIncrement; @docsEditable true 680 /// @domName IDBObjectStore.autoIncrement; @docsEditable true
664 final bool autoIncrement; 681 final bool autoIncrement;
665 682
666 /// @domName IDBObjectStore.indexNames; @docsEditable true 683 /// @domName IDBObjectStore.indexNames; @docsEditable true
667 @Returns('_DOMStringList') @Creates('_DOMStringList') 684 @Returns('_DomStringList') @Creates('_DomStringList')
668 final List<String> indexNames; 685 final List<String> indexNames;
669 686
670 /// @domName IDBObjectStore.keyPath; @docsEditable true 687 /// @domName IDBObjectStore.keyPath; @docsEditable true
671 final dynamic keyPath; 688 final dynamic keyPath;
672 689
673 /// @domName IDBObjectStore.name; @docsEditable true 690 /// @domName IDBObjectStore.name; @docsEditable true
674 final String name; 691 final String name;
675 692
676 /// @domName IDBObjectStore.transaction; @docsEditable true 693 /// @domName IDBObjectStore.transaction; @docsEditable true
677 final Transaction transaction; 694 final Transaction transaction;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 888
872 889
873 /// @domName IDBRequest; @docsEditable true 890 /// @domName IDBRequest; @docsEditable true
874 class Request extends EventTarget native "*IDBRequest" { 891 class Request extends EventTarget native "*IDBRequest" {
875 892
876 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true 893 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true
877 RequestEvents get on => 894 RequestEvents get on =>
878 new RequestEvents(this); 895 new RequestEvents(this);
879 896
880 /// @domName IDBRequest.error; @docsEditable true 897 /// @domName IDBRequest.error; @docsEditable true
881 final DOMError error; 898 final DomError error;
882 899
883 /// @domName IDBRequest.errorCode; @docsEditable true 900 /// @domName IDBRequest.errorCode; @docsEditable true
884 final int errorCode; 901 final int errorCode;
885 902
886 /// @domName IDBRequest.readyState; @docsEditable true 903 /// @domName IDBRequest.readyState; @docsEditable true
887 final String readyState; 904 final String readyState;
888 905
889 /// @domName IDBRequest.result; @docsEditable true 906 /// @domName IDBRequest.result; @docsEditable true
890 dynamic get result => _convertNativeToDart_IDBAny(this._result); 907 dynamic get result => _convertNativeToDart_IDBAny(this._result);
891 @JSName('result') 908 @JSName('result')
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 static const int READ_ONLY = 0; 954 static const int READ_ONLY = 0;
938 955
939 static const int READ_WRITE = 1; 956 static const int READ_WRITE = 1;
940 957
941 static const int VERSION_CHANGE = 2; 958 static const int VERSION_CHANGE = 2;
942 959
943 /// @domName IDBTransaction.db; @docsEditable true 960 /// @domName IDBTransaction.db; @docsEditable true
944 final Database db; 961 final Database db;
945 962
946 /// @domName IDBTransaction.error; @docsEditable true 963 /// @domName IDBTransaction.error; @docsEditable true
947 final DOMError error; 964 final DomError error;
948 965
949 /// @domName IDBTransaction.mode; @docsEditable true 966 /// @domName IDBTransaction.mode; @docsEditable true
950 final String mode; 967 final String mode;
951 968
952 /// @domName IDBTransaction.abort; @docsEditable true 969 /// @domName IDBTransaction.abort; @docsEditable true
953 void abort() native; 970 void abort() native;
954 971
955 /// @domName IDBTransaction.addEventListener; @docsEditable true 972 /// @domName IDBTransaction.addEventListener; @docsEditable true
956 @JSName('addEventListener') 973 @JSName('addEventListener')
957 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 974 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true 1030 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true
1014 VersionChangeRequestEvents get on => 1031 VersionChangeRequestEvents get on =>
1015 new VersionChangeRequestEvents(this); 1032 new VersionChangeRequestEvents(this);
1016 } 1033 }
1017 1034
1018 class VersionChangeRequestEvents extends RequestEvents { 1035 class VersionChangeRequestEvents extends RequestEvents {
1019 VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr); 1036 VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr);
1020 1037
1021 EventListenerList get blocked => this['blocked']; 1038 EventListenerList get blocked => this['blocked'];
1022 } 1039 }
OLDNEW
« no previous file with comments | « sdk/lib/html/templates/html/impl/impl_IDBKeyRange.darttemplate ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698