pub trait Handler: 'static {
// Provided method
fn handle(&mut self, window: Window, message: &str) { ... }
}
Expand description
An event handler; you probably want to implement one.
- When the webpage calls
window.tether
, the message is passed tohandle
. - The handler is dropped when the window is closed.