in my Firefox-Extension I've allready implemented the method onLocationChange() of my Progresslistener. The Change of the URI in the Location bar is detected correctly. Now I want to implement the method onProgressChange().
What I tried to do here: I'd like to detect, when a defined URI is requested. Just for starting, I tried to alert the requested URI:
onProgressChange: function(aWebProgress, aRequest, curSelf, maxSelf, curTot, maxTot) {
if (aRequest != null) {
var reqName = aRequest.name;
alert(reqName);
} else {
alert("Request is null");
}
}
So, I thought requesting a Website would fire this method and aRequest.name has to be the URL of the requested page. But instead there is only the alert "is null" for several times...
Can anybody please help me on that issue?
I read in the docs, that the Name Attribute not always is the requested URI. Is there a better way to get the requested URI?
Thank you all very much for help!