8000 All: Remove uses of `jQuery.proxy()` · Interghost/jquery-ui@809f29e · GitHub
Skip to content

Commit 809f29e

Browse files

Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
.autocomplete({
4949
delay: 0,
5050
minLength: 0,
51-
source: $.proxy( this, "_source" )
51+
source: this._source.bind( this )
5252
})
5353
.tooltip({
5454
classes: {
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ $.widget( "ui.autocomplete", {
447447
_response: function() {
448448
var index = ++this.requestIndex;
449449

450-
return $.proxy( function( content ) {
450+
return function( content ) {
451451
if ( index === this.requestIndex ) {
452452
this.__response( content );
453453
}
@@ -456,7 +456,7 @@ $.widget( "ui.autocomplete", {
456456
if ( !this.pending ) {
457457
this._removeClass( "ui-autocomplete-loading" );
458458
}
459-
}, this );
459+
}.bind( this );
460460
},
461461

462462
__response: function( content ) {