Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/selection-modify-after-body-removed-in-design-mode.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
addEventListener("DOMContentLoaded", () => {
document.designMode = "on";
const range = document.createRange();
range.selectNode(document.body);
getSelection().addRange(range);
document.documentElement.focus();
document.body.remove();
getSelection().modify("move", "forward", "word");
}, {once: true});
</script>
</head>
<body></body>
</html>