Tags that cannot contain elements may be quick-closed or not:
-$( "<img>" );
+$( "<img />" );
$( "<input>" );
When passing HTML to jQuery(), note that text nodes are not treated as DOM elements. With the exception of a few methods (such as .content()), they are generally ignored or removed. E.g:
The difference between attributes and properties can be important in specific situations. Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() retrieves attributes.
For example, selectedIndex, tagName, nodeName, nodeType, ownerDocument, defaultChecked, and defaultSelected should be retrieved and set with the .prop() method. Prior to jQuery 1.6, these properties were retrievable with the .attr() method, but this was not within the scope of attr. These do not have corresponding attributes and are only properties.
-
Concerning boolean attributes, consider a DOM element defined by the HTML markup <input type="checkbox" checked="checked" />, and assume it is in a JavaScript variable named elem:
+
Concerning boolean attributes, consider a DOM element defined by the HTML markup <input type="checkbox" checked="" />, and assume it is in a JavaScript variable named elem:
@@ -44,12 +44,19 @@
elem.getAttribute( "checked" )
-
"checked" (String) Initial state of the checkbox; does not change
+
"" (String) Initial state of the checkbox; does not change
+
+
+
+ $( elem ).attr( "checked" )
+ (4.0+)
+
+
"" (String) Initial state of the checkbox; does not change
$( elem ).attr( "checked" )
- (1.6+)
+ (1.6-3.x)
"checked" (String) Initial state of the checkbox; does not change
@@ -131,6 +138,7 @@ The title of the emphasis is:
+
@@ -142,7 +150,8 @@ The title of the emphasis is:
- A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()).
+
+ A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()). Non-ARIA attributes can also be removed by passing false.
@@ -162,7 +171,7 @@ The title of the emphasis is:
-
+
@@ -188,6 +197,11 @@ $( "#greatphoto" ).attr({
});
When setting multiple attributes, the quotes around attribute names are optional.
+
Removing an attribute
+
To remove an attribute, either call .attr( name, null ) or use .removeAttr( name ). For non-ARIA attributes, in jQuery 4.0+ you can also call .attr( name, false ).
+
+
Note: Because ARIA attributes frequently associate behavior with "false" values that differs from attribute absence, passing false as the value for an attribute whose name starts with "aria-…" will stringify that value to "false" rather than remove the attribute. To guarantee removal of an attribute, use the .removeAttr() method or provide null as the value to the .attr() setter.
+
WARNING: When setting the 'class' attribute, you must always use quotes!
Note: Attempting to change the type attribute on an input or button element created via document.createElement() will throw an exception on Internet Explorer 8 or older.
@@ -273,5 +287,6 @@ $( "img" ).attr( "src", function() {
+
From 2a74c71f873c4ef16dd17f2d616b4da1ba36de77 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 2 Feb 2025 13:40:20 +0100
Subject: [PATCH 18/40] Build: Bump actions/setup-node from 4.1.0 to 4.2.0 in
the github-actions group
Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).
Closes gh-1267
Updates `actions/setup-node` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/39370e3970a6d050c480ffad4ff0ed4d3fdee5af...1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-actions
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/node.js.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
index 31cdcfcd..e9d2fe6c 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node.js.yml
@@ -22,7 +22,7 @@ jobs:
- name: Install xmllint
run: sudo apt-get install -y libxml2-utils
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
+ uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
From 118b48046a219b370c284207704d88c0699c5145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?=
Date: Mon, 3 Mar 2025 18:16:33 +0100
Subject: [PATCH 19/40] All: Record APIs removed in 4.0
Fixes gh-1172
Fixes gh-1200
Closes gh-1262
---
entries/jQuery.fx.interval.xml | 2 +-
entries/jQuery.isArray.xml | 2 +-
entries/jQuery.isFunction.xml | 2 +-
entries/jQuery.isNumeric.xml | 2 +-
entries/jQuery.isWindow.xml | 2 +-
entries/jQuery.now.xml | 2 +-
entries/jQuery.parseJSON.xml | 2 +-
entries/jQuery.trim.xml | 2 +-
entries/jQuery.type.xml | 2 +-
entries/toggleClass.xml | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/entries/jQuery.fx.interval.xml b/entries/jQuery.fx.interval.xml
index ddcf4296..b86516c3 100644
--- a/entries/jQuery.fx.interval.xml
+++ b/entries/jQuery.fx.interval.xml
@@ -1,5 +1,5 @@
-
+jQuery.fx.intervalThe rate (in milliseconds) at which animations fire.
diff --git a/entries/jQuery.isArray.xml b/entries/jQuery.isArray.xml
index 6ce958df..9891126f 100644
--- a/entries/jQuery.isArray.xml
+++ b/entries/jQuery.isArray.xml
@@ -1,5 +1,5 @@
-
+jQuery.isArray()1.3
diff --git a/entries/jQuery.isFunction.xml b/entries/jQuery.isFunction.xml
index 3524ace2..5160f0a7 100644
--- a/entries/jQuery.isFunction.xml
+++ b/entries/jQuery.isFunction.xml
@@ -1,5 +1,5 @@
-
+jQuery.isFunction()1.2
diff --git a/entries/jQuery.isNumeric.xml b/entries/jQuery.isNumeric.xml
index 7e64d4b7..c4fe4a72 100644
--- a/entries/jQuery.isNumeric.xml
+++ b/entries/jQuery.isNumeric.xml
@@ -1,5 +1,5 @@
-
+jQuery.isNumeric()Determines whether its argument represents a JavaScript number.
diff --git a/entries/jQuery.isWindow.xml b/entries/jQuery.isWindow.xml
index e79a95a7..76a58f17 100644
--- a/entries/jQuery.isWindow.xml
+++ b/entries/jQuery.isWindow.xml
@@ -1,5 +1,5 @@
-
+jQuery.isWindow()1.4.3
diff --git a/entries/jQuery.now.xml b/entries/jQuery.now.xml
index b482637c..00992aba 100644
--- a/entries/jQuery.now.xml
+++ b/entries/jQuery.now.xml
@@ -1,5 +1,5 @@
-
+jQuery.now()1.4.3
diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml
index a3249174..2023ebc8 100644
--- a/entries/jQuery.parseJSON.xml
+++ b/entries/jQuery.parseJSON.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/entries/jQuery.trim.xml b/entries/jQuery.trim.xml
index 6732a155..cfc537b6 100644
--- a/entries/jQuery.trim.xml
+++ b/entries/jQuery.trim.xml
@@ -1,5 +1,5 @@
-
+jQuery.trim()1.0
diff --git a/entries/jQuery.type.xml b/entries/jQuery.type.xml
index b9ce8a8e..4dd56897 100644
--- a/entries/jQuery.type.xml
+++ b/entries/jQuery.type.xml
@@ -1,5 +1,5 @@
-
+jQuery.type()1.4.3
diff --git a/entries/toggleClass.xml b/entries/toggleClass.xml
index da2c894f..b42f2329 100644
--- a/entries/toggleClass.xml
+++ b/entries/toggleClass.xml
@@ -229,7 +229,7 @@ $( "a" ).on( "click", function( event ) {
-
+ 1.4
From 635f5ff2e0311f389ff4f803d3cdd5017c0cab0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?=
Date: Mon, 3 Mar 2025 18:58:07 +0100
Subject: [PATCH 20/40] All: Mark ajax event shorthands as deprecated in 3.5,
not 3.3
jQuery 3.3.0 deprecated regular event shorthands:
https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/
The AJAX ones only got deprecated in 3.5:
https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
Interstingly, the AJAX shorthands were already added to the
`deprecated/deprecated-3.5` category, only the `deprecated` attribute was set
incorrectly.
Closes gh-1268
---
entries/ajaxComplete-shorthand.xml | 2 +-
entries/ajaxError-shorthand.xml | 2 +-
entries/ajaxSend-shorthand.xml | 2 +-
entries/ajaxStart-shorthand.xml | 2 +-
entries/ajaxStop-shorthand.xml | 2 +-
entries/ajaxSuccess-shorthand.xml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/entries/ajaxComplete-shorthand.xml b/entries/ajaxComplete-shorthand.xml
index 8e9cc6bf..3f44abc1 100644
--- a/entries/ajaxComplete-shorthand.xml
+++ b/entries/ajaxComplete-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxComplete()Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
diff --git a/entries/ajaxError-shorthand.xml b/entries/ajaxError-shorthand.xml
index c1794365..f36ac54a 100644
--- a/entries/ajaxError-shorthand.xml
+++ b/entries/ajaxError-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxError()Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
diff --git a/entries/ajaxSend-shorthand.xml b/entries/ajaxSend-shorthand.xml
index 37d39222..a9ae031e 100644
--- a/entries/ajaxSend-shorthand.xml
+++ b/entries/ajaxSend-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxSend()Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
diff --git a/entries/ajaxStart-shorthand.xml b/entries/ajaxStart-shorthand.xml
index 496152b3..51b2fc9e 100644
--- a/entries/ajaxStart-shorthand.xml
+++ b/entries/ajaxStart-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxStart()Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
diff --git a/entries/ajaxStop-shorthand.xml b/entries/ajaxStop-shorthand.xml
index d5fe7f30..78121657 100644
--- a/entries/ajaxStop-shorthand.xml
+++ b/entries/ajaxStop-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxStop()Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
diff --git a/entries/ajaxSuccess-shorthand.xml b/entries/ajaxSuccess-shorthand.xml
index 95fa6e0e..a9e54335 100644
--- a/entries/ajaxSuccess-shorthand.xml
+++ b/entries/ajaxSuccess-shorthand.xml
@@ -1,5 +1,5 @@
-
+.ajaxSuccess()Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
From 6ed3adb842bdabd13a794fbc8297c53c7abc126d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?=
Date: Mon, 24 Mar 2025 17:54:05 +0100
Subject: [PATCH 21/40] css: Document no auto-appending `px` in jQuery 4.0
Also, document the removal of `jQuery.cssNumber` in jQuery 4.0.
Closes gh-1261
---
entries/css.xml | 12 +++++++-
entries/jQuery.cssNumber.xml | 54 ++++++++++++++++++++++++------------
2 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/entries/css.xml b/entries/css.xml
index 7d6bd56e..85a304e8 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -108,6 +108,7 @@ $( "div" ).on( "click", function() {
+
@@ -146,7 +147,15 @@ $( "div" ).on( "click", function() {
As with the .prop() method, the .css() method makes setting properties of elements quick and easy. This method can take either a property name and value as separate parameters, or a single object of key-value pairs.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" }) and .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
-
When a number is passed as the value, jQuery will convert it to a string and add px to the end of that string. If the property requires units other than px, convert the value to a string and add the appropriate units before calling the method.
+
In jQuery 3.x or older, when a number is passed as the value, jQuery will convert it to a string and add px to the end of that string. However, there are exceptions. px is not added to keys of jQuery.cssNumber If the property requires units other than px, convert the value to a string and add the appropriate units before calling the method.
+
In jQuery 4.0 or newer, when a number is passed as the value, jQuery will only convert it to a string and add px to the end of that string for a limited set of properties - mostly related to width, height, border, margin & padding; the full list:
+
+
setting the element position: top, right, bottom, left
+
setting the element dimensions: width, height, min-width, min-height, max-width, max-height
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. As a consequence, the element's style for that property will be restored to whatever value was applied. So, this method can be used to cancel any style modification you have previously performed. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
Note:.css() doesn't support !important declarations. So, the statement $( "p" ).css( "color", "red !important" ) does not turn the color of all paragraphs in the page to red as of jQuery 3.6.0. Do not depend on that not working, though, as a future version of jQuery may add support for such declarations. It's strongly advised to use classes instead; otherwise use a jQuery plugin.
As of jQuery 1.8, the .css() setter will automatically take care of prefixing the property name. For example, take .css( "user-select", "none" ) in Chrome/Safari will set it as -webkit-user-select, Firefox will use -moz-user-select, and IE10 will use -ms-user-select.
@@ -286,5 +295,6 @@ $( "div" ).on( "click", function() {
+
diff --git a/entries/jQuery.cssNumber.xml b/entries/jQuery.cssNumber.xml
index ce5af886..c49b3c78 100644
--- a/entries/jQuery.cssNumber.xml
+++ b/entries/jQuery.cssNumber.xml
@@ -1,30 +1,50 @@
-
+jQuery.cssNumber1.4.3
- An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values.
+ An object containing all CSS properties that may be used without a unit. Prior to jQuery 4.0, the .css() method uses this object to see if it may append px to unitless values.
-
You can think about jQuery.cssNumber as a list of all CSS properties you might use without a unit. It's used by .css() to determine if it needs to add px to unitless values.
-
The keys of the jQuery.cssNumber object are camel-cased and the values are all set to true. If you want to prevent the .css() method from automatically adding the px unit for a specific CSS property, you can add an extra property to the jQuery.cssNumber object.
+
+
Note: This API has been removed in jQuery 4.0; please pass a string value with the desired units instead.
+
+
You can think about jQuery.cssNumber as a list of all CSS properties you might use without a unit. Prior to jQuery 4.0, it was used by .css() to determine if it needs to add px to unitless values.
+
The keys of the jQuery.cssNumber object are camel-cased and the values are all set to true. If you want to prevent the .css() method from automatically adding the px unit for a specific CSS property and that property is not yet a key of the jQuery.cssNumber object, you can add such an extra property:
From a798da061e29ecf8741077fce1e08135ea55b54f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aldimar=20J=C3=BAnior?=
<98884282+aldimar-junior@users.noreply.github.com>
Date: Tue, 8 Apr 2025 09:56:46 -0300
Subject: [PATCH 27/40] text: Change wording from "cannot" to "should not"
You can use `.text()` on an input, you just shouldn't do this as the behavior
may not be expected.
Fixes gh-1244
Closes gh-1273
---
entries/text.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/text.xml b/entries/text.xml
index ff9c537e..616b8a2c 100644
--- a/entries/text.xml
+++ b/entries/text.xml
@@ -22,7 +22,7 @@
Demonstration Box list item 1 list item 2
-
The .text() method cannot be used on form inputs or scripts. To set or get the text value of input or textarea elements, use the .val() method. To get the value of a script element, use the .html() method.
+
The .text() method should not be used on form inputs or scripts. To set or get the text value of input or textarea elements, use the .val() method. To get the value of a script element, use the .html() method.
As of jQuery 1.4, the .text() method returns the value of text and CDATA nodes as well as element nodes.
@@ -91,7 +91,7 @@ $( "p" ).last().html( str );
<p>This is a test</p>
-
The .text() method cannot be used on input elements. For input field text, use the .val() method.
+
The .text() method should not be used on input elements. For input field text, use the .val() method.
As of jQuery 1.4, the .text() method allows us to set the text content by passing in a function.
Given a document with six paragraphs, this example will set the HTML of <div class="demo-container"> to <p>All new content for <em>6 paragraphs!</em></p>.
-
This method uses the browser's innerHTML property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all href properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
+
This method uses the browser's innerHTML property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all href properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
To set the content of a <script> element, which does not contain HTML, use the .text() method and not .html().
Note: In Internet Explorer up to and including version 9, setting the text content of an HTML element may corrupt the text nodes of its children that are being removed from the document as a result of the operation. If you are keeping references to these DOM elements and need them to be unchanged, use .empty().html( string ) instead of .html(string) so that the elements are removed from the document before the new string is assigned to the element.
By default, elements are created with an .ownerDocument matching the document into which the jQuery library was loaded. Elements being injected into a different document should be created using that document, e.g., $("<p>hello iframe</p>", $("#myiframe").prop("contentWindow").document).
If the HTML is more complex than a single tag without attributes, as it is in the above example, the actual creation of the elements is handled by the browser's .innerHTML mechanism. In most cases, jQuery creates a new <div> element and sets the innerHTML property of the element to the HTML snippet that was passed in. When the parameter has a single tag (with optional closing tag or quick-closing) — $( "<img />" ) or $( "<img>" ), $( "<a></a>" ) or $( "<a>" ) — jQuery creates the element using the native JavaScript .createElement() function.
When passing in complex HTML, some browsers may not generate a DOM that exactly replicates the HTML source provided. As mentioned, jQuery uses the browser's .innerHTML property to parse the passed HTML and insert it into the current document. During this process, some browsers filter out certain elements such as <html>, <title>, or <head> elements. As a result, the elements inserted may not be representative of the original string passed.
-
Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all href properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
+
Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all href properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:
$( "<a href='https://jquery.com'></a>" );
Tags that cannot contain elements may be quick-closed or not:
]]>
+
+
+
diff --git a/entries/jQuery.Deferred.exceptionHook.xml b/entries/jQuery.Deferred.exceptionHook.xml
new file mode 100644
index 00000000..db6c3226
--- /dev/null
+++ b/entries/jQuery.Deferred.exceptionHook.xml
@@ -0,0 +1,34 @@
+
+
+ jQuery.Deferred.exceptionHook()
+
+ 3.0
+
+ Handle errors produced by Deferreds.
+
+
This API is called every time an error is thrown inside Deferreds. By default, it only warns about errors that are more likely to be programmer errors than errors thrown due to application logic. This includes errors like SyntaxError or ReferenceError.
+
The function accepts two parameters - the first one is the error thrown and the second, optional parameter is a "fake" error created before the handler is called so that a stack trace from before an async barrier is available. This second error is only provided if jQuery.Deferred.getErrorHook is defined; see the docs for that API for more details.
+
Example
+
+
+
+
+
diff --git a/entries/jQuery.Deferred.getErrorHook.xml b/entries/jQuery.Deferred.getErrorHook.xml
new file mode 100644
index 00000000..b20f98e8
--- /dev/null
+++ b/entries/jQuery.Deferred.getErrorHook.xml
@@ -0,0 +1,29 @@
+
+
+ jQuery.Deferred.getErrorHook()
+
+ 3.7
+
+ Return an Error instance with a defined stack.
+
+
+
Note: This API is not defined by default, but jQuery will make use of it when defined.
+
+
When jQuery.Deferred.getErrorHook is defined, it extends the jQuery.Deferred features added in jQuery 3.0 to include an error captured before the async barrier whenever a Deferred throws an exception. This makes it easier to find programming errors that occur inside Deferreds. You can find an example implementation you can copy-paste below, or you can use jquery-deferred-reporter plugin.
Prior to jQuery 3.0, Deferreds would simply terminate and the browser would generate a message on the console if an exception occurred such as attempting to call an undefined method as a function (e.g., myobject.missingFunction()). As of version 3.0, jQuery.Deferred follows the Promise/A+ specification when you use the .then method. The spec requires all errors to be trapped by the Promise, which prevents console errors from being logged. If the user has forgotten to add a handler for rejected promises, this can result in the error being silently swallowed with no notification at all!
+
The native Promise object as implemented in the browser tracks Promise rejections and reports problems on the console. However, doing the same type of reporting in the JavaScript world is much more difficult. jQuery itself is unable to use the native Promise because jQuery.Deferred implements a superset of Promise that requires additional features for methods like .done or .fail, and because Promise is not implemented on all the platforms that jQuery supports.
+
+
+
+
diff --git a/entries/jQuery.Deferred.getStackHook.xml b/entries/jQuery.Deferred.getStackHook.xml
new file mode 100644
index 00000000..e4044da8
--- /dev/null
+++ b/entries/jQuery.Deferred.getStackHook.xml
@@ -0,0 +1,30 @@
+
+
+ jQuery.Deferred.getStackHook()
+
+ 3.0
+
+ Return an Error instance with a defined stack.
+
+
Note: This API is not defined by default. It may be provided by the user and jQuery will then use it internally.
+
+
See jQuery.Deferred.getErrorHook for the context why this API was created. Initially, we advised users to assign to it a function returning an error stack:
+
+jQuery.Deferred.getStackHook = function() {
+ try {
+ throw new Error( "Exception in jQuery.Deferred" );
+ } catch ( err ) {
+ return err.stack; // stack property returned here
+ }
+};
+
+
However, when such a stack is then logged by jQuery from inside of jQuery.Deferred.exceptionHook, the browser won't apply source maps. Therefore, we changed the recommendation to return the full error object itself. To make it clearer, the API was also renamed.
+
+
+
+
+
From 5ba1c220a118b969dce65c6224e57620b061d7cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Mon, 5 May 2025 18:05:18 +0200
Subject: [PATCH 36/40] jQuery.Deferred.getStackHook: Make the note match the
`getErrorHook` one
Ref gh-1277
---
entries/jQuery.Deferred.getStackHook.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.Deferred.getStackHook.xml b/entries/jQuery.Deferred.getStackHook.xml
index e4044da8..87ee6138 100644
--- a/entries/jQuery.Deferred.getStackHook.xml
+++ b/entries/jQuery.Deferred.getStackHook.xml
@@ -10,7 +10,7 @@
Note: This API is not defined by default. It may be provided by the user and jQuery will then use it internally.
+
Note: This API is not defined by default, but jQuery will make use of it when defined.
See jQuery.Deferred.getErrorHook for the context why this API was created. Initially, we advised users to assign to it a function returning an error stack:
From da0d1e1e4741695fbcca5957cdb01ea152dec5fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Mon, 5 May 2025 18:05:36 +0200
Subject: [PATCH 37/40] 3.3.11
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0da24ae3..35b33aeb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "api.jquery.com",
- "version": "3.3.10",
+ "version": "3.3.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "api.jquery.com",
- "version": "3.3.10",
+ "version": "3.3.11",
"dependencies": {
"grunt": "1.6.1",
"grunt-jquery-content": "3.3.2"
diff --git a/package.json b/package.json
index c86c045c..0d874d2f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "api.jquery.com",
- "version": "3.3.10",
+ "version": "3.3.11",
"private": true,
"scripts": {
"test": "grunt lint"
From fe17385a046eac8c20a6a001b1644de247e5dd87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Mon, 12 May 2025 17:52:55 +0200
Subject: [PATCH 38/40] Build: Update the apt-get cache before installing any
package
---
.github/workflows/node.js.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
index ca2b79e7..30412870 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node.js.yml
@@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - name: Update apt-get cache
+ run: sudo apt-get update
- name: Install xmllint
run: sudo apt-get install -y libxml2-utils
- name: Use Node.js ${{ matrix.node-version }}
From eb10b09c554e459a1374cf17d8dac46e594d84c9 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 39/40] 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`.
Closes gh-1208
Ref jquery/jquery#4989
Ref jquery/jquery#5139
Ref jquery/jquery#5640
Ref jquery/jquery#5645
Ref jquery/jquery#5646
---
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..e0f7af6f 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 null or 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).
From 18a38d68029d2296cdb318b5f40e81a3e10092f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Mon, 12 May 2025 18:54:01 +0200
Subject: [PATCH 40/40] 3.3.12
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 35b33aeb..e3b94705 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "api.jquery.com",
- "version": "3.3.11",
+ "version": "3.3.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "api.jquery.com",
- "version": "3.3.11",
+ "version": "3.3.12",
"dependencies": {
"grunt": "1.6.1",
"grunt-jquery-content": "3.3.2"
diff --git a/package.json b/package.json
index 0d874d2f..458873ea 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "api.jquery.com",
- "version": "3.3.11",
+ "version": "3.3.12",
"private": true,
"scripts": {
"test": "grunt lint"