Replace debounce and throttle handling in EventsController.createHandler:
if (event.debounce) {
- handler = debounce(handler, event.debounce);
+ handler = debounce(handler, (typeof event.debounce) == 'function' ? event.debounce.call(this.host, this.host) : event.debounce);
}
} else if (event.throttle) {
- handler = throttle(handler, event.throttle);
+ handler = throttle(handler, (typeof event.throttle) == 'function' ? event.throttle.call(this.host, this.host) : event.throttle);
}
Replace debounce and throttle handling in EventsController.createHandler: