From d8fa4f5c28e8f09d919044e09fcc72398314b4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 17 Oct 2022 18:52:48 +0200 Subject: [PATCH] jQuery.get:jQuery.post: Document issues with `data: null` with 3 params 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 --- entries/jQuery.get.xml | 2 +- entries/jQuery.post.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml index 575a6f83..0dc5ab66 100644 --- a/entries/jQuery.get.xml +++ b/entries/jQuery.get.xml @@ -15,7 +15,7 @@ - A callback function that is executed if the request succeeds. Required if dataType is provided, but you can use null or jQuery.noop as a placeholder. + A callback function that is executed if the request succeeds. Required if dataType is provided, but you can use null or jQuery.noop as a placeholder. NOTE: 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. The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml index e5411bed..e862071f 100644 --- a/entries/jQuery.post.xml +++ b/entries/jQuery.post.xml @@ -15,7 +15,7 @@ - A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. + A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null or jQuery.noop as a placeholder. NOTE: 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. The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).