blob: f41773ed2cd00945e844e6ec3abb3c0e49b00854 [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<html>
<body onload="closeOpener()">
<p>This window should close its opener.</p>
<script src="/common/PrefixedLocalStorage.js"></script>
<script>
var prefixedLocalStorage = new PrefixedLocalStorageResource({
close_on_cleanup: true
});
var prefixedLocalStorage = new PrefixedLocalStorageResource({
close_on_cleanup: true
});
function closeOpener () {
if (window.opener) {
window.opener.close();
// Give the browsing context a chance to dispose of itself
function waitForContextDiscard () {
if (window.opener === null) {
return prefixedLocalStorage.setItem('openerIsNull', 'true');
}
return setTimeout(waitForContextDiscard, 0);
}
waitForContextDiscard();
}
}
</script>
</body>
</html>