Handled window.close and related things such as disposing tabs.