blob: cb17789b45055c280ff3a5f6be515a39758e34cc (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<!DOCTYPE html>
<script src="utils.js"></script>
<title>Fenced frame content to report any changes in inner dimensions</title>
<style>
body {
width: 500px;
height: 500px;
background: grey;
}
</style>
<body>
<script>
let eventCount = 0;
async function init() {
const [resize_lock_inner_page_is_ready_key,
resize_lock_resize_is_done_key,
resize_lock_report_click_location_key,
resize_lock_report_click_location_key_after_resize,
resize_lock_report_click_location_key_after_resize_2] = parseKeylist();
window.addEventListener('mousedown', async (event) => {
eventCount++;
let point = event.clientX + "," + event.clientY;
if (eventCount == 1) {
writeValueToServer(resize_lock_report_click_location_key, point);
await nextValueFromServer(resize_lock_resize_is_done_key)
} else if (eventCount == 2) {
writeValueToServer(
resize_lock_report_click_location_key_after_resize, point);
} else {
writeValueToServer(
resize_lock_report_click_location_key_after_resize_2, point);
}
});
writeValueToServer(resize_lock_inner_page_is_ready_key, "ready");
}
init();
</script>
</body>
</html>
|