pub trait EventHandler<T: OutputType, E> {
    fn attach(&mut self, target: &Element) -> EventListenerHandle;
    fn render(&self) -> Option<String>;
}
Expand description

Trait for event handlers.

Required Methods

Build a callback function from this event handler.

Returns None is this event handler can’t be used to build a callback function. This is usually the case if the event handler is a string intended for server side rendering.

Render this event handler as a string.

Returns None if this event handler cannot be rendered. Normally, the only event handlers that can be rendered are string values intended for server side rendering.

Implementations on Foreign Types

Implementors