mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 07:02:54 +00:00
This implementation pretends we never have a selection. GitHub relies on these values to know where to insert text corresponding to file uploads.
15 lines
517 B
HTML
15 lines
517 B
HTML
<textarea id="textarea"></textarea>
|
|
<script src="include.js"></script>
|
|
<script type="text/javascript">
|
|
test(() => {
|
|
let textarea = document.getElementById("textarea");
|
|
textarea.focus();
|
|
|
|
println(`selectionStart: ${textarea.selectionStart}`);
|
|
println(`selectionEnd: ${textarea.selectionEnd}`);
|
|
|
|
textarea.value = "Well hello friends";
|
|
println(`selectionStart: ${textarea.selectionStart}`);
|
|
println(`selectionEnd: ${textarea.selectionEnd}`);
|
|
});
|
|
</script>
|