https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f501e13e0c86d67b6530673548b9a4c24eaf4240 authored by Joshua Bell on 13 March 2018, 18:24:51 UTC
add back in missing words
Tip revision: f501e13
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