Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Could you add "<!DOCTYPE html>" to make Blink
keishi
2015/01/16 05:08:41
Done.
| |
| 2 <body> | |
| 3 <button type="button" id="button1">FOOO</button> | |
| 4 | |
| 5 <script> | |
| 6 var button1 = document.getElementById('button1'); | |
| 7 var input1=document.createElement('input'); | |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Please put spaces around |=|
keishi
2015/01/16 05:08:41
Done.
| |
| 8 button1.appendChild(input1); | |
|
yosin_UTC9
2015/01/14 01:33:44
Can we put <input type="week"> in markup rather th
keishi
2015/01/16 05:08:41
Done. Changing the type later is the important bit
| |
| 9 input1.setSelectionRange(0); | |
| 10 input1.type='week'; | |
|
yosin_UTC9
2015/01/14 01:33:44
nit: Please put spaces around |=|
keishi
2015/01/16 05:08:41
Done.
| |
| 11 var oSelection = window.getSelection(); | |
| 12 document.execCommand('SelectAll', false, false); | |
|
yosin_UTC9
2015/01/14 01:33:44
nit: We need first argument only.
keishi
2015/01/16 05:08:41
Done.
| |
| 13 oSelection.deleteFromDocument(); | |
| 14 input1.value = 'foo'; | |
| 15 </script> | |
| 16 <p>Pass if it doesn't crash</p> | |
| 17 </body> | |
| 18 </html> | |
| OLD | NEW |