wip: more liveview and webview custom client

This commit is contained in:
Jonathan Kelley committed 2021-03-16 14:28:54 -04:00
1 parent 7856f2b153
commit 9b560dfedb
20 files changed
+75 -27

No files matched your search

+1
View File
@@ -0,0 +1 @@
<!-- this is used to instantiate the module -->
+4 -3
View File
@@ -2,12 +2,13 @@ use std::sync::mpsc::channel;
use std::sync::Arc;
use dioxus_core::prelude::*;
use dioxus_core::virtual_dom::VirtualDom;
use web_view::Handle;
use web_view::{WVResult, WebView, WebViewBuilder};
static HTML_CONTENT: &'static str = include_str!("./index.html");
static HTML_CONTENT: &'static str = include_str!("./../../liveview/index.html");
pub fn launch<T: 'static>(
pub fn launch<T: Properties + 'static>(
builder: impl FnOnce(DioxusWebviewBuilder) -> DioxusWebviewBuilder,
props: T,
root: FC<T>,
@@ -25,7 +26,7 @@ enum InnerEvent {
Initiate(Handle<()>),
}
impl<T: 'static> WebviewRenderer<T> {
impl<T: Properties + 'static> WebviewRenderer<T> {
pub fn run(
root: FC<T>,
props: T,