Event receiver is called on each event sent by EventSender when registered.
A receiver may be represented either by function, or by
object. The former is a simplest form. The latter allows control all aspects of event
processing.
To register an event receiver just call the event sender's [OnEvent__symbol] or event keeper's
[AfterEvent__symbol] method with this event receiver as argument.
A recurrent event is an event sent from inside event receiver and targeted the same receiver. Recurrent event
processing is scheduled until after the current event processing finishes. To handle recurrent events in a specific
way the event receiver may utilize an event processing context available as
a first parameter of receive method.
Type Parameters
TEvent extends any[]
An event type. This is a tuple of event receiver parameter types.
Event receiver is called on each event sent by EventSender when registered.
A receiver may be represented either by function, or by object. The former is a simplest form. The latter allows control all aspects of event processing.
To register an event receiver just call the event sender's
[OnEvent__symbol]
or event keeper's[AfterEvent__symbol]
method with this event receiver as argument.A recurrent event is an event sent from inside event receiver and targeted the same receiver. Recurrent event processing is scheduled until after the current event processing finishes. To handle recurrent events in a specific way the event receiver may utilize an event processing context available as a first parameter of receive method.