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

Unified Diff: samples/third_party/todomvc/web/lib-elements/polymer_localstorage.dart

Issue 76013002: "Reverting 30387" -- failures on IE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: samples/third_party/todomvc/web/lib-elements/polymer_localstorage.dart
diff --git a/samples/third_party/todomvc/web/lib-elements/polymer_localstorage.dart b/samples/third_party/todomvc/web/lib-elements/polymer_localstorage.dart
deleted file mode 100644
index 8590f2bf2b3173d0587eea398af3113def8780a8..0000000000000000000000000000000000000000
--- a/samples/third_party/todomvc/web/lib-elements/polymer_localstorage.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Polymer Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-library todomvc.web.lib_elements.polymer_localstorage;
-
-import 'dart:convert' show JSON;
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('polymer-localstorage')
-class PolymerLocalStorage extends PolymerElement {
- @published String name;
- @published var value;
- @published bool useRaw = false;
-
- factory PolymerLocalStorage() => new Element.tag('polymer-localstorage');
- PolymerLocalStorage.created() : super.created();
-
- void ready() {
- load();
- }
-
- void valueChanged() {
- save();
- }
-
- void load() {
- var s = window.localStorage[name];
- if (s != null && !useRaw) {
- value = JSON.decode(s);
- } else {
- value = s;
- }
- }
-
- void save() {
- window.localStorage[name] = useRaw ? value : JSON.encode(value);
- }
-}
« no previous file with comments | « samples/third_party/todomvc/web/index.html ('k') | samples/third_party/todomvc/web/lib-elements/polymer_localstorage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698