OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
yosin_UTC9
2014/06/11 09:02:51
nit: Could you add <!DOCTYPE html> to make Blink i
Yuta Kitamura
2014/06/12 06:23:25
I thought that was impossible because the original
| |
2 <body> | |
3 <div contentEditable="true"><select></div> | |
4 <script type="text/javascript"> | |
5 var div = document.getElementsByTagName('div')[0]; | |
6 | |
7 var selection = window.getSelection(); | |
8 | |
9 div.focus(); | |
10 document.execCommand('SelectAll'); | |
11 document.execCommand('Indent'); | |
12 document.execCommand('Outdent'); | |
13 | |
14 var anotherDocument = document.implementation.createHTMLDocument(''); | |
15 anotherDocument.body.appendChild(selection.getRangeAt(0).extractContents()); | |
16 | |
17 div.contentEditable = false; | |
18 | |
19 document.execCommand('Undo'); | |
20 document.execCommand('FindString', false, 'x'); | |
21 | |
22 window.setTimeout(notifyFinish, 0); | |
yosin_UTC9
2014/06/11 09:02:51
Q: Is it better to use jsTestIsAsync and finishJST
Yuta Kitamura
2014/06/12 06:23:25
Fixed by removing iframe file.
| |
23 | |
24 function notifyFinish() | |
25 { | |
26 window.parent.postMessage('FINISH', '*'); | |
27 } | |
28 | |
yosin_UTC9
2014/06/11 09:02:51
nit: Please remove an extra blank line.
Yuta Kitamura
2014/06/12 06:23:25
Fixed by removing iframe file.
| |
29 </script> | |
30 </body> | |
31 </html> | |
OLD | NEW |