https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 410fe8465f4c5a51d25d95c62a53b569d980c1cf authored by Robert Ma on 19 March 2018, 15:34:37 UTC
Exit check_stability with an error when no tests run
Tip revision: 410fe84
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