Let's say I have the following function
chrome.cookies.getAll({domain: 'google.com'}, callbackFn);
where callbackFn should return all the cookies available
now I have a big main()
function (I must have this function) and this function must return the cookies of the given page(as a promise).
How should I do it?