As of jQuery 1.8, 'success', 'error', and 'complete' parameters of the $.ajax() method are deprecated. We should probably consider moving to using promises, however, it is a bit of a challenge with current action handling.
I am now working on implementing a custom validation handler for Parsley.js that returns a promise. Unfortunately, our ajax response handlers are not capable of handling error responses - we currently return 200 for all requests with custom status = 0|-1 codes. I have implemented a custom response using Symfony Response object, but perhaps we should start thinking about better ways of handling this.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
You must log in to post replies.Doesn't #8402 get us closer? Supports promises at least.
Also note that jquery 3 is coming out soon(ish?) and sports more standard promises as opposed to its current wonky deferreds implementation.