Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/move-first-element-from-editinghost-to-outside-on-input-of-embolden.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
addEventListener("load", () => {
document.querySelector("ol").addEventListener("input", () => {
const inlineEditingHost = document.querySelector("span[contenteditable]");
const iter = document.createNodeIterator(inlineEditingHost, NodeFilter.SHOW_ELEMENT);
iter.nextNode().before(inlineEditingHost);
});
document.execCommand("selectAll");
document.execCommand("bold");
});
</script>
</head>
<body>
<ol>
<span contenteditable>
<h6></h6>
</span></ol></body>
</html>