This may be obvious to some, but I just ran into it. I wanted to access bookmarks via new ChromePromise().bookmarks.getTree() but it was undefined. At first I thought it might be something wrong with this library, as it seemed strange that it wouldn't support the bookmarks API. A quick look at the source made me realize it wasn't available because it wasn't on the chrome object, because I hadn't added the bookmarks permission to the manifest yet. Duh.
So it might be worth pointing that out in the Warnings section of the README. If something's undefined on a ChromePromise, it means you need to add it to the permissions.
This may be obvious to some, but I just ran into it. I wanted to access bookmarks via
new ChromePromise().bookmarks.getTree()
but it was undefined. At first I thought it might be something wrong with this library, as it seemed strange that it wouldn't support the bookmarks API. A quick look at the source made me realize it wasn't available because it wasn't on thechrome
object, because I hadn't added the bookmarks permission to the manifest yet. Duh.So it might be worth pointing that out in the Warnings section of the README. If something's undefined on a
ChromePromise
, it means you need to add it to the permissions.