textarea-selection-while-parsing.xhtml (549B)
1 <?xml version="1.0"?> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <body> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <textarea> 7 a 8 <script>document.querySelector('textarea').value = 'ggg';</script> 9 b 10 </textarea> 11 <script> 12 test(() => { 13 let ta = document.querySelector('textarea'); 14 assert_equals(ta.selectionStart, 3); 15 assert_equals(ta.selectionEnd, 3); 16 }, 'Value setter while parsing textarea children should move ' + 17 'selection{Start,End} to the end'); 18 </script> 19 </body> 20 </html>