I think that I've found a bug in the add-on SDK. When I try to load a tab doing something like this:
var t = tabs.open({
url: linkURL,
inBackground: true,
onReady: closeTab(this)
});
And the URL is an image. The onReady event is never fired.
Is that the expected behaviour?
Thanks
I'm not sure whether this counts as a bug but you should probably file a bug report to see what the developers think about it. The problem is that the SDK waits for the DOMContentLoaded
event to recognize that the tab is ready - but Gecko doesn't fire this event for image documents. The SDK could use a web progress listener instead, these work regardless of the document type.