Trait typed_html::events::EventHandler
source · 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
sourcefn attach(&mut self, target: &Element) -> EventListenerHandle
fn attach(&mut self, target: &Element) -> EventListenerHandle
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.