https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 1d41dd1610a2dc69e5febf50e5574848ef2173ca authored by James Graham on 14 March 2018, 15:05:06 UTC
Exit wptrunner with an error status if no tests ran
Tip revision: 1d41dd1
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