Determining the end of page loading in the Firefox plugin

I am writing a Firefox extension, and as part of this extension I need to know when the page has fully loaded (including all images, flash memory, etc.). Does anyone know of an event that occurs when a page is fully loaded? I think this will be the same event that controls the activity icon in the upper right corner. If anyone knows what this event is, it would be very helpful.

+4
source share
2 answers

Here is one way to do this:

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

I think they use nsIWebProgressListenerhis event there onStateChange.

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

+1

Source: https://habr.com/ru/post/1719337/


All Articles