[Project_owners] Two Mozilla questions (how to get the size of a
document and about onload eventlisteners)
havar at henriksen.nu
Tue Mar 8 00:46:41 EST 2005
I have two Mozilla Firefox/Gecko releated questions.
1. How do I get the filesize of the current loaded document? (I can't
use the filesize reported in the page info dialog, because if the
document is gzip content encoded it will show that size, rather than the
uncompressed size of the document. I actually need both sizes)
2. I have a load, select and unload code for checking when a page is
loaded/unloaded or when a tab is selected.
The code looks like this:
gBrowser.addEventListener("load", headerinfoWatcher.updateStatus, true);
In the load/unload codepart, how could I check if the page is
loaded/unloaded in the background or not? Because the extension I'm
working on is showing some icons in the statusbar with information from
the current document, and I only want to do that with documents in the
foreground, not the ones in the background.
doron on #mozilla said that I should use a webProgressListener instead
of a eventListener, but I'm not sure how to do that.
Håvar I. Henriksen
Community Manager Mozilla Norge || "To err is human, to forgive is
havar at firefox.no || divine - but to forget it altogether
home.no.net/havarhen || is humane."
firefox.no norwegian Mozilla resource
More information about the Project_owners