Bug 1114752 - Uplift Add-on SDK to Firefox a=me
This commit is contained in:
@@ -213,7 +213,7 @@ function show(panel, options, anchor) {
|
||||
// Prevent the panel from getting focus when showing up
|
||||
// if focus is set to false
|
||||
panel.setAttribute("noautofocus", !options.focus);
|
||||
|
||||
|
||||
let window = anchor && getOwnerBrowserWindow(anchor);
|
||||
let { document } = window ? window : getMostRecentBrowserWindow();
|
||||
attach(panel, document);
|
||||
@@ -286,8 +286,7 @@ function make(document) {
|
||||
events.emit(type, { subject: panel });
|
||||
}
|
||||
|
||||
function onContentChange({subject, type}) {
|
||||
let document = subject;
|
||||
function onContentChange({subject: document, type}) {
|
||||
if (document === getContentDocument(panel) && document.defaultView)
|
||||
events.emit(type, { subject: panel });
|
||||
}
|
||||
@@ -411,9 +410,9 @@ function setURL(panel, url) {
|
||||
exports.setURL = setURL;
|
||||
|
||||
function allowContextMenu(panel, allow) {
|
||||
if(allow) {
|
||||
if (allow) {
|
||||
panel.setAttribute("context", "contentAreaContextMenu");
|
||||
}
|
||||
}
|
||||
else {
|
||||
panel.removeAttribute("context");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user