WebStorage events

This commit is contained in:
Belen Curcio
2017-05-15 12:52:54 -03:00
parent 370cdf8c09
commit 57ced201eb
+5 -4
View File
@@ -82,7 +82,8 @@ export function clear() {
}
}
window.addEventListener('storage', function(e) {
const msg = `${e.key} " was changed in page ${e.url} from ${e.oldValue} to ${e.newValue}`;
console.log(msg);
});
// Enable this to debug WEB Storage events
// window.addEventListener('storage', function(e) {
// const msg = `${e.key} " was changed in page ${e.url} from ${e.oldValue} to ${e.newValue}`;
// console.log(msg);
// });