Merge branch 'master' into breaking

This commit is contained in:
Evan Almloff committed 2024-01-15 12:01:09 -06:00
commit d17a04931b
9 files changed
+99 -80

No files matched your search

+16 -35
View File
@@ -11,57 +11,38 @@ fn app() -> Element {
rsx! {
div {
"hello axum! {num}"
button {
class: "increment-button",
onclick: move |_| num += 1, "Increment"
}
}
svg {
circle { cx: 50, cy: 50, r: 40, stroke: "green", fill: "yellow" }
}
div {
class: "raw-attribute-div",
"raw-attribute": "raw-attribute-value",
}
div {
class: "hidden-attribute-div",
hidden: true,
button { class: "increment-button", onclick: move |_| num += 1, "Increment" }
}
svg { circle { cx: 50, cy: 50, r: 40, stroke: "green", fill: "yellow" } }
div { class: "raw-attribute-div", "raw-attribute": "raw-attribute-value" }
div { class: "hidden-attribute-div", hidden: true }
div {
class: "dangerous-inner-html-div",
dangerous_inner_html: "<p>hello dangerous inner html</p>",
}
input {
value: "hello input",
}
div {
class: "style-div",
color: "red",
"colored text"
dangerous_inner_html: "<p>hello dangerous inner html</p>"
}
input { value: "hello input" }
div { class: "style-div", color: "red", "colored text" }
button {
class: "eval-button",
onclick: move |_| {
let eval = eval_provider(
r#"
window.document.title = 'Hello from Dioxus Eval!';
dioxus.send("returned eval value");
"#).unwrap();
r#"
window.document.title = 'Hello from Dioxus Eval!';
dioxus.send("returned eval value");
"#,
)
.unwrap();
let setter = eval_result.setter();
async move {
// Set the window title
let result = eval.recv().await;
if let Ok(serde_json::Value::String(string)) = result {
setter(string);
}
}},
}
},
"Eval"
}
div {
class: "eval-result",
"{eval_result}"
}
div { class: "eval-result", "{eval_result}" }
})
}