Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelleyrtp committed Jan 31, 2025
1 parent 2a65c4f commit 170cff5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/native/src/dioxus_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ impl DioxusDocument {
let mut stylesheet = None;
let mut title = None;
if name == "link" {
let is_stylsheet = attributes
let is_stylesheet = attributes
.iter()
.any(|(name, value)| name == "rel" && value == "stylesheet");
if is_stylsheet {
if is_stylesheet {
stylesheet = attributes
.iter()
.find(|(name, _value)| name == "href")
Expand All @@ -516,7 +516,7 @@ impl DioxusDocument {
})
.collect();

let new_elememt = self
let new_element = self
.inner
.create_node(NodeData::Element(ElementNodeData::new(
qual_name(name, None),
Expand All @@ -526,7 +526,7 @@ impl DioxusDocument {
if let Some(contents) = contents {
let text_node = self.inner.create_text_node(contents);
self.inner
.get_node_mut(new_elememt)
.get_node_mut(new_element)
.unwrap()
.children
.push(text_node);
Expand All @@ -536,10 +536,10 @@ impl DioxusDocument {
.get_node_mut(self.head_element_id)
.unwrap()
.children
.push(new_elememt);
.push(new_element);

if let Some(url) = stylesheet {
crate::assets::fetch_linked_stylesheet(&self.inner, new_elememt, url);
crate::assets::fetch_linked_stylesheet(&self.inner, new_element, url);
}

if let Some(_title) = title {
Expand Down
2 changes: 1 addition & 1 deletion packages/native/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum DioxusNativeEvent {

/// Create a new head element from the Link and Title elements
///
/// todo(jon): these should probabkly be syncronous somehow
/// todo(jon): these should probabkly be synchronous somehow
CreateHeadElement {
window: WindowId,
name: String,
Expand Down

0 comments on commit 170cff5

Please sign in to comment.