我有 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;
});
我本以为它们会用逗号分隔,但我想不是。