I am stuck with my Add-on and would love some help.
My Add-on looks at the current Tab that is in focus and tells you what ID’s were requested from that Tab page. The ID’s are collect from the PUT requests the page that is currently loaded in the Tab. The problem I am having is that I only know how to listen to the Global HTTP requests and don’ know how to figure out which request went with which URL or Tab.
I am using Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
. My observer see’s all the URL requests, so I just have one giant list, not a list per Tab.
observe: function (subject, topic, data) {
if (topic == "http-on-opening-request") {
subject.QueryInterface(Ci.nsIHttpChannel);
var url = subject.URI.spec;
// what I wish todo: figure out the Tab or Tab url
// (page that made the request) here.
myModel.addUrlForTab(url, tab);
}
}
Any help would be greatly appreciated.
-H