generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
autofixAn issue related to the autofix capabilitiesAn issue related to the autofix capabilities
Description
Missing autofix for methods related to jQuery.* (jQuery Global Replacement)
Deprecated APIs:
- The usage of the globals
jQuery
/$
is deprecated. Therefore the modulesap/ui/thirdparty/jquery
should be used. -
jQuery.isPlainObject
Follow-Up of Missing autofix for methods related to jQuery.sap.* (Utils) #529 -
jQuery.isArray
Follow-Up of Missing autofix for methods offered on the global jQuery object can be replaced by native browser APIs #590 -
jQuery.isArray
Follow-Up of Missing autofix for methods offered on the global jQuery object can be replaced by native browser APIs #590
Deprecated Usage
var myFancyControl = jQuery(".fancyContainer");
var myData = ["a", "b", "c"];
var indexOfEntity = jQuery.inArray("b", myData);
var isValueAnArray = jQuery.isArray(myData);
Recommended Usage
sap.ui.define([
"sap/ui/thirdparty/jquery"
], (jQuery) => {
"use strict";
var myFancyControl = jQuery(".fancyContainer");
var myData = ["a", "b", "c"];
var indexOfEntity = (myData ? Array.prototype.indexOf.call(myData, "b") : -1);
var isValueAnArray = Array.isArray(myData);
});
Metadata
Metadata
Assignees
Labels
autofixAn issue related to the autofix capabilitiesAn issue related to the autofix capabilities