| 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..003459f5bd98e22400b4e7af438b3dbd364b3ee3 100644
|
| --- a/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
|
| +++ b/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
|
| @@ -6,6 +6,62 @@
|
| // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
|
| // Auto-generated dart:svg library.
|
|
|
| +/**
|
| + * A client-side key-value store with support for indexes.
|
| + *
|
| + * Many browsers provide an indexed database,
|
| + * which web apps can use to store data in the client.
|
| + * Client-side storage provides apps with
|
| + * off-line functionality, better performance,
|
| + * and the ability to cache the app's state between invocations.
|
| + * To find out which browsers support indexed database,
|
| + * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb)
|
| + *
|
| + * In an indexed database each record is identified by a unique index or key,
|
| + * making data retrieval speedy.
|
| + * You can store large amounts of structured data,
|
| + * such as images, arrays, maps, and objects using IndexedDB.
|
| + * The standard does not specify size limits for individual data items
|
| + * or for the database itself, but browsers may impose storage limits.
|
| + *
|
| + * 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 with [IdbFactory.supported]:
|
| + *
|
| + * if (IdbFactory.supported)
|
| + * // Use indexeddb.
|
| + * else
|
| + * // Find an alternative.
|
| + *
|
| + * Open an indexed database using the `indexedDB` object
|
| + * provided by 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
|
| + *
|
| + * Other client-side data stores include:
|
| + *
|
| + * * [Window.localStorage]—a
|
| + * basic mechanism in which data is stored as a [Map].
|
| + *
|
| + * * [dart:web_sql]—a database that can be queried with SQL.
|
| + *
|
| + * For a tutorial about using the indexed_db library,
|
| + * check out
|
| + * [Use IndexedDB](https://www.dartlang.org/docs/tutorials/indexeddb/).
|
| + */
|
| library dart.dom.indexed_db;
|
|
|
| import 'dart:async';
|
|
|