从 Chrome 存储中获取全部 Keys:Values
Get all Keys:Values from Chrome Storage
我通过将 null 作为对象传递,从 Chrome 存储中获取了所有密钥。
例如,
chrome.storage.local.get(null, callbackFunction); //list of Object property
是否有类似的方法从 Chrome 存储中获取所有 属性:属性Values 对?
chrome.storage.local.get(null, function(items) {
for (key in items) {
//do stuffs here
}
});
我通过for循环实现
我通过将 null 作为对象传递,从 Chrome 存储中获取了所有密钥。
例如,
chrome.storage.local.get(null, callbackFunction); //list of Object property
是否有类似的方法从 Chrome 存储中获取所有 属性:属性Values 对?
chrome.storage.local.get(null, function(items) {
for (key in items) {
//do stuffs here
}
});
我通过for循环实现