<!doctype html> | |
<script> | |
function handler(event) { | |
window.top.postMessage(event.sourceCapabilities.customProperty, "*"); | |
} | |
function runTest() { | |
document.querySelector("button").click(); | |
} | |
window.onload = function () { | |
setTimeout(runTest, 1000); | |
window.top.postMessage("start", "*"); | |
} | |
</script> | |
<button onclick="handler(event)"></button> |