https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d3cec900217a525b6da759c9194838632f0bf27d authored by Yutaka Hirano on 27 March 2018, 06:25:56 UTC
fix
Tip revision: d3cec90
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