I have an application window that displays a button. On button click, a new tab is opened with window.open javascript function and later I would like to be able to detect if that link is opened or not and if it is, I need to close that window. Can this be done in Firefox开发者_StackOverflow社区 ?
Thanks.
The window.open()
function returns a Window
object. Just call close()
on it:
var childWindow = window.open(....);
...
childWindow.close();
精彩评论