Skip to content

Commit

Permalink
junk: Any chance this performs better
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Apr 30, 2024
1 parent c17c7c0 commit b053667
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,16 +403,15 @@ function diffElementNodes(
return document.createTextNode(newProps);
}

if (namespace == 1) {
dom = document.createElement(nodeType, newProps.is && newProps);
} else {
dom = document.createElementNS(
namespace == 2
? 'http://www.w3.org/2000/svg'
: 'http://www.w3.org/1998/Math/MathML',
nodeType
);
}
dom = document.createElementNS(
namespace == 1
? 'http://www.w3.org/1999/xhtml'
: namespace == 2
? 'http://www.w3.org/2000/svg'
: 'http://www.w3.org/1998/Math/MathML',
nodeType,
newProps.is && newProps
);

// we created a new parent, so none of the previously attached children can be reused:
excessDomChildren = null;
Expand Down

0 comments on commit b053667

Please sign in to comment.