Bug 349841: use the window watcher to launch the links from the about dialog instead of relying on window.opener, to ensure that the links work regardless of where the about dialog was opened from, r=mano

This commit is contained in:
gavin%gavinsharp.com 2006-08-25 16:34:34 +00:00
Родитель 8a9665cc0e
Коммит fa8b3af0f5
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -224,8 +224,16 @@ function visitLink(aEvent) {
while (node.nodeType != Node.ELEMENT_NODE)
node = node.parentNode;
var url = node.getAttribute("link");
if (url != "")
top.opener.openNewWindowWith(url, null, false, false);
if (!url)
return;
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
var argstring = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
argstring.data = url;
ww.openWindow(null, "chrome://browser/content/browser.xul", "_blank",
"chrome,all,dialog=no", argstring);
}
function isValidLeftClick(aEvent, aName)