| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
| 4 This code may only be used under the BSD style license found at http://polym
er.github.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/CO
NTRIBUTORS.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/P
ATENTS.txt | |
| 9 --> | |
| 10 <!doctype html> | |
| 11 <html> | |
| 12 <head> | |
| 13 | |
| 14 <title>polymer-localstorage</title> | |
| 15 | |
| 16 <script src="../webcomponentsjs/webcomponents.js"></script> | |
| 17 | |
| 18 <link rel="import" href="core-localstorage.html"> | |
| 19 | |
| 20 </head> | |
| 21 <body> | |
| 22 | |
| 23 <x-test1></x-test1> | |
| 24 | |
| 25 <polymer-element name="x-test1" noscript> | |
| 26 <template> | |
| 27 string entered below will be stored in localStorage and automatically retr
ived from localStorage when the page is reloaded<br> | |
| 28 <input value="{{value}}"> | |
| 29 <core-localstorage name="polymer-localstorage-x-test1" value="{{value}}"><
/core-localstorage> | |
| 30 </template> | |
| 31 </polymer-element> | |
| 32 | |
| 33 <br><br> | |
| 34 | |
| 35 <x-test2></x-test2> | |
| 36 | |
| 37 <polymer-element name="x-test2"> | |
| 38 <template> | |
| 39 <input type="checkbox" checked="{{mode}}"> | |
| 40 <core-localstorage name="polymer-localstorage-x-test2" value="{{mode}}"></
core-localstorage> | |
| 41 </template> | |
| 42 <script> | |
| 43 Polymer('x-test2', { | |
| 44 mode: false | |
| 45 }); | |
| 46 </script> | |
| 47 </polymer-element> | |
| 48 | |
| 49 </body> | |
| 50 </html> | |
| OLD | NEW |