Propagate exceptions from the outerText replace step instead of assuming that replacement always succeeds. Replacing the document element with a rendered text fragment can legitimately fail with a DOMException. Add a reduced crash test for setting outerText on documentElement.
7 lines
125 B
HTML
7 lines
125 B
HTML
<!doctype html>
|
|
<script>
|
|
try {
|
|
document.documentElement.outerText = "replacement";
|
|
} catch {
|
|
}
|
|
</script>
|