manually.rs 630 B

1234567891011121314151617181920212223
  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. // CreatePlaceholder { id: 1 },
  8. CreateElement { tag: "h1", id: 2 },
  9. CreateTextNode {
  10. text: "hello world",
  11. id: 3,
  12. },
  13. AppendChildren { many: 1 },
  14. AppendChildren { many: 1 },
  15. AppendChildren { many: 1 },
  16. // ReplaceWith { many: 1 },
  17. ];
  18. dioxus_desktop::WebviewRenderer::run_with_edits(App, (), |c| c, Some(edits)).expect("failed");
  19. }
  20. const App: FC<()> = |cx| todo!();