Skip to content Skip to sidebar Skip to footer

Google Chrome Userscripts Reference Window.open

I have been trying to figure this one out for a while, but when I try to reference a window that I opened the handle is always undefined. It is worth noting that this is being used

Solution 1:

Why are you trying to close existing window before open a new one? you don't need to do that.

if you just use the same name for window when you open it, it will replace the existing one if there is.

this means you don't need to look for if there is an opened window.

functionshowDonateWindow()
{
    if (window.confirm("Question here"))
    {
        window.open("http://somesite.com/","donateWindowName");
    }
}

Post a Comment for "Google Chrome Userscripts Reference Window.open"