We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de867bb commit 3b55a65Copy full SHA for 3b55a65
1 file changed
select2.js
@@ -195,17 +195,17 @@
195
*
196
* @param quietMillis number of milliseconds to wait before invoking fn
197
* @param fn function to be debounced
198
- * @param thisobj object to be used as this reference within fn
+ * @param ctx object to be used as this reference within fn
199
* @return debounced version of fn
200
*/
201
- function debounce(quietMillis, fn, thisobj) {
202
- thisobj = thisobj || undefined;
+ function debounce(quietMillis, fn, ctx) {
+ ctx = ctx || undefined;
203
var timeout;
204
return function () {
205
var args = arguments;
206
window.clearTimeout(timeout);
207
timeout = window.setTimeout(function() {
208
- fn.apply(thisobj, args);
+ fn.apply(ctx, args);
209
}, quietMillis);
210
};
211
}
0 commit comments