3 // For emulating the traditional behavior, collapse Selection to end of the
4 // text node in the <dialog> which is the deepest last child of the <body>.
5 const dialog
= document
.querySelector("dialog");
6 getSelection().collapse(dialog
.lastChild
, dialog
.lastChild
.length
);
7 document
.execCommand("insertImage", false, "o")
10 <body onload=
"onLoad()">
11 <meter contenteditable
>
13 </dialog></meter></body>