-
Notifications
You must be signed in to change notification settings - Fork 375
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
[ON HOLD] Propagate parameters from jQuery success/error/copmplete callbacks to onAfter[x] callbacks v2 #232
Conversation
Call the success/error/copmplete callbacks passed to mockjax handler before the callbacks passed by the $.ajax caller, to be able to modify the response
I think I see the need for reordering the method calls here, but I want to get another pair of 👀 on it before merging. (And I'm totally fine with adding the original jQuery arguments. @dcneiner, can you take a look? Note that this helps enable #233, although it is technically separate functionality. |
@jakerella Looking now! |
Ok, first off, thank you @prantlf for all the thought and work you put into this feature. I think having the ability to pre-process the response seems like a great idea, and passing through the original jQuery arguments also is a great idea, I do think keeping the names as If @jakerella agrees, would you be willing to try and tackle that change? Let us know if you need any help. |
Oh, I forgot to mention – the conflicts seem to be just the built version of mockjax. So resolving it should be pretty easy. |
Hey @prantlf: any chance you can get to this PR (and maybe the other one) this week? I'm planning to release 2.0.0-beta this week/weekend and would love to include this. If not, we can plan for including it in 2.1.0, which shouldn't be too far behind. |
Last chance for 2.0.0... but we can always get it into 2.1.0. |
Placed on hold pending conversion to 2.x |
Closing this PR for inactivity. The issue is still there, and the code is on a good path. Any new PR would need to be merged into |
Additionally, call the onAfter[x] callbacks before the original jQuery ones. This may be a breaking change if somebody depended on the original jQuery callbacks executed earlier.
This suggest a resolution for the first half of the #225.