gecko-dev/dom/html/test/bug1315146-main.html
Ehsan Akhgari 9f297a22d4 Bug 1315146 - Avoid using the Web-facing Range methods in nsTextControlFrame::SetSelectionInternal(); r=baku
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.
2016-11-17 08:24:09 -05:00

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>