Open
Description
Version
29.7.0
Steps to reproduce
When setting element.innerText, the returned value is correct, but the DOM is not updated accordingly β specifically, outerHTML and innerHTML do not reflect the change.
See CodeSandbox:
π https://codesandbox.io/p/devbox/affectionate-euler-t3c9rc?workspaceId=ws_SU83iBP9rEAHoSPKtaemDj
const link = document.getElementById("link");
link.innerText = "hello world";
console.log(link.innerText); // β
returns "hello world"
console.log(link.outerHTML); // β still shows original text, not updated
Expected behavior
console.log(link.outerHTML); // -> "hello world"
Actual behavior
console.log(link.outerHTML); // β still shows original text, not updated
Additional context
No response
Environment
npmPackages
"@babel/preset-env": "^7.22.20",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0"