blob: 7e47275b6ce5204e304b30566667d9751f3dcfb0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
window.addEventListener("message", (evt) => {
const url = evt.data;
const xhr = new XMLHttpRequest;
xhr.open("GET", url, false);
try {
xhr.send();
} catch(e) {
parent.postMessage("Exception thrown. Sandboxed iframe XHR access was denied in 'send'.", "*");
return;
}
parent.postMessage(xhr.responseText, "*");
}, false);
parent.postMessage("ready", "*");
</script>
</body>
</html>