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

Unified Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 23681003: added library-level description for dart:indexed_db (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index 44b179e74b25353297e8ab6613077a5b22a4b542..6aead819437a32a0e162219bf73486bd36ed256e 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -1,3 +1,37 @@
+/**
+ * A client-side storage mechanism with efficient data retrieval and search.
sethladd 2013/08/28 14:41:54 How about being more explicit that this is a key-v
mem 2013/08/29 08:07:07 Done.
+ *
+ * The classes in this library provide an interface
+ * to the browser's indexed database, if it has one.
sethladd 2013/08/28 14:41:54 Can you define an indexed database here or close t
mem 2013/08/29 08:07:07 Done.
+ * To use this library in your code:
+ *
+ * import 'dart:indexed_db';
+ *
+ * A web app can determine if the browser has an
+ * indexed database by using the `supported` property from
+ * the [IdbFactory] class:
+ *
+ * if (IdbFactory.supported)
+ * // Use indexeddb.
+ * else
+ * // Find an alternative.
+ *
+ * Open an indexed database using the top-level [Window] object for the app.
+ * For example:
+ *
+ * Future open() {
+ * return window.indexedDB.open('myIndexedDB',
+ * version: 1,
+ * onUpgradeNeeded: /* Initalize the database. */ )
+ * .then( /* Load data from the database. */ );
+ * }
+ *
+ * ## Other resources
+ *
+ * For a tutorial about using this library,
+ * check out
+ * [Use IndexedDB](https://www.dartlang.org/docs/tutorials/indexeddb/).
sethladd 2013/08/28 14:41:54 Also, let's link to http://caniuse.com/#feat=index
mem 2013/08/29 08:07:07 Done.
+ */
library dart.dom.indexed_db;
import 'dart:async';

Powered by Google App Engine
This is Rietveld 408576698