📜  监听本地存储更改 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:44.795000             🧑  作者: Mango

代码示例3
var originalSetItem = localStorage.setItem; 
localStorage.setItem = function(){
    document.createEvent('Event').initEvent('itemInserted', true, true);
    originalSetItem.apply(this, arguments);
}