My understanding is that there is a single window object for JavaScript, which contains everything (document object, elements, etc...). I know that you can for example, click a button which runs the JS code window.open() to create a new window, and that window is a 'frame' inside the top level window object. My question is what happens when the top level window is closed, since the other windows that are opened don't get closed as well, does the top level window object change to one of the open windows?