- Refactoring: Avoid redundant creation of text node for strings when passing to append

This commit is contained in:
Brett Zamir
2020-01-04 16:43:03 +08:00
parent 332a562876
commit 92f8a5be57
3 changed files with 6 additions and 6 deletions

View File

@@ -89,7 +89,7 @@ describe('recalculate', function () {
tspan.setAttribute('x', '200');
tspan.setAttribute('y', '150');
const theText = document.createTextNode('Foo bar');
const theText = 'Foo bar';
tspan.append(theText);
elem.append(tspan);
svg.append(elem);