blob: 7c213b1f27351d8dc489e27adf72c9f022aeb2d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<script>
function onError() {
// For emulating the traditional behavior, collapse Selection to end of the
// text node in the <dl> which is the last deepest child of the <body>.
const dl = document.querySelector("dl");
getSelection().collapse(dl.lastChild, dl.lastChild.length);
getSelection().selectAllChildren(
document.querySelector("img")
);
document.execCommand("insertUnorderedList");
document.execCommand("enableObjectResizing");
}
</script>
<dd contenteditable="true">
<audio src="data:text/html,foo" onerror="onError()">
<img></img>
<dl>
</dl></audio><dd></body>
|