blob: e9f356dda6d3298b634cbac05877631e3a11542c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<!DOCTYPE HTML>
<iframe src="http://example.org/tests/dom/html/test/bug1315146-iframe.html"></iframe>
<input value="test">
<script>
document.domain = "example.org";
onload = function() {
let iframe = document.querySelector("iframe");
let input = document.querySelector("input");
input.selectionStart = input.selectionEnd = 2;
document.body.style.overflow = "scroll";
iframe.contentDocument.body.offsetWidth;
opener.postMessage({start: input.selectionStart,
end: input.selectionEnd}, "*");
}
</script>
|