DEV Community

Discussion on: A simple technique to promisify Chrome extension API

Collapse
 
hankchiutw profile image
Hank Chiu

Do you mean for Firefox extension?

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

The Extension API yes, simple develop once run in every browser.

Thread Thread
 
hankchiutw profile image
Hank Chiu

From MDN, it says "Firefox also implements these APIs under the chrome namespace using callbacks".

So, I guess the code toPromise(chrome.tabs.query)({}).then(...); should work on Firefox as well.(hopefully)