Skip to main content

message_callback_handler

Function message_callback_handler 

Source
pub fn message_callback_handler<E: 'static>(
    callback: Option<Rc<dyn Fn()>>,
) -> Option<Rc<dyn Fn(E)>>
Expand description

Builds the click handler that fires a caller’s message callback.

The event type is a parameter so the DOM-free test suite can drive the handler with a stand-in event; the component always instantiates it with Event.

§Arguments

  • Option<Rc<dyn Fn()>> - The callback fired by the handler.

§Returns

  • Option<Rc<dyn Fn(E)>> - The click handler, or None when there is no callback.