mirror of
https://github.com/jquery/jquery.git
synced 2026-02-09 10:45:07 -05:00
added: Backcompatibility with old proxy syntax.
This commit is contained in:
@@ -739,6 +739,12 @@ jQuery.extend({
|
||||
proxy: function( fn, context ) {
|
||||
var args, proxy;
|
||||
|
||||
// XXX BACKCOMPAT: Support old string method.
|
||||
if ( typeof context === "string" ) {
|
||||
fn = fn[ context ];
|
||||
context = arguments[0];
|
||||
}
|
||||
|
||||
// Quick check to determine if target is callable, in the spec
|
||||
// this throws a TypeError, but we will just return undefined.
|
||||
if ( ! jQuery.isFunction( fn ) ) {
|
||||
|
||||
Reference in New Issue
Block a user