Test tab listener

This commit is contained in:
Klaus-Uwe Mitterer 2016-07-19 17:31:03 +02:00
parent d738bfbc17
commit 149c277c75

View file

@ -1,9 +1,9 @@
var self = require("sdk/self"); var self = require("sdk/self");
// a dummy function, to show how tests work. require("sdk/tabs").on("ready", getLinks);
// to see how to test this function, look at test/test-index.js
function dummy(text, callback) { function getLinks(tab) {
callback(text); tab.attach({
contentScript: "if (document.body) document.body.style.border = '5px solid red';"
});
} }
exports.dummy = dummy;