storage.js: Rename Storage.subscribe to onChange

This commit is contained in:
Johannes Meyer 2019-07-10 07:33:07 +02:00
parent c5beabf891
commit 363486277b

View File

@ -103,7 +103,7 @@
* *
* @returns {void} * @returns {void}
*/ */
subscribe: function(key, callback, context) { onChange: function(key, callback, context) {
this.subscribers[this.prefixKey(key)] = [callback, context]; this.subscribers[this.prefixKey(key)] = [callback, context];
}, },
@ -217,7 +217,7 @@
this.storage = storage; this.storage = storage;
this.key = key; this.key = key;
storage.subscribe(key, this.onChange, this); storage.onChange(key, this.onChange, this);
return this; return this;
}, },