我想在定义的时间范围内收集一堆事件。我考虑过使用 Ext.util.DelayedTask 像
var task = new Ext.util.DelayedTask(function(a,b) { console.log(a,b) }, this),
handler = function(a,b) { task.delay(500); };
ref.on({
eventA: handler,
eventB: handler,
scope: this
});
但这似乎不起作用,因为参数未定义。
最佳答案
您需要在此处应用参数。试试这个
handler = function(a,b) { task.delay(500, null, null, arguments); };
关于extjs - 调用事件因所有参数而延迟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17566718/