【发布时间】:2020-10-22 13:05:39
【问题描述】:
我有 4 件物品想要获得,但我不确定如何分开钥匙。使用逗号会出错。这是我的用法示例:
chrome.storage.sync.get({
'customImage',
'customColor',
'customRandColor',
'customRandImage'
}, function(backgroundCheckedOptions) {
document.getElementById('optionsCustomImage').checked = backgroundCheckedOptions.customImage;
document.getElementById('optionsBackgroundColor').checked = backgroundCheckedOptions.customColor;
document.getElementById('optionsRandomColor').checked = backgroundCheckedOptions.customRandColor;
document.getElementById('optionsRandomImage').checked = backgroundCheckedOptions.customRandImage;
});
我原以为它们会用逗号分隔,但我想不会。
【问题讨论】:
标签: google-chrome-extension google-chrome-storage