Skip to content

jQuery.get:jQuery.post: Document issues with data: null with 3 params #1208

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

mgol
Copy link
Member

@mgol mgol commented Oct 17, 2022

In jQuery 3.x and older, when providing a null value for success you also have to provide the data parameter; you can set it to undefined.

Document this restriction of jQuery.get & jQuery.post.

Ref jquery/jquery#4989
Ref jquery/jquery#5139

@mgol mgol force-pushed the jquery-get-data-null branch 3 times, most recently from 4ee332d to 03bdec9 Compare November 18, 2022 12:32
@mgol mgol force-pushed the jquery-get-data-null branch from 03bdec9 to 66abf44 Compare October 27, 2023 13:28
@mgol mgol force-pushed the jquery-get-data-null branch from 66abf44 to d8fa4f5 Compare November 6, 2023 15:41
@mgol mgol force-pushed the jquery-get-data-null branch from d8fa4f5 to 5e558e0 Compare October 14, 2024 16:25
mgol added a commit to mgol/jquery that referenced this pull request Mar 17, 2025
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Ref jquerygh-4989
Ref jquery/api.jquery.com#1208
@mgol mgol force-pushed the jquery-get-data-null branch from 5e558e0 to 05cab6f Compare March 24, 2025 16:56
mgol added a commit to jquery/jquery that referenced this pull request Mar 31, 2025
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Closes gh-5640
Ref gh-4989
Ref jquery/api.jquery.com#1208
mgol added a commit to mgol/jquery that referenced this pull request Mar 31, 2025
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Ref jquerygh-5640
Ref jquerygh-4989
Ref jquery/api.jquery.com#1208
mgol added a commit to mgol/jquery that referenced this pull request Apr 1, 2025
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Ref jquerygh-5640
Ref jquerygh-4989
Ref jquery/api.jquery.com#1208
@mgol mgol force-pushed the jquery-get-data-null branch from 05cab6f to 3c1c919 Compare April 1, 2025 21:05
@mgol mgol force-pushed the jquery-get-data-null branch from 3c1c919 to eda8b21 Compare April 14, 2025 20:59
@mgol mgol force-pushed the jquery-get-data-null branch from eda8b21 to ab11b95 Compare May 5, 2025 16:06
mgol added a commit to jquery/jquery that referenced this pull request May 12, 2025
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Closes gh-5645
Ref gh-5640
Ref gh-4989
Ref jquery/api.jquery.com#1208
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI failure looks unrelated. We may need to address that in a separate PR.

mgol added 2 commits May 12, 2025 17:53
In jQuery 3.x and older, when providing a `null` value for `success` you also
have to provide the `data` parameter; you can set it to `undefined`.

Document this restriction of `jQuery.get` & `jQuery.post`.

Closes jquerygh-1208
Ref jquery/jquery#4989
Ref jquery/jquery#5139
Ref jquery/jquery#5640
Ref jquery/jquery#5645
Ref jquery/jquery#5646
@mgol mgol force-pushed the jquery-get-data-null branch from 06f3bb9 to 25291a3 Compare May 12, 2025 15:54
@mgol mgol merged commit eb10b09 into jquery:main May 12, 2025
3 checks passed
@mgol mgol deleted the jquery-get-data-null branch May 12, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants