From f9f30263d3f77325adf6fabf330e06814ce7320f Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Thu, 24 Jul 2025 01:35:42 +0100 Subject: [PATCH] Fix title example on native (#4463) Signed-off-by: Nico Burns --- packages/native-dom/src/dioxus_document.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/native-dom/src/dioxus_document.rs b/packages/native-dom/src/dioxus_document.rs index c2bd53990..740523ef2 100644 --- a/packages/native-dom/src/dioxus_document.rs +++ b/packages/native-dom/src/dioxus_document.rs @@ -164,14 +164,9 @@ impl DioxusDocument { let new_elem_id = mutr.create_element(qual_name(name, None), attributes); mutr.append_children(self.head_element_id, &[new_elem_id]); if let Some(contents) = contents { - mutr.append_text_to_node(new_elem_id, contents).unwrap(); + let text_node_id = mutr.create_text_node(contents); + mutr.append_children(new_elem_id, &[text_node_id]); } - - // TODO: set title (we may also wish to have this built-in to the document?) - // if name == "title" { - // let title = mutr.doc.nodes[new_elem_id].text_content(); - // - // } } }