Trait yew::virtual_dom::Listener[][src]

pub trait Listener {
    fn kind(&self) -> &'static str;
fn attach(&self, element: &Element) -> EventListener; }
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

fn kind(&self) -> &'static str[src]

Expand description

Returns the name of the event

fn attach(&self, element: &Element) -> EventListener[src]

Expand description

Attaches a listener to the element.

Loading content...

Trait Implementations

impl Debug for dyn Listener[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Implementors

Loading content...