Hi Marc,
OnLoadEnd is an equivalent of window.onload in javascript, it waits for all the images to load, sometimes if an image loading hangs up it may take forever. The other solution would be to use DOMContentLoaded, see
Issue 32.
A subframe may finish loading before a main frame. I think that you need to keep counting the calls to OnLoadStart() and OnLoadEnd() for all the frames, if they are equal it means that all subframes has finished loading. In a call to OnLoadStart() and when frame->IsMainFrame() is true, you should treat this as a new request and reset the frames counting procedure.
Regardint the comment:
You should use Browser.GetFrames()/GetFrameCount() when OnLoadEnd() is called for the main frame. Counting of the frames in OnLoadStart() and OnLoadEnd() may not be enough, so make sure that all subframes started loading by calling Browser.GetFrames() in OnLoadEnd() for the main frame.
Best regards,
Czarek