Removed jQuery UI widgetSlice

This commit is contained in:
djmaze 2020-08-07 13:27:43 +02:00
parent 656fd72319
commit a0dcd93fea
2 changed files with 3 additions and 6 deletions

View file

@ -54,7 +54,6 @@ $.extend( $.ui, {
var widgetUuid = 0;
var widgetSlice = Array.prototype.slice;
$.cleanData = ( function( orig ) {
return function( elems ) {
@ -203,8 +202,7 @@ $.widget = function( name, base, prototype ) {
return constructor;
};
$.widget.extend = function( target ) {
var input = widgetSlice.call( arguments, 1 );
$.widget.extend = ( target, ...input ) => {
var inputIndex = 0;
var inputLength = input.length;
var key;
@ -235,9 +233,8 @@ $.widget.extend = function( target ) {
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
$.fn[ name ] = function( options, ...args ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
if ( isMethodCall ) {

File diff suppressed because one or more lines are too long