Skip to content

Instantly share code, notes, and snippets.

@xryuseix
Last active May 13, 2020 06:02
Show Gist options
  • Save xryuseix/49a4f7fad7817e3532c8e596d9f99491 to your computer and use it in GitHub Desktop.
Save xryuseix/49a4f7fad7817e3532c8e596d9f99491 to your computer and use it in GitHub Desktop.
function storageGet() {
var res;
chrome.storage.local.get(res = callbackFunc(items));
console.log(res);
return res;
}
function callbackFunc(items) {
console.log(items);
callback(items);
}
const items = storageGet();
@ygkn
Copy link

ygkn commented May 13, 2020

普通に

function postPlayLists() {
  const playlists = storageGet(() => { /* なんかする */});
}

やで

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment