mirror of
https://github.com/tauri-apps/web-view.git
synced 2026-02-04 18:31:17 +01:00
28 lines
466 B
Rust
28 lines
466 B
Rust
#![windows_subsystem = "windows"]
|
|
|
|
extern crate web_view;
|
|
|
|
use web_view::*;
|
|
|
|
fn main() {
|
|
web_view::builder()
|
|
.title("Page load example")
|
|
.content(Content::Html(HTML))
|
|
.size(800, 600)
|
|
.resizable(true)
|
|
.debug(true)
|
|
.user_data(())
|
|
.invoke_handler(|_webview, _arg| Ok(()))
|
|
.run()
|
|
.unwrap();
|
|
}
|
|
|
|
const HTML: &str = r#"
|
|
<!doctype html>
|
|
<html>
|
|
<body>
|
|
<h1>Hello, world</h1>
|
|
</body>
|
|
</html>
|
|
"#;
|