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

Unified Diff: tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate

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: tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
diff --git a/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate b/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
index 4b6314f3df689ede0c820de2ccd7ecbf49ff865b..ff82fe304dbaa76d5e8b2827069010896d7aa995 100644
--- a/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
@@ -6,6 +6,40 @@
// https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
// Auto-generated dart:svg library.
+/**
+ * A client-side storage mechanism with efficient data retrieval and search.
+ *
+ * The classes in this library provide an interface
+ * to the browser's indexed database, if it has one.
+ * 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/).
+ */
library dart.dom.indexed_db;
import 'dart:async';

Powered by Google App Engine
This is Rietveld 408576698