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");
// a dummy function, to show how tests work.
// to see how to test this function, look at test/test-index.js
function dummy(text, callback) {
callback(text);
}
require("sdk/tabs").on("ready", getLinks);
exports.dummy = dummy;
function getLinks(tab) {
tab.attach({
contentScript: "if (document.body) document.body.style.border = '5px solid red';"
});
}