I host a web browser control that typically downloads external documents and then makes some changes using the HTML DOM.
We also embed user application links using a fake protocol such as "Close This", which are caught and processed in BeforeNavigate2 .
When a tarket link has a spelling error (for example, "spp: CloseWindow"), BeforeNavigate will not trigger custom processing. The browser control does not show a navigaiton error, but remains in READYSTATE_INTERACTIVE and does not launch NavigateComplete or DocumentComplete .
My problem: Most operations (like getting or updating content) are delayed and expect readistate to reach READYSTATE_COMPLETE . After clicking such an invalid link, the browser no longer updates - a state that I would like to avoid. How can i do this?
- Can I find in "DownloadComplete" that the navigation is crashing? (Thus, I could ease the test to
"READYSTATE_COMPLETE or READYSTATE_INTERACTIVE and last downloadComplete was broken ") - Can I "reset" control the browser READYSTATE_COMPLETE (maybe not)
- Can I detect pseudo-protograms actually supported by the browser?
(In retrospect, the prefix xxxx: not such a good idea, but changing this now is a bit of a problem.)
c ++ webbrowser-control
peterchen
source share