Trait yew::virtual_dom::Listener
source · pub trait Listener {
// Required methods
fn kind(&self) -> ListenerKind;
fn handle(&self, event: Event);
fn passive(&self) -> bool;
}
Expand description
The Listener trait is an universal implementation of an event listener which is used to bind Rust-listener to JS-listener (DOM).
Required Methods§
sourcefn kind(&self) -> ListenerKind
fn kind(&self) -> ListenerKind
Returns the name of the event
sourcefn passive(&self) -> bool
fn passive(&self) -> bool
Makes the event listener passive. See addEventListener.