Skip to content

Commit 809f29e

Browse files
committed
All: Remove uses of jQuery.proxy()
Ref #15160 Closes jquerygh-1813
1 parent 0940cb9 commit 809f29e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demos/autocomplete/combobox.html

Lines changed: 1 addition & 1 deletion
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: {

ui/widgets/autocomplete.js

Lines changed: 2 additions & 2 deletions
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 ) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy