Use childNode.remove() instead of parentNode.removeChild() (S7762)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -333,7 +333,7 @@ function getTextWidth(text, e) {
|
||||
hiddenSpan.style.visibility = "hidden";
|
||||
document.body.appendChild(hiddenSpan);
|
||||
const width = hiddenSpan.getBoundingClientRect().width;
|
||||
document.body.removeChild(hiddenSpan);
|
||||
hiddenSpan.remove();
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user