OLD | NEW |
| (Empty) |
1 <!-- | |
2 @license | |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | |
7 Code distributed by Google as part of the polymer project is also | |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | |
9 --><html><head><link rel="import" href="../polymer/polymer.html"> | |
10 | |
11 <!-- | |
12 Element access to Web Storage API (window.localStorage). | |
13 | |
14 Keeps `value` is sync with a localStorage key. | |
15 | |
16 Direct assignments to `value` are automatically detected and saved. | |
17 Subproperty assignments are not (ex: `value.bar='foo'`). | |
18 Call `save()` manually to commit your changes after modifying subproperties. | |
19 | |
20 Value is saved in localStorage as JSON by default. | |
21 | |
22 If you set the value to null, storage key will be deleted. | |
23 | |
24 <iron-localstorage name="my-app-storage" value="{{value}}"> | |
25 </iron-localstorage> | |
26 | |
27 | |
28 <b>Warning</b>: do not pass subproperty bindings to iron-localstorage until Poly
mer | |
29 [bug 1550](https://github.com/Polymer/polymer/issues/1550) | |
30 is resolved. Local storage will be blown away. | |
31 No `<iron-localstorage value="{{foo.bar}}"`. | |
32 | |
33 @group Iron Elements | |
34 @demo demo/index.html | |
35 @hero hero.svg | |
36 @element iron-localstorage | |
37 --> | |
38 </head><body><dom-module id="iron-localstorage"></dom-module> | |
39 <script src="iron-localstorage-extracted.js"></script></body></html> | |
OLD | NEW |