[Project_owners] Re: nsIDownloadManager and SeaMonkey
Philip Chee
philip.chee at gmail.com
Mon Jul 17 22:57:22 EDT 2006
On Mon, 17 Jul 2006 14:46:08 +0100, Neil wrote:
> Philip Chee wrote:
>>I have no idea where I can hook up a progress listener to using stuff available in SeaMonkey.
> You shouldn't be hooking your own progress listener up; that's reserved
> for the download manager.
According to XULPlanet, the listener property is read/write.
This is what downloadstatusbar does:
(Note it uses it's own UI to display downloads, not downloads.xul)
<http://www.mozdev.org/source/browse/~checkout~/downloadstatusbar/source/downbar/chrome/content/downbaroverlay.js?rev=1.6&content-type=text/plain>
const db_dlmgrContractID = "@mozilla.org/download-manager;1";
const db_dlmgrIID = Components.interfaces.nsIDownloadManager;
db_gDownloadManager =
Components.classes[db_dlmgrContractID].getService(db_dlmgrIID);
......
db_gDownloadManager.listener = dbListener;
......
const dbListener = {
onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {
......
Phil
--
-==-
Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
More information about the Project_owners
mailing list