mirror of
https://github.com/jquery/jquery.git
synced 2026-02-11 02:54:55 -05:00
Remove unnecessary usage of Function.prototype.bind (#7783) but maintain API. Also fix bug with proxy failing when a name is provided. Fixes #8893.
This commit is contained in:
@@ -910,7 +910,7 @@ test("jQuery.isEmptyObject", function(){
|
||||
});
|
||||
|
||||
test("jQuery.proxy", function(){
|
||||
expect(6);
|
||||
expect(7);
|
||||
|
||||
var test = function(){ equals( this, thisObject, "Make sure that scope is set properly." ); };
|
||||
var thisObject = { foo: "bar", method: test };
|
||||
@@ -921,6 +921,9 @@ test("jQuery.proxy", function(){
|
||||
// Basic scoping
|
||||
jQuery.proxy( test, thisObject )();
|
||||
|
||||
// Another take on it
|
||||
jQuery.proxy( thisObject, "method" )();
|
||||
|
||||
// Make sure it doesn't freak out
|
||||
equals( jQuery.proxy( null, thisObject ), undefined, "Make sure no function was returned." );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user