Bug 993272 - Uplift Add-on SDK to Firefox
This commit is contained in:
@@ -31,6 +31,9 @@ let detachFrom = method("detatchFrom");
|
||||
exports.detachFrom = detachFrom;
|
||||
|
||||
function attach(modification, target) {
|
||||
if (!modification)
|
||||
return;
|
||||
|
||||
let window = getTargetWindow(target);
|
||||
|
||||
attachTo(modification, window);
|
||||
@@ -42,6 +45,9 @@ function attach(modification, target) {
|
||||
exports.attach = attach;
|
||||
|
||||
function detach(modification, target) {
|
||||
if (!modification)
|
||||
return;
|
||||
|
||||
if (target) {
|
||||
let window = getTargetWindow(target);
|
||||
detachFrom(modification, window);
|
||||
|
||||
Reference in New Issue
Block a user