基本上,有一个存储的原语我想设置为 jQuery UI Tab 设置的值:
$("#tabs").tabs({
active: chrome.storage.local.get("idx", function(obj){
console.log(obj["idx"])}); // returns primitive integer I want.
}), ...
});
标准的 chrome-storage-get 协议非常复杂,我不确定如何简单地将对象属性值本身设置为值active:
而不是对象。
active: 3 // chrome.storage.local.get("idx")
有什么办法可以做到这一点?