Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/replace-body-after-designMode-off-and-making-editing-host.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", async () => {
document.designMode = "on";
const style = document.createElement("style");
document.documentElement.appendChild(style);
document.designMode = "off";
style.setAttribute("contenteditable", "true");
document.documentElement.innerHTML = "<div></div>";
}, {once: true});
</script>
</head>
<body></body>
</html>