<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>focus() from next tick before iframe loaded same site</title>
</head>
<body>
<script>
    window.onload = function() {
        parent.postMessage("onload", "*");
    }
    document.body.onfocus = function() {
        parent.postMessage("onfocus", "*");
    }
</script>
</body>
</html>
