I needed to prevent a webpage from closing automatically. Turns out this is very easy to do with JavaScript!