-
Notifications
You must be signed in to change notification settings - Fork 2
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
Provide different Promises implementation, Q.js, bluebird, native Promise #17
Comments
I would love to do that. The only problem I have is handling the UMD block listed below, specifically the AMD portion. If you know how to try Q and then fall back to another option, I'll gladly add this feature.
|
As far as the definition of Promise implementation, I moved out of the library dipendency. var pj = require("pajamas"), bluebird=require("bluebird"); then I did pj.Promise=bluebird; In pajamas library I refactored a bit the function, in order to delete deferred Object Not totally sure this is an elegant solution, but it could be a starting point to figure out something better. pj.Promise= window.Promise; |
Looking at the UMD block, this is easy to solve in two of the three cases.
The first can be solved with a little function:
The third is solved with |
Hi,
I love this library and I used it a lot. It became my default ajax request library.
for example here http://www.pirelli.com/tyres/it-it/auto/home
I think this is not an issue, but is there any plan to let developer which Promise implementation to choose? I mean a sort of an additional parameter that stores Q.js or bluebird and then the returned promise would be the kind the develper have choosen.
best
marco
The text was updated successfully, but these errors were encountered: