Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMessageHook

An object which intercepts messages sent to a message handler.

Notes

A message hook is useful for intercepting or spying on messages sent to message handlers which were either not created by the consumer, or when subclassing the handler is not feasible.

If messageHook returns false, no other message hooks will be invoked and the message will not be delivered to the handler.

If all installed message hooks return true, the message will be delivered to the handler for processing.

See also: installMessageHook and removeMessageHook

Hierarchy

  • IMessageHook

Index

Methods

Methods

messageHook

  • Intercept a message sent to a message handler.

    Parameters

    • handler: IMessageHandler

      The target handler of the message.

    • msg: Message

      The message to be sent to the handler.

    Returns boolean

    true if the message should continue to be processed as normal, or false if processing should cease immediately.

Generated using TypeDoc