tfoxy / chrome-promise

Promises for chrome JavaScript APIs used in extensions and apps.
MIT License
150 stars 14 forks source link

Consider remove requirement of creating object #8

Closed amio closed 6 years ago

amio commented 8 years ago

Since there's no option for new ChromePromise(), how about let user directly use window.ChromePromise or import cp from 'chrome-promise'?

amio commented 8 years ago

Oops, my mistake, there is an option object >.<

tfoxy commented 8 years ago

There is an options object. But most people using this library will never use the options.

So I think it's better to provide an instance of ChromePromise as default and if someone wants to use the constructor, then it can be imported from 'chrome-promise/constructor'.

I can make the changes on the weekend.

tfoxy commented 6 years ago

Fixed in 797b0af2e4c4094b11175180de29685dba2971bb (v3.0.0)