mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 08:24:58 +00:00

There were multiple bugs in the parsing algorithm for handling text occurring inside a `table` element: - When there was pending non-whitespace text inside a table, we only flushed one token instead of all pending tokens. - Also, we didn't even flush one of the right tokens, but instead the token that caused the flush to happen. - Once we started flushing the right tokens, it turned out we had not yet implemented character insertion points expressed as "before X". - Finally, we were not exiting the "in table text" mode after flushing pending tokens, effectively getting us stuck in that mode until EOF.
10 lines
329 B
HTML
10 lines
329 B
HTML
<script src="include.js"></script>
|
|
<body><table><tr>PASS</tr></table></body>
|
|
<script>
|
|
test(() => {
|
|
// Remove the table. "PASS" should still be visible,
|
|
// as the HTML parser inserts it *before* the table
|
|
// under these circumstances.
|
|
document.querySelector("table").remove()
|
|
});
|
|
</script>
|