Reputation: 141
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.
Upvotes: 4
Views: 1206
Reputation: 7503
I think they are using nsIWebProgressListener
there and its onStateChange
event.
https://developer.mozilla.org/en/nsIWebProgressListener
Upvotes: 1
Reputation: 8158
Here's one way to do it:
getBrowser().addEventListener('DOMContentLoaded', function() {}, false);
Upvotes: 1