mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
9f297a22d4
The Web-facing methods perform access checks which blow up when the stars are aligned such that we run this code under a subject principal that doesn't have access to the anchor node of the selection.
16 lines
535 B
HTML
16 lines
535 B
HTML
<!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>
|