https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 224b3098a86c3928063db1d85c82978363ffd90b authored by Kent Tamura on 02 April 2018, 08:48:54 UTC
custom-elements: Add tests for callback timing with HTML parser.
Tip revision: 224b309
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