Bug 993272 - Uplift Add-on SDK to Firefox

This commit is contained in:
Erik Vold
2014-04-14 22:56:11 -07:00
parent 096d663d73
commit 8d4372cb2d
24 changed files with 440 additions and 51 deletions

View File

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