Test tab listener
This commit is contained in:
parent
d738bfbc17
commit
149c277c75
1 changed files with 6 additions and 6 deletions
12
index.js
12
index.js
|
@ -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;
|
|
||||||
|
|
Loading…
Reference in a new issue