DanielM
DanielM

Reputation: 141

Detecting when a page has finished loading in a Firefox plugin

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

Answers (2)

wildcard
wildcard

Reputation: 7503

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

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

Upvotes: 1

slikts
slikts

Reputation: 8158

Here's one way to do it:

getBrowser().addEventListener('DOMContentLoaded', function() {}, false);

Upvotes: 1

Related Questions