Skip to main content

wait

Function wait 

Source
pub fn wait()
Expand description

Block the current thread and wait until all opened windows get closed.

Examples found in repository?
examples/bind.rs (line 7)
3fn main() -> Result<(), WebUIError> {
4    let window = Window::new();
5    window.bind("say_hello", |_| println!("Hello, world!"));
6    window.show(r#"<html><head><title>Hello, world!</title><script src="webui.js"></script></head><body><button onclick="say_hello()">Hello</button></body></html>"#)?;
7    wait();
8    Ok(())
9}