Originally posted by CoolGuy:
This will add some light to your quest:
https://developer.mozilla.org/...Web/API/Window/close If you're thinking of utilizing window.close(); to help you, you will only be able to use it if the window was opened first with a script as well. It's a security thing.
You may/may not be able to dynamically do this depending on what is happening in your scenario.
Good luck!