I found this thread that answers partially:
Listen for changes with localStorage on the same window
Although it works in Chrome, I still wasn't able to figure out how to work on Firefox or IE.
答案 0 :(得分:0)
Storage
接口在受其影响的全局对象上发出storage
事件。
window.addEventListener("storage", function () {
// your code
}, false);
使用setItem
时也会触发此事件。