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

Unified Diff: sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate

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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate
diff --git a/sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate b/sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate
index d55f7c7fdd752e039ed0bcbf86dc79ac76ffd5c7..53145eaca51b17224e837a35c1a4c914fb3e0e03 100644
--- a/sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/indexed_db_dart2js.darttemplate
@@ -58,6 +58,23 @@ class _KeyRangeFactoryProvider {
cls, lower, upper, lowerOpen, upperOpen);
}
+// Conversions for IDBKey.
+//
+// Per http://www.w3.org/TR/IndexedDB/#key-construct
+//
+// "A value is said to be a valid key if it is one of the following types: Array
+// JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float
+// [WEBIDL]. However Arrays are only valid keys if every item in the array is
+// defined and is a valid key (i.e. sparse arrays can not be valid keys) and if
+// the Array doesn't directly or indirectly contain itself. Any non-numeric
+// properties are ignored, and thus does not affect whether the Array is a valid
+// key. Additionally, if the value is of type float, it is only a valid key if
+// it is not NaN, and if the value is of type Date it is only a valid key if its
+// [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN."
+
+// What is required is to ensure that an Lists in the key are actually
+// JavaScript arrays, and any Dates are JavaScript Dates.
+
/**
* Converts a native IDBKey into a Dart object.

Powered by Google App Engine
This is Rietveld 408576698