4 document
.execCommand("insertUnorderedList");
7 document
.execCommand("delete");
11 function onToggle1() {
13 getSelection().collapse(
14 document
.querySelector("font"),
20 function onToggle2() {
21 // For emulating the traditional behavior, collapse Selection to end of the
22 // text node in the <summary> which is the last child of the <body>.
23 const summary
= document
.querySelector("summary");
24 getSelection().collapse(summary
.firstChild
, summary
.firstChild
.length
);
26 document
.querySelector("label").appendChild(
27 document
.querySelector("font")
32 <body onload=
"onLoad()">
33 <label contenteditable
>
34 <details ontoggle=
"onToggle2()" open
>
37 <details ontoggle=
"onToggle1()" open
>
40 </details></font></summary></body>