1 <!DOCTYPE html> 2 <html> 3 <body> 4 <p>This tests forward deleting 200 characters with 10ms intervals. 5 The caret shown below should not blink while the characters are being deleted.</p> 6 <div id="test" contenteditable></div> 7 <script> 8 9 var test = document.getElementById('test'); 10 var text = ''; 11 for (var i = 0; i < 200; i++) 12 text += 'a'; 13 test.textContent = text; 14 15 test.focus(); 16 getSelection().collapse(test, 0); 17 for (var i = 0; i < 200; i++) 18 setTimeout(function () {document.execCommand('ForwardDelete', false, null);}, i * 10); 19 20 </script> 21 </body> 22 </html> 23