1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:27:35 +00:00

LibWeb: Don't assume HTMLTableCellElement always has table ancestor

That's not actually a DOM invariant, just something the HTML parser
refuses to build. You can still construct table-less th and td elements
using the DOM API.
This commit is contained in:
Andreas Kling 2024-03-09 20:53:43 +01:00
parent 80547ffc2d
commit b9bacb3ff4
3 changed files with 20 additions and 12 deletions

View file

@ -0,0 +1 @@
PASS (didn't crash)

View file

@ -0,0 +1,12 @@
<body>
<script src="include.js"></script>
<script>
test(() => {
let mfrac = document.createElement("mfrac");
let th = document.createElement("th");
mfrac.appendChild(th);
document.body.appendChild(mfrac);
println("PASS (didn't crash)");
});
</script>
</body>