Revision ef8e988d1fa60461cb2275fa85542309a05bf04b authored by Mike Pennisi on 03 April 2018, 22:15:29 UTC, committed by Mike Pennisi on 03 April 2018, 22:15:29 UTC
1 parent 81e900a
Raw File
unload-1.html
<!doctype html>
<html>
<head><title>Document</title></head>
<body>
<h1>Document</h1>
<script>
onload = function() {
  document.addEventListener("visibilitychange", onVisibilityChange, false);
  opener.postMessage("close", "*");
}

function onVisibilityChange() {
  opener.postMessage(document.visibilityState, "*");
}
</script>
</body>
</html>
back to top