tauri-sys/examples/test/src/window.rs
2023-02-09 11:48:03 +01:00

15 lines
290 B
Rust

use anyhow::ensure;
use tauri_sys::window;
pub async fn create_window() -> anyhow::Result<()> {
let win = window::WebviewWindowBuilder::new("foo-win")
.set_url("/")
.build()
.await?;
ensure!(win.is_visible().await?);
win.close().await?;
Ok(())
}