var getItem = Storage.prototype.getItem;
Storage.prototype.getItem = function(key) {
if (this === window.localStorage && key==="extra_data") {
return {};
} else {
// fallback to default action
getItem.apply(this, arguments);
}
}
改变(重写)localStorage 的 get set 方法
最新推荐文章于 2024-01-30 14:38:46 发布
关键词由CSDN通过智能技术生成