Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/insertparagraph-in-editable-dl-outside-body.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
document.addEventListener("DOMContentLoaded", () => {
const dl = document.createElement("dl");
const dd = document.createElement("dd");
const p = document.createElement("p");
dd.appendChild(p);
dl.appendChild(dd);
document.documentElement.appendChild(dl);
dl.contentEditable = true;
getSelection().collapse(p, 0);
document.execCommand("insertParagraph");
}, {once: true});
</script>
</head>
<body></body>
</html>