Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/inserthtml-only-non-editable-nodes.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
addEventListener("load", () => {
const editingHost = document.querySelector("div[contenteditable]");
getSelection().selectAllChildren(editingHost);
document.execCommand(
"insertHTML",
false,
'<ruby contenteditable="false"><rt>annotation</rt>base</ruby>'
);
}, {once: true});
</script>
</head>
<body>
<div contenteditable>text content</div>
</body>
</html>