From: Scott González Date: Mon, 8 May 2017 15:52:58 +0000 (-0400) Subject: All: Remove uses of `jQuery.proxy()` X-Git-Tag: 1.13.0-alpha.1~67 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=809f29efa79c3c9aba95e6d7ffef41f567cda3a5;p=jquery-ui.git All: Remove uses of `jQuery.proxy()` Ref #15160 Closes gh-1813 --- diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index 403c48550..32c69b97a 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -48,7 +48,7 @@ .autocomplete({ delay: 0, minLength: 0, - source: $.proxy( this, "_source" ) + source: this._source.bind( this ) }) .tooltip({ classes: { diff --git a/ui/widgets/autocomplete.js b/ui/widgets/autocomplete.js index c5bddc074..60d326544 100644 --- a/ui/widgets/autocomplete.js +++ b/ui/widgets/autocomplete.js @@ -447,7 +447,7 @@ $.widget( "ui.autocomplete", { _response: function() { var index = ++this.requestIndex; - return $.proxy( function( content ) { + return function( content ) { if ( index === this.requestIndex ) { this.__response( content ); } @@ -456,7 +456,7 @@ $.widget( "ui.autocomplete", { if ( !this.pending ) { this._removeClass( "ui-autocomplete-loading" ); } - }, this ); + }.bind( this ); }, __response: function( content ) {