-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.html
26 lines (25 loc) · 1.09 KB
/
tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="content-language" content="en-us" />
<meta charset="utf-8" />
<title>tests</title>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
</head>
<body>
After double click, selection range can be obtained correctly on onclick <br />
event but when I again click on the selected text then updated selection <br />
range should be returned by window selection but this is not happening. <br />
Can anybody tell me if this is a bug in javascript selection or they <br />
have made it this way. And what could be the solution to get the updated <br />
range apart from timer.
<script>
window.setInterval(function() {
//console.log(window.getSelection())
selection = new window.Selection
console.log(selection)
}, 5000)
</script>
</body>
</html>