Boris Zbarsky wrote:
Erik Walter wrote:

 > I don't seem to get notified when the background image of the body
 > gets finished rendering.  I get notified of all the OTHER images in
 > the document, but not the body background.

Hmm? You shouldn't be getting notified of any backgrounds at all, I would assume, if you're not being notified for the body background...


Sorry, I wasn't clear. I get notified of progress on the other <img> elements in the body element. But, actually this isn't true either. For some reason on documents with large numbers of images, I only get notified of SOME of them completing. Out of perhaps 150 images, I'll only get an OnStatusChange call about 48 times. Is it possible it doubles up on notifications and I'm really getting called for more than one <img> completing? And if it is, is there any way to tell?


 > I'm using a nsIWebProgressListener to listen for progress of the load
 > and then have an nsIDOMEventHandler set up for the "load" event.  But
 > later I change the images in the document and I need to find out when
 > the reload works (is there another event that will tell me this?)

At the moment, background images are loaded from painting code. They are also placed in the loadgroup with the LOAD_BACKGROUND flag, so they don't affect load events...

Is there a way to see this status? Or, perhaps an easier question, is there a way to just do everything synchronously. In my case I have access to all the documents locally, so I'm not worried about performance of waiting for everything to be load, but it is CRITICAL that I be sure everything has loaded and rendered.


Unforunately I'm rewriting the DOM as I load (or shortly after I load), so using a "load" event handler ALSO doesn't work as I only get that once and there appears to be no way to force it to reload the changed document. I kind of need a "reflow and rendering is complete" event to tell me when changes I made to the DOM are finished propogating.

Any help is appreciated.




Reply via email to