Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use vanilla browser Promise (ES6) #154

Closed
gre opened this issue Jul 21, 2016 · 6 comments
Closed

use vanilla browser Promise (ES6) #154

gre opened this issue Jul 21, 2016 · 6 comments

Comments

@gre
Copy link
Collaborator

gre commented Jul 21, 2016

(and let user polyfill it if they need to support older browser (that I don't believe they do if they use the library anyway^^))

@gre gre changed the title use vanilla browser Promise use vanilla browser Promise (ES6) Jul 21, 2016
@gre
Copy link
Collaborator Author

gre commented Jul 21, 2016

N.B. I got bitten by this when doing: rasterizeHtml.drawHTML(...).then().catch()

catch not defined

@cburgmer
Copy link
Owner

Good point. Promises seem to be in all the browsers we want to address, users can polyfill if necessary. We can also drop one dependency.
Pull request welcome.

For now fail should work, or alternatively .then(null, function () {}).

@gre
Copy link
Collaborator Author

gre commented Jul 21, 2016

quick way I found was:

Promise.resolve()
.then(() => doTheRasterizeCalls())
...
.catch(...)

@cburgmer
Copy link
Owner

This should be solved, but I'll keep this issue open as a reminder to wait for a release of inlineresources which should get rid of the transitive dependency on ayepromise for good.

@cburgmer
Copy link
Owner

Released in https://github.com/cburgmer/inlineresources/releases/tag/0.4.0, dependency bumped in 1d032ac, needs release.

@cburgmer
Copy link
Owner

Released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants