feat: enable arbitrary body in rsx! macro

This commit is contained in:
Jonathan Kelley committed 2021-07-07 18:17:00 -04:00
1 parent fd7933561f
commit 7aec40d57e
38 files changed
+142 -88

No files matched your search

+1 -3
View File
@@ -2,13 +2,11 @@
use dioxus_core as dioxus;
use dioxus_core::prelude::*;
use dioxus_core::serialize::DomEdits;
use dioxus_core::{
diff::RealDom,
prelude::ScopeIdx,
serialize::DomEdits,
virtual_dom::{RealDomNode, VirtualDom},
};
use serde::{Deserialize, Serialize};
use DomEdits::*;
pub struct WebviewDom<'bump> {
+9 -3
View File
@@ -9,10 +9,16 @@ mod dom;
static HTML_CONTENT: &'static str = include_str!("./index.html");
pub fn launch<T: Properties + 'static>(
pub fn launch(
builder: impl FnOnce(DioxusWebviewBuilder) -> DioxusWebviewBuilder,
props: T,
root: FC<T>,
root: FC<()>,
) -> anyhow::Result<()> {
launch_with_props(builder, (), root)
}
pub fn launch_with_props<P: Properties + 'static>(
builder: impl FnOnce(DioxusWebviewBuilder) -> DioxusWebviewBuilder,
props: P,
root: FC<P>,
) -> anyhow::Result<()> {
WebviewRenderer::run(root, props, builder)
}