diff options
author | Corey Frang <gnarf@gnarf.net> | 2013-01-30 08:11:22 -0600 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-03-19 16:07:59 +0100 |
commit | 36cb6f264dbe6b155f8fd97b0ee7615a0f1adedb (patch) | |
tree | b7c66d2ea03077c897ec60d393b867a755a76765 /ui | |
parent | f2e45f5a7c263cad810d40d919761089e024c190 (diff) | |
download | jquery-ui-36cb6f264dbe6b155f8fd97b0ee7615a0f1adedb.tar.gz jquery-ui-36cb6f264dbe6b155f8fd97b0ee7615a0f1adedb.zip |
Widget: Implement instance method on the bridge to return widget instance - Fixes #9030 - `instance` method in widget prototype
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.widget.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index adc4b9da1..ca097e02b 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -182,6 +182,10 @@ $.widget.bridge = function( name, object ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); } + if ( options === "instance" ) { + returnValue = instance; + return false; + } if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } |