> 
> 
> I would like to know how I would write my own event queque, but there 
> is no real example is js that I could find.  I would like to keep my 
> xpapp in js as much as possible.  Could someone just whip up a little 
> snippet of code that pulls the contents of a web page so that I can 
> see how it is done?
> 
> -thanks
> 

Well, sync http should work.  But until it does, you can try doing 
something like this:

var eventQServiceContractID = "@mozilla.org/event-queue-service;1"
eventQService = 
Components.classes[eventQServiceContractID].createInstance();
eventQService = 
eventQService.QueryInterface(Components.interfaces.nsIEventQueueService);

eventQServcie.CreateThreadEventQueue();
var eventQ = eventQServcie.getSpecialEventQueue(0);
eventQ = eventQ.QueryInterface(Components.interfaces.nsIEventQueue);


// somewhere in a loop:

eventQ.ProcessPendingEvents();


Note that this is untested so results may vary.  :-)

-- 
Doug Turner
[EMAIL PROTECTED]


Reply via email to