[Project_owners] help with web progress listener
Eric H. Jung
eric.jung at yahoo.com
Sun Jan 7 06:53:29 PST 2007
Hi,
I have a web progress listener that doesn't report the status of inline page components (image, js files, css files, etc)--just the URL entered into the address bar. Anyone know what I need to do to get the status of inline page components, too?
window.addEventListener("load", function() {foxyproxy.wpListener.enable(true);}, false);
window.addEventListener("unload", function() {foxyproxy.wpListener.enable(false);}, false);
foxyproxy.wpListener : {
enable : function(e) {
if (e) {
gBrowser.addProgressListener(this, Components.interfaces.nsIWebProgress.NOTIFY_STATE_ALL);
}
else {
gBrowser.removeProgressListener(this);
}
},
QueryInterface: function(aIID) {
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
},
onStateChange: function(aProgress, req, aFlag, aStatus) {dump("state change\n");},
onLocationChange: function() {dump("location change\n");},
onProgressChange: function() {dump("prog change\n");},
onStatusChange: function() {dump("status change\n");},
onSecurityChange: function() {dump("security change\n");},
onLinkIconAvailable: function() {dump("link icon available\n");}
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070107/019b678d/attachment.html
More information about the Project_owners
mailing list