Re: Reload detection
- From: Jan Ostedt <ostedt@xxxxxxxxxx>
- Date: Thu, 19 Jul 2007 14:34:39 +0200
On Mon, 16 Jul 2007 23:29:26 +0200, Jan Ostedt <ostedt@xxxxxxxxxx> wrote:
So I have already tried to implement IOleCommandTarget, but I will give it another go. May be
I did something wrong. It seems strange that the OLECMDID_PREREFRESH appears late in the
refresh process. Is there anybody else in the group that has experience in this area?
Now I have implemented IOleCommandTarget again and my tests reveal that the OLECMDID_PREREFRESH
actually appears very late in the refresh process, in spite of its name. The browser calls my IOleCommandTarget::Exec
many times before the OLECMDID_PREREFRESH shows up. Several of the calls have undocumented command IDs.
My intention is to detect and cancel refreshes caused by javascript location.reload(false) and location.reload(true). So
I decided to see if it was at all possible to cancel the refresh at this stage. So at the first call to
IOleCommanTarget::Exec (and at subsequent calls) after a refresh I tried to cancel the operation. First I tried
different return values but that didn't help so I changed to IWebBrowser2::Stop, which made the refresh stop, but I
ended up with a blank page instead of the original one. Very similar to what happened when I tested my PassThruApp
approach. Unfortunately it seems like this approach doesn't work either. Is there anybody in the group that has ideas
about how a javascript.reload operation can be detected and canceled? Suggestions would be greatly appreciated.
Best Regards
Jan
www.learnware.se
.
- Follow-Ups:
- Re: Reload detection
- From: Jan Ostedt
- Re: Reload detection
- References:
- Re: Reload detection
- From: Jan Ostedt
- Re: Reload detection
- From: Igor Tandetnik
- Re: Reload detection
- From: Jan Ostedt
- Re: Reload detection
- Prev by Date: DOM manipulation crashes with IPersistStreamInit
- Next by Date: Convert HTML to image
- Previous by thread: Re: Reload detection
- Next by thread: Re: Reload detection
- Index(es):
Relevant Pages
|
|