demo.rs 479 B

1234567891011121314151617181920
  1. //! An example where the dioxus vdom is running in a native thread, interacting with webview
  2. fn main() {
  3. let html_content = "<div>Hello world!</div>";
  4. web_view::builder()
  5. .title("My Project")
  6. .content(web_view::Content::Html(html_content))
  7. .size(320, 480)
  8. .resizable(true)
  9. .debug(true)
  10. .user_data(())
  11. .invoke_handler(|view, arg| {
  12. //
  13. Ok(())
  14. })
  15. .run()
  16. .unwrap();
  17. }