use dioxus::prelude::*; #[test] fn static_inner_html() { fn app() -> Element { rsx! { div { dangerous_inner_html: "
1234
" } } } let mut dom = VirtualDom::new(app); dom.rebuild(&mut dioxus_core::NoOpMutations); assert_eq!(dioxus_ssr::render(&dom), r#"
1234
"#); } #[test] fn dynamic_inner_html() { fn app() -> Element { let inner_html = "
1234
"; rsx! { div { dangerous_inner_html: "{inner_html}" } } } let mut dom = VirtualDom::new(app); dom.rebuild(&mut dioxus_core::NoOpMutations); assert_eq!(dioxus_ssr::render(&dom), r#"
1234
"#); }