mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
17 lines
606 B
HTML
17 lines
606 B
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<script src="include.js"></script>
|
||
|
|
<textarea id="textarea">hello hmmm</textarea>
|
||
|
|
<script>
|
||
|
|
asyncTest(done => {
|
||
|
|
const textarea = document.getElementById("textarea");
|
||
|
|
textarea.addEventListener("selectionchange", event => {
|
||
|
|
const start = textarea.selectionStart;
|
||
|
|
const end = textarea.selectionEnd;
|
||
|
|
println(`selectionchange event dispatched on textarea should bubble: ${event.bubbles}`);
|
||
|
|
println(`Selected range: ${start} - ${end}`);
|
||
|
|
done();
|
||
|
|
});
|
||
|
|
textarea.setSelectionRange(6, 10);
|
||
|
|
});
|
||
|
|
</script>
|