diff options
author | Gianni Chiappetta <gianni@runlevel6.org> | 2011-01-21 10:33:50 -0500 |
---|---|---|
committer | Gianni Chiappetta <gianni@runlevel6.org> | 2011-01-21 10:33:50 -0500 |
commit | 574ae3b1be555dbd5242532739cd8e0a34e0569c (patch) | |
tree | 4bcfbf7322d331f83161e3b5953e361824e08b10 /src/core.js | |
parent | a03f040dbfb12da6409e31cb5923550d4be4a99e (diff) | |
download | jquery-574ae3b1be555dbd5242532739cd8e0a34e0569c.tar.gz jquery-574ae3b1be555dbd5242532739cd8e0a34e0569c.zip |
added: Backcompatibility with old proxy syntax.
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core.js b/src/core.js index 3bdedf53f..ea3506a60 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ) ) { |