4 <script src=
"../../resources/dump-as-markup.js"></script>
7 <div contentEditable
id=
"first">
9 <li id=
"listItemBlock">before
<div>div1
</div><div>div2
</div><div>div3
</div>after
</li>
10 <li id=
"listItemInline">before
<span>span1
</span><span>span2
</span><span>span3
</span>after
</li>
11 <li id=
"listItemTable">before
<table border=
"1" cellpadding=
"2" cellspacing=
"2"><tr><td><br/></td></tr></table>after
</li>
14 <div contentEditable
id=
"second">
16 <pre><ul><li id=
"listItemPre">hello
22 Markup
.waitUntilDone();
24 function indentListItem(item
) {
25 window
.getSelection().collapse(item
, 0);
26 document
.execCommand("indent");
29 Array
.prototype.slice
.call(document
.getElementsByTagName('li')).forEach(indentListItem
);
30 Markup
.dump(document
.getElementById('first'), "Indent With Children");
31 Markup
.dump(document
.getElementById('second'), "Indent With Pre");