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