I have the following exception under Firefox 40.0.3 / MacOS X.10 and jpm 1.0.0:
JPM undefined *************************
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: tab is null
Full stack: Toolbox.prototype.selectTool@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:1131:5
Toolbox.prototype.open/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:373:13
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:867:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:746:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:688:37
The code which is suppose to generate this exception below.
The URL, and this may be the exception reason is a resource://<>/data/html/options.html
verifrom.tabs.open({
url: optionsPageURL,
inNewWindow:false,
inBackground:false,
isPinned:false,
onReady:function(OptionsTab)
{
console.log(‘Options Tab is ready’, OptionsTab);
var optionsWorker=OptionsTab.attach({
contentScriptFile:[
data.url(‘js/jquery1.7.2.min.js’),
data.url(‘js/options.js’)
]
});
}
onClose: function(OptionsTab)
{
blah blah blah
}
});
Any idea how to fix that? Or is it impossible to attach a content script to a page loaded from add-on resources?
Thanks