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.