Promise wrapper for the Chrome extension API so that it can be used with async and await rather than callbacks