Say the user closes the tab corresponding to the current page, at moment t1, at which a script was running:
<script>
foo();
// t1 <----------
bar();
</script>
Will the rest of the <script>
run? Or is Javascript execution killed immediately?
I can imagine how given a second <script>
below the described one, this second script will never run. But maybe the first one is treated like a single, uninterruptible thing?