Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ajax: Support an alternative completeCallback API for transports#4634

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
mgol wants to merge2 commits intojquery:main
base:main
Choose a base branch
Loading
frommgol:ajax-done-object

Conversation

mgol
Copy link
Member

@mgolmgol commentedMar 1, 2020

Summary

Apart from the existing API:

function(status,statusText,responses,headers){}

a new API is now available:

function({ status, statusText, responses, headers}){}

This makes it possible to add new parameters in the future without relying on
their order among parameters and being able to provide them selectively.

Refgh-4405

+37 bytes. Not changing existing transports would make that smaller but we'll need to change the XHR one anyway to land#4405 and then the build gets smaller if we update it in all the places I modified in the PR.

Note: This still needs tests. That said, we don't have any direct tests forjQuery.ajaxTransport, its only implicitly tested by the virtue of two core transports using this API. Therefore, before landing this I'd like to write a few tests for the API first. I'm opening this draft PR now to gain feedback whether this is a direction in which we'd like to go.

Checklist

@mgolmgol self-assigned thisMar 1, 2020
@mgolmgol mentioned this pull requestMar 1, 2020
4 tasks
@mgolmgol added Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. and removed Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. Needs review labelsMar 2, 2020
Base automatically changed frommaster tomainFebruary 1, 2021 22:02
@mgol
Copy link
MemberAuthor

Closing & re-opening the PR to trigger the EasyCLA check...

@aaronliu0130
Copy link

I like this! Would simplify callback functions a bit and make them look way less ugly.

@timmywil
Copy link
Member

I'm in favor and curious the total size after switching all internal transports.

@mgol
Copy link
MemberAuthor

mgol commentedJul 8, 2024

Wow, 4 years ago, time flies. 😅 My last comment still stands, though - I treat this PR as a pre-requisite of#4405 but we need another one - withjQuery.ajaxTransport tests that are totally missing right now - created & landed first. Realistically, this won't happen before the jQuery 4.0.0 release but possibly in one of the minor bumps.

mgol added2 commitsMay 4, 2025 19:00
Apart from the existing API:```jsfunction( status, statusText, responses, headers ) {}```a new API is now available:```jsfunction( { status, statusText, responses, headers } ) {}```This makes it possible to add new parameters in the future without relying ontheir order among parameters and being able to provide them selectively.Refjquerygh-4405
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@mgolmgol

Labels
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mgol@aaronliu0130@timmywil

[8]ページ先頭

©2009-2025 Movatter.jp