Re: IWebBrowser2, frames and DocumentComplete
- From: "Sanjoy Bose" <sanjoyb@xxxxxxxxx>
- Date: 26 Aug 2006 10:47:40 -0700
Thanks again. Comments/Question inline... I appreciate your help.
Sanjoy
Igor Tandetnik wrote:
"Sanjoy Bose" <sanjoyb@xxxxxxxxx> wrote in message
news:1156611803.689880.221830@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
The issue seems not resolved. The scenario is like this,
Lets say the page has A,B,C frames. I click on a link on frame A. This
updates frame B and C.
The notifications that are coming are in this order (BF ->
BeforeNavigate2, DC->DocumentComplete),
BF(Frame B)
DC(Frame B)
BF(Frame C)
DC(Frame C)
The problem is, after DC(Frame B), I am thinking the document is
completely loaded, which is not the case.
It sort of is, as far as the browser is concerned. Logically it may not
be, but techincally it is. Consider:
function navigateTwoFrames() {
setTimeout("frameB.navigate(urlB)", 1);
setTimeout("frameB.navigate(urlB)", 1000);
}
A single click starts two navigations about a second apart. Your
application's logic may consider this a single operation, but I don't
see how you can realistically group the two navigations together just by
watching browser events. They are going to be indistinguishable from the
user clicking a link in one frame, and then clicking a link in the other
frame a second later.
The application which does this, can be any web application. My
application is only the BHO.
I understand, that this true from technical point of view. But to a
user the new page is not yet completely displayed (one frame is
updated, other is not). I want to understand from my application, when
the whole page(all frames) has finished updating (think as the user
thinks..). It should be quite reasonable requirement...
Supposing I want to do some
operation after the page is completely finished.
Define "completely finished". To me it means "no navigation is currently
in progress". You seem to want to define it as "nobody contemplates
starting a new navigation in the near future". Prescience is not yet
fully developed in computers.
The reason I want to do this, is the operation I do after, may be
costly, which may be as costly as parsing a DOM or serializing a DOM.
So I don't want to do this costly operation on twice, and on a DOM
which is valid, but is half way through transition (only one frame
updated)
I guess if you really need to handle this situation, you can wait a
little after the last DocumentComplete event and declare the page
"complete" if no new navigation starts during this wait period.
But which is the last DocumentComplete Event ? If I understand the last
DocumentComplete, then the solution is there..isn't it ? Frame B's
DocumentComplete may come even before Frame C's BeforeNavigate2 or
NavigateComplete2..right ?
Thanks,
Sanjoy
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: IWebBrowser2, frames and DocumentComplete
- From: Igor Tandetnik
- Re: IWebBrowser2, frames and DocumentComplete
- References:
- IWebBrowser2, frames and DocumentComplete
- From: Sanjoy Bose
- Re: IWebBrowser2, frames and DocumentComplete
- From: Igor Tandetnik
- Re: IWebBrowser2, frames and DocumentComplete
- From: Sanjoy Bose
- Re: IWebBrowser2, frames and DocumentComplete
- From: Igor Tandetnik
- IWebBrowser2, frames and DocumentComplete
- Prev by Date: Re: IWebBrowser2, frames and DocumentComplete
- Next by Date: Re: IWebBrowser2, frames and DocumentComplete
- Previous by thread: Re: IWebBrowser2, frames and DocumentComplete
- Next by thread: Re: IWebBrowser2, frames and DocumentComplete
- Index(es):
Relevant Pages
|
|