This is an automated email from the ASF dual-hosted git repository.
reiern70 pushed a commit to branch reiern70/WICKET-7179
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/reiern70/WICKET-7179 by this
push:
new 6fc5a57a67 [WICKET-7179] add support for jQuery 4.0.0: $.isArray was
removed
6fc5a57a67 is described below
commit 6fc5a57a67914eee5f91b2ec907f8846702036f2
Author: reiern70 <[email protected]>
AuthorDate: Thu Apr 9 10:28:46 2026 -0500
[WICKET-7179] add support for jQuery 4.0.0: $.isArray was removed
---
.../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 12 ++++++------
wicket-core/src/test/js/qunit/jquery.mockjax.js | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 1f29dbc0c7..9c85ae085c 100644
---
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -458,7 +458,7 @@
* @private
*/
_executeHandlers: function (handlers) {
- if (jQuery.isArray(handlers)) {
+ if (Array.isArray(handlers)) {
// cut the handlers argument
var args =
Array.prototype.slice.call(arguments).slice(1);
@@ -492,7 +492,7 @@
var result = [],
value,
name;
- if (jQuery.isArray(parameters)) {
+ if (Array.isArray(parameters)) {
result = parameters;
}
else if (jQuery.isPlainObject(parameters)) {
@@ -619,7 +619,7 @@
var preconditions = attrs.pre || [];
preconditions =
defaultPrecondition.concat(preconditions);
- if (jQuery.isArray(preconditions)) {
+ if (Array.isArray(preconditions)) {
var that = this._getTarget(attrs);
@@ -659,7 +659,7 @@
}
// collect the dynamic extra parameters
- if (jQuery.isArray(attrs.dep)) {
+ if (Array.isArray(attrs.dep)) {
var dynamicData =
this._calculateDynamicParameters(attrs);
if (attrs.m.toLowerCase() === 'post') {
data = data.concat(dynamicData);
@@ -1148,7 +1148,7 @@
if ($select.length > 0 &&
$select.prop('disabled') === false) {
var name = $select.prop('name');
var values = $select.val();
- if (jQuery.isArray(values)) {
+ if (Array.isArray(values)) {
for (var v = 0; v <
values.length; v++) {
var value =
values[v];
result.push( {
name: name, value: value } );
@@ -1665,7 +1665,7 @@
attrs.c = attrs.c || window;
attrs.e = attrs.e || [ 'domready' ];
- if (!jQuery.isArray(attrs.e)) {
+ if (!Array.isArray(attrs.e)) {
attrs.e = [ attrs.e ];
}
diff --git a/wicket-core/src/test/js/qunit/jquery.mockjax.js
b/wicket-core/src/test/js/qunit/jquery.mockjax.js
index 6fc1b6aa7a..82d5a86899 100644
--- a/wicket-core/src/test/js/qunit/jquery.mockjax.js
+++ b/wicket-core/src/test/js/qunit/jquery.mockjax.js
@@ -101,8 +101,8 @@
return identical;
} else {
if ( typeof live[k] === 'object' && live[k] !==
null ) {
- if ( identical && $.isArray( live[k] )
) {
- identical = $.isArray( mock[k]
) && live[k].length === mock[k].length;
+ if ( identical && Array.isArray(
live[k] ) ) {
+ identical = Array.isArray(
mock[k] ) && live[k].length === mock[k].length;
}
identical = identical &&
isMockDataEqual(mock[k], live[k]);
} else {
@@ -238,7 +238,7 @@
}
function parseResponseTimeOpt(responseTime) {
- if ($.isArray(responseTime) && responseTime.length === 2) {
+ if (Array.isArray(responseTime) && responseTime.length === 2) {
var min = responseTime[0];
var max = responseTime[1];
if(isPosNum(min) && isPosNum(max)) {
@@ -287,7 +287,7 @@
this.responseText =
mockHandler.responseText;
}
- if
($.isArray(mockHandler.status)) {
+ if
(Array.isArray(mockHandler.status)) {
var idxStatus =
Math.floor(Math.random() * mockHandler.status.length);
this.status =
mockHandler.status[idxStatus];
} else if (typeof
mockHandler.status === 'number' || typeof mockHandler.status === 'string') {
@@ -930,7 +930,7 @@
*/
$.mockjax = function(settings) {
// Multiple mocks.
- if ( $.isArray(settings) ) {
+ if ( Array.isArray(settings) ) {
return $.map(settings, function(s) {
return $.mockjax(s);
});