Bug 889157 - Uplift Add-on SDK to Firefox r=me
This commit is contained in:
@@ -389,3 +389,16 @@ function getOwnerBrowserWindow(node) {
|
||||
});
|
||||
}
|
||||
exports.getOwnerBrowserWindow = getOwnerBrowserWindow;
|
||||
|
||||
function getParentWindow(window) {
|
||||
try {
|
||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem).parent
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
}
|
||||
catch (e) {}
|
||||
return null;
|
||||
}
|
||||
exports.getParentWindow = getParentWindow;
|
||||
|
||||
Reference in New Issue
Block a user