Bug 746499 - Links in the GCLI output area should open in new window (not in the output area); r=dcamp

This commit is contained in:
Joe Walker 2012-05-30 08:47:28 +01:00
parent 6c4390fb86
commit ced5a9ebe3

View File

@ -6097,6 +6097,12 @@ Output.prototype.toDom = function(element) {
util.setContents(node, output.toString());
}
// Make sure that links open in a new window.
var links = node.querySelectorAll('*[href]');
for (var i = 0; i < links.length; i++) {
links[i].setAttribute('target', '_blank');
}
element.appendChild(node);
};