Difference between event handlers and callbacks

前端 未结 12 2561
时光说笑
时光说笑 2020-12-22 16:33

What is the difference between an event handler and a callback function?

12条回答
  •  醉酒成梦
    2020-12-22 17:13

    A callback is procedure you pass as an argument to another procedure. The procedure receiving the parameter can call it, or share it so some other procedures in the system can call it.

    An event handler is a procedure called when an event happens. It can be a callback.

提交回复
热议问题