swap_handler


function swap_handler(handler:Handler) -> Handler

Swap the event handler with another.

  • handler: The new handler.

Returns: The previous handler.

Attention

Typically one does not call this directly, but rather uses the with statement, which is hard-wired to call this on entry to set the new handler.