Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/insert-image-with-joining-header-element-and-body.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<script>
window.addEventListener("load", () => {
const heading = document.getElementById("heading")
heading.appendChild(input)
const selection = window.getSelection()
const range = new Range()
range.setStartBefore(input)
heading.contentEditable = true
document.execCommand("selectAll", false, null)
document.designMode = "on"
selection.addRange(range)
range.setEndBefore(heading)
range.setEndAfter(heading)
})
</script>
</head>
<h4 id="heading"></h4>
<!-- COMMENT -->
</html>