Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<script src="/common/get-host-info.sub.js"></script>
<iframe id="iframe" width="200" height="100"></iframe>
<script>
iframe.src =
get_host_info().ORIGIN + "/html/interaction/focus/the-autofocus-attribute/resources/grand-child-autofocus.html";
window.addEventListener("message", event => {
if (event.data == "grand_child_loaded") {
parent.postMessage("ready", "*");
} else if (event.data == "report_focus_state") {
frames[0].postMessage("report_focus_state", "*");
} else if (event.data == "grand_child_is_focused" ||
event.data == "grand_child_is_not_focused") {
parent.postMessage(event.data, "*");
}
});
</script>