Remove deprecated ajax methods #2084

Closed
markelog opened this Issue Feb 11, 2015 · 11 comments

Comments

Projects
None yet
5 participants
@markelog
Member

markelog commented Feb 11, 2015

jqXHR.success | error | complete. They was deprecated since 1.8.

Is it time to remove them?

@markelog markelog added the Ajax label Feb 11, 2015

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Feb 11, 2015

Member

Would be fine with me. If we are making a lot of changes for Promise/A+ compliance that would also move people towards the standard methods.

Member

dmethvin commented Feb 11, 2015

Would be fine with me. If we are making a lot of changes for Promise/A+ compliance that would also move people towards the standard methods.

@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Feb 11, 2015

Member

Sounds good to me! Let's also open a ticket on jQuery migrate tho.

Member

timmywil commented Feb 11, 2015

Sounds good to me! Let's also open a ticket on jQuery migrate tho.

@timmywil timmywil added this to the 3.0.0 milestone Feb 11, 2015

@timmywil timmywil referenced this issue in jquery/jquery-migrate Feb 11, 2015

Closed

Deprecated Ajax methods removed. #88

@timmywil

This comment has been minimized.

Show comment
Hide comment
Member

timmywil commented Feb 11, 2015

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Feb 11, 2015

Member

Just created docs issue about it too

Member

markelog commented Feb 11, 2015

Just created docs issue about it too

@markelog markelog self-assigned this Feb 15, 2015

markelog added a commit to markelog/jquery that referenced this issue Feb 15, 2015

markelog added a commit to markelog/jquery that referenced this issue Feb 17, 2015

markelog added a commit that referenced this issue Feb 17, 2015

@markelog markelog closed this in 9d1b989 Feb 17, 2015

@sqrthree sqrthree referenced this issue in sqrthree/sqrthree.github.io Feb 20, 2016

Open

[译] jQuery 3.0 以及兼容版的 Alpha 版本发布 #3

@jfbrennan

This comment has been minimized.

Show comment
Hide comment
@jfbrennan

jfbrennan Jun 7, 2017

Per the blog post that links here, this change means that jqXhr.abort() is no longer an option in jQuery 3? Going forward then, what is the recommended way of cancelling requests?

Per the blog post that links here, this change means that jqXhr.abort() is no longer an option in jQuery 3? Going forward then, what is the recommended way of cancelling requests?

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jun 12, 2017

Member

@jfbrennan this ticket doesn't say anything about jqXHR.abort().

Member

dmethvin commented Jun 12, 2017

@jfbrennan this ticket doesn't say anything about jqXHR.abort().

@jfbrennan

This comment has been minimized.

Show comment
Hide comment
@jfbrennan

jfbrennan Jun 13, 2017

@dmethvin "Per the blog post that links here" it makes it sound like abort has been removed along with other non-Promise methods. Sorry for misunderstanding, but I'm not the only one:

(1,443 upvotes and it says "As of jQuery 3, the ajax method returns a promise without extra methods (like abort)") https://stackoverflow.com/questions/446594/abort-ajax-requests-using-jquery/446626#446626

https://stackoverflow.com/questions/40421186/how-to-abort-a-jquery-3-0-ajax-request

jfbrennan commented Jun 13, 2017

@dmethvin "Per the blog post that links here" it makes it sound like abort has been removed along with other non-Promise methods. Sorry for misunderstanding, but I'm not the only one:

(1,443 upvotes and it says "As of jQuery 3, the ajax method returns a promise without extra methods (like abort)") https://stackoverflow.com/questions/446594/abort-ajax-requests-using-jquery/446626#446626

https://stackoverflow.com/questions/40421186/how-to-abort-a-jquery-3-0-ajax-request

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jun 13, 2017

Member

Can you point (as in a URL) to any official jQuery documentation that says jQXHR.abort() is deprecated or removed? I don't know of any. Don't assume that a StackOverflow answer is correct.

Member

dmethvin commented Jun 13, 2017

Can you point (as in a URL) to any official jQuery documentation that says jQXHR.abort() is deprecated or removed? I don't know of any. Don't assume that a StackOverflow answer is correct.

@jfbrennan

This comment has been minimized.

Show comment
Hide comment
@jfbrennan

jfbrennan Jun 13, 2017

http://blog.jquery.com/2016/01/14/jquery-3-0-beta-released/ says:

"Removed special-case Deferred methods in jQuery.ajax

jqXHR object is a Promise, but also has extra methods like .abort() so that you can stop a request after it has been made.

As users increasingly embrace the Promise pattern for asynchronous work like AJAX, the idea of having special cases for the Promise returned by jQuery.ajax is an increasingly bad idea."

Kind of implies that abort was/is on the chopping block. The SO with 1,443 votes says abort was removed and then links to that same blog post so I don't think I'm the only one who is misunderstanding this.
It might be good for the jQuery team to clarify that although abort was mentioned, it wasn't actually removed. I understand SO is not the gospel truth, but there seems to be a somewhat widespread misunderstanding that abort is gone and I think that blog post may have been the cause of it.

http://blog.jquery.com/2016/01/14/jquery-3-0-beta-released/ says:

"Removed special-case Deferred methods in jQuery.ajax

jqXHR object is a Promise, but also has extra methods like .abort() so that you can stop a request after it has been made.

As users increasingly embrace the Promise pattern for asynchronous work like AJAX, the idea of having special cases for the Promise returned by jQuery.ajax is an increasingly bad idea."

Kind of implies that abort was/is on the chopping block. The SO with 1,443 votes says abort was removed and then links to that same blog post so I don't think I'm the only one who is misunderstanding this.
It might be good for the jQuery team to clarify that although abort was mentioned, it wasn't actually removed. I understand SO is not the gospel truth, but there seems to be a somewhat widespread misunderstanding that abort is gone and I think that blog post may have been the cause of it.

@winzig

This comment has been minimized.

Show comment
Hide comment
@winzig

winzig May 10, 2018

@dmethvin I am updating the SO answer to reflect reality, but can someone clarify what this statement means in the context of abort:

As users increasingly embrace the Promise pattern for asynchronous work like AJAX, the idea of having special cases for the Promise returned by jQuery.ajax is an increasingly bad idea.

Is this statement saying that although not removed at this time, abort is seen as a special case on the returned promise, and may be removed down the road?

winzig commented May 10, 2018

@dmethvin I am updating the SO answer to reflect reality, but can someone clarify what this statement means in the context of abort:

As users increasingly embrace the Promise pattern for asynchronous work like AJAX, the idea of having special cases for the Promise returned by jQuery.ajax is an increasingly bad idea.

Is this statement saying that although not removed at this time, abort is seen as a special case on the returned promise, and may be removed down the road?

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin May 11, 2018

Member

@winzig thanks for the help! Yes abort is definitely a special case since there is no way to abort a standard Promise. There is a withdrawn proposal at https://github.com/tc39/proposal-cancelable-promises but some uses like fetch require it just like $.ajax. There were two epic threads (whatwg/fetch#27 and whatwg/fetch#447) that finally settled on an implementation for fetch but it just goes to show how hard that problem is.

Member

dmethvin commented May 11, 2018

@winzig thanks for the help! Yes abort is definitely a special case since there is no way to abort a standard Promise. There is a withdrawn proposal at https://github.com/tc39/proposal-cancelable-promises but some uses like fetch require it just like $.ajax. There were two epic threads (whatwg/fetch#27 and whatwg/fetch#447) that finally settled on an implementation for fetch but it just goes to show how hard that problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment