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

Side by Side Diff: sdk/lib/html/doc/interface/Storage.dartdoc

Issue 11691009: Moved most of html lib generating scripts into tools. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/doc/interface/Node.dartdoc ('k') | sdk/lib/html/doc/interface/UIEvent.dartdoc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// @domName Storage
6 /**
7 * The type used by the
8 * [Window.localStorage] and [Window.sessionStorage] properties.
9 * Storage is implemented as a Map<String, String>.
10 *
11 * To store and get values, use Dart's built-in map syntax:
12 *
13 * window.localStorage['key1'] = 'val1';
14 * window.localStorage['key2'] = 'val2';
15 * window.localStorage['key3'] = 'val3';
16 * assert(window.localStorage['key3'] == 'val3');
17 *
18 * You can use [Map](http://api.dartlang.org/dart_core/Map.html) APIs
19 * such as containsValue(), clear(), and length:
20 *
21 * assert(window.localStorage.containsValue('does not exist') == false);
22 * window.localStorage.clear();
23 * assert(window.localStorage.length == 0);
24 *
25 * For more examples of using this API, see
26 * [localstorage_test.dart](http://code.google.com/p/dart/source/browse/branches /bleeding_edge/dart/tests/html/localstorage_test.dart).
27 * For details on using the Map API, see the
28 * [Maps](http://www.dartlang.org/docs/library-tour/#maps-aka-dictionaries-or-ha shes)
29 * section of the library tour.
30 *
31 */
32 abstract class Storage implements Map<String, String> {
33
34 /** @domName Storage.length */
35 abstract int get $dom_length;
36
37 /** @domName Storage.clear */
38 void $dom_clear();
39
40 /** @domName Storage.getItem */
41 String $dom_getItem(String key);
42
43 /** @domName Storage.key */
44 String $dom_key(int index);
45
46 /** @domName Storage.removeItem */
47 void $dom_removeItem(String key);
48
49 /** @domName Storage.setItem */
50 void $dom_setItem(String key, String data);
51
52 }
OLDNEW
« no previous file with comments | « sdk/lib/html/doc/interface/Node.dartdoc ('k') | sdk/lib/html/doc/interface/UIEvent.dartdoc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698