fn.listen

Function tauri::​event::​listen

pub fn listen<F: FnMut(Option<String>) + Send + 'static>(
    id: impl Into<String>, 
    handler: F
)

Adds an event listener for JS events.