зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
8a9665cc0e
Коммит
fa8b3af0f5
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче