Anoop Kovoor
Posts: 19
Joined: 2012-11-06
|
Hi,
I've some important piece of code on IEModule document complete event, where I'm adding some css styles to the page after it is downloaded. My problem is that when doing a page refresh using "IE.WebBrowser.Refresh()" or "IE.WebBrowser.Refresh2()", the document complete event is not fired. But when I'm pressing "F5" the document complete event is fired properly. Please suggest me a solution for the same.
Thanks and Regards,
Anoop |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Anoop,
You can use the OnBeforeRefresh event of the iemodule to start a timer. Then you need to check the ReadyState property of the browser and if it is 'READYSTATE_COMPLETE', you can inject your CSS.
Note, to use the OnBeforeRefresh event you need to set the HandleDocumentUICommands property of iemodule to true. |
|