Bug 889157 - Uplift Add-on SDK to Firefox r=me

This commit is contained in:
Wes Kocher
2013-07-09 19:15:10 -07:00
parent 3c88ff4619
commit 2d46c72bda
97 changed files with 8913 additions and 1296 deletions

View File

@@ -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;