mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
close.html and unload.html previously wrote to __dirname + '/close'|'/unload' inside spec/fixtures/api/ itself. Pass the output path via ?out= query param and use a pid+timestamp tmp file so parallel workers and retries never race.
12 lines
309 B
HTML
12 lines
309 B
HTML
<html>
|
|
<body>
|
|
<script type="text/javascript" charset="utf-8">
|
|
window.addEventListener('unload', function (e) {
|
|
const out = new URLSearchParams(location.search).get('out');
|
|
require('node:fs').writeFileSync(out, 'close');
|
|
}, false);
|
|
window.onload = () => window.close();
|
|
</script>
|
|
</body>
|
|
</html>
|