Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/the-window-object/open-close/close_pagehide.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Running pagehide handler in window.close()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var t = async_test();
var w = window.open("close_pagehide-1.html");
onmessage = t.step_func(function(event) {
if (event.data != "loaded") {
return;
}
w.close();
});
callback = function() {t.done()}
</script>