]> source.dussan.org Git - jquery-ui.git/commitdiff
All: Remove uses of `jQuery.proxy()`
authorScott González <scott.gonzalez@gmail.com>
Mon, 8 May 2017 15:52:58 +0000 (11:52 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 17 May 2017 15:17:17 +0000 (11:17 -0400)
Ref #15160
Closes gh-1813

demos/autocomplete/combobox.html
ui/widgets/autocomplete.js

index 403c48550c8a87669a11a171fead89e36537d9ce..32c69b97a0b8a094f1d3f5b635655a0998d39ab8 100644 (file)
@@ -48,7 +48,7 @@
                                        .autocomplete({
                                                delay: 0,
                                                minLength: 0,
-                                               source: $.proxy( this, "_source" )
+                                               source: this._source.bind( this )
                                        })
                                        .tooltip({
                                                classes: {
index c5bddc0745a271bf20593932a19df30955fbca92..60d32654428a9940a00fe8f7228c16d8525c37cd 100644 (file)
@@ -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 ) {