<!DOCTYPE html> | |
<script> | |
function getTheListener() { | |
return postMessage.bind(this, "respond", "*", undefined) | |
} | |
document.domain = "{{host}}"; | |
onmessage = function (e) { | |
if (e.data == "sendclick") { | |
document.body.click(); | |
} else { | |
parent.postMessage( | |
{ | |
actual: e.origin, | |
expected: "{{location[scheme]}}://{{domains[www1]}}:{{ports[http][0]}}", | |
reason: "Incumbent should have been the caller of addEventListener()" | |
}, | |
"*") | |
}; | |
} | |
</script> |