aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-05-13 14:59:02 -0400
committerScott González <scott.gonzalez@gmail.com>2015-05-14 20:36:00 -0400
commit556b2710f0f09b76909b92c751edc3f4243fa5c0 (patch)
tree1fcabfdb0c8d844ac51f802a0d8a9a83726f5fcb /ui/widget.js
parentae25cdb6881cef632d42100a5237850cae1c3a77 (diff)
downloadjquery-ui-556b2710f0f09b76909b92c751edc3f4243fa5c0.tar.gz
jquery-ui-556b2710f0f09b76909b92c751edc3f4243fa5c0.zip
Widget: Support mixins
Fixes #12601 Closes gh-1554
Diffstat (limited to 'ui/widget.js')
-rw-r--r--ui/widget.js4
1 files changed, 4 insertions, 0 deletions
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 );