https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 88aea18be3e13ecfe9c14568cf8795abd54ada08 authored by Joe Downing on 11 April 2018, 01:49:46 UTC
[KeyboardLock] Updating API to reject the first promise if lock is called twice
Tip revision: 88aea18
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