Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<script>
window.addEventListener("message", e => {
var i = document.createElement('img');
i.onload = () => { e.ports[0].postMessage("Load"); }
i.onerror = () => { e.ports[0].postMessage("Error"); }
if (e.data == "relative") {
i.src = "/images/green.png";
} else if (e.data == "same-origin-matching") {
} else if (e.data == "cross-origin-matching") {
} else {
}
});
(window.opener || window.parent).postMessage("Hi!", "*");
</script>