https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d2bf9c1b6f8586eb11fe98fccb8b9a1cfe7cffde authored by Geoffrey Sneddon on 19 March 2018, 15:19:55 UTC
Rename host -> browser_host and host_ip -> server_host
Tip revision: d2bf9c1
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