From 556b2710f0f09b76909b92c751edc3f4243fa5c0 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 13 May 2015 14:59:02 -0400 Subject: Widget: Support mixins Fixes #12601 Closes gh-1554 --- ui/widget.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui') diff --git a/ui/widget.js b/ui/widget.js index 2bac3d8d2..ae72c709b 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -62,6 +62,10 @@ $.widget = function( name, base, prototype ) { base = $.Widget; } + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + // create selector for plugin $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); -- cgit v1.2.3