OLD | NEW |
---|---|
(Empty) | |
1 | |
2 <body> | |
3 <h5> | |
4 aa | |
5 <textarea></textarea> | |
6 </h5> | |
7 <dl> | |
8 aa | |
9 </dl> | |
10 </body> | |
11 | |
12 <script> | |
Yuta Kitamura
2014/02/26 10:41:16
Technically, <script> should not appear after
<bod
yoichio
2014/02/27 04:00:03
Done.
| |
13 document.addEventListener("DOMContentLoaded", function () { | |
Yuta Kitamura
2014/02/26 10:41:16
You need to tell the layout test harness that
this
yoichio
2014/02/27 04:00:03
Done.
| |
14 var oSelection = window.getSelection(); | |
Yuta Kitamura
2014/02/26 10:41:16
nit: "oSelection" is awkward naming convention
and
yoichio
2014/02/27 04:00:03
Done.
| |
15 document.execCommand("SelectAll", false); | |
16 oSelection.deleteFromDocument(); | |
17 }, true); | |
18 | |
19 var count = 0; | |
20 document.addEventListener("DOMSubtreeModified", function () { | |
21 count++; | |
22 if (count < 3) { | |
23 var oElement = event.srcElement; | |
24 oElement.contentEditable = "true"; | |
25 oElement.innerHTML = '<div></div>'; | |
26 document.execCommand('InsertOrderedList', false, false); | |
27 } | |
28 }, false); | |
29 </script> | |
OLD | NEW |