The execution context.
The handling function.
Function arguments.
Whether it should be executed only once.
The scope of the object (this).
The callback method.
The arguments to be passed to the method.
Whether the handler should be executed only once. If true, the handler will be recovered after execution.
Returns the handler itself.
静态
createThe scope of the object (this).
The callback method.
The arguments to be passed to the callback method.
Whether the handler should be executed only once. If true, the handler will be recovered after execution.
Return the created handler instance.
En
The
Handler
class is an event handler class. It is recommended to create aHandler
object from the object pool using theHandler.create()
method to reduce the overhead of object creation. When aHandler
object is no longer needed, it can be recovered to the object pool usingHandler.recover()
. Do not use this object after recovery, as doing so may lead to unpredictable errors. Note: Since mouse events also use this object pool, improper recovery and invocation may affect the execution of mouse events.Zh
Handler 是事件处理器类。 推荐使用 Handler.create() 方法从对象池创建,减少对象创建消耗。创建的 Handler 对象不再使用后,可以使用 Handler.recover() 将其回收到对象池,回收后不要再使用此对象,否则会导致不可预料的错误。 注意:由于鼠标事件也用本对象池,不正确的回收及调用,可能会影响鼠标事件的执行。