manually.rs 562 B

12345678910111213141516171819202122
  1. use dioxus_core::*;
  2. fn main() {
  3. use DomEdit::*;
  4. // .. should result in an "invalid node tree"
  5. let edits = vec![
  6. CreateElement { tag: "div", id: 0 },
  7. CreateElement { tag: "h1", id: 2 },
  8. CreateTextNode {
  9. text: "hello world",
  10. id: 3,
  11. },
  12. AppendChildren { many: 1 },
  13. AppendChildren { many: 1 },
  14. AppendChildren { many: 1 },
  15. ];
  16. dioxus_desktop::WebviewRenderer::run_with_edits(App, (), |c| c, Some(edits)).expect("failed");
  17. }
  18. const App: FC<()> = |cx, props| todo!();