https://github.com/web-platform-tests/wpt
Raw File
Tip revision: b43aa57353147e6ffc3799651de2b246835c2a8a authored by Mike West on 24 July 2018, 12:41:46 UTC
Correctly propagate request initiator for 'noopener'
Tip revision: b43aa57
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