Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #6 from jeffposnick/master
Browse files Browse the repository at this point in the history
Add nameChanged handler
  • Loading branch information
frankiefu committed Nov 24, 2014
2 parents b324490 + b8dcdf8 commit 2e95667
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core-localstorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,15 @@
*/
autoSaveDisabled: false,

attached: function() {
// wait for bindings are all setup
this.async('load');
},

valueChanged: function() {
if (this.loaded && !this.autoSaveDisabled) {
this.save();
}
},

nameChanged: function() {
this.load();
},

load: function() {
var v = localStorage.getItem(this.name);
Expand Down

0 comments on commit 2e95667

Please sign in to comment.