views:

340

answers:

2

I'm writing a firefox extension and as part of this extension I need to know when the page has fully loaded (including all images and flash etc). Does anyone know of an event that is triggered when the page has fully loaded? I'm thinking it would be the same event that controls the activity icon in the top right. If anyone knows what event that is it would be very helpful.

--Daniel

+1  A: 

Here's one way to do it:

getBrowser().addEventListener('DOMContentLoaded', function() {}, false);
Reinis I.
A: 

I think they are using nsIWebProgressListener there and its onStateChange event.

https://developer.mozilla.org/en/nsIWebProgressListener

wildcard