admin管理员组文章数量:1332345
I got all keys from Chrome Storage by passing null as object.
For example,
chrome.storage.local.get(null, callbackFunction); //list of Object property
Is there any way similarly to get all property:propertyValues pairs from Chrome Storage?
I got all keys from Chrome Storage by passing null as object.
For example,
chrome.storage.local.get(null, callbackFunction); //list of Object property
Is there any way similarly to get all property:propertyValues pairs from Chrome Storage?
Share Improve this question edited Feb 21, 2016 at 13:06 D09r asked Feb 20, 2016 at 14:47 D09rD09r 1,4111 gold badge13 silver badges17 bronze badges 3-
1
What do you mean all
keys: values
? Chrome storage will return you a single object will all the stored data. – Dmitri Pavlutin Commented Feb 20, 2016 at 15:24 - I mean, how to get all property:propertyValues in an Object. – D09r Commented Feb 21, 2016 at 13:03
-
3
chrome.storage.local.get(function(items) { console.log(items) });
– Dmitri Pavlutin Commented Feb 21, 2016 at 13:48
1 Answer
Reset to default 8chrome.storage.local.get(null, function(items) {
for (key in items) {
//do stuffs here
}
});
I achieved through for loop
本文标签: javascriptGet all KeysValues from Chrome StorageStack Overflow
版权声明:本文标题:javascript - Get all Keys:Values from Chrome Storage - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742327327a2453985.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论