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

File diff suppressed because one or more lines are too long