summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/textfieldselection/setSelectionRange.html
blob: bdf52a77f873069e2e49972e4ea484555f59975b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<textarea>

</textarea>
<script>
test(function() {
    let textarea = document.querySelector('textarea');
    assert_equals(textarea.selectionStart, 0);
    assert_equals(textarea.selectionEnd, 0);
    textarea.setSelectionRange(0, 1);
    assert_equals(textarea.selectionStart, 0);
    assert_equals(textarea.selectionEnd, 1);
}, "setSelectionRange on line boundaries");
</script>