Harald Holzmann
Posts: 39
Joined: 2017-08-08
|
Hello,
I need to have the browser history per tab. So i want a list like that:
Tab 1: www.google.at -> www.windows.at -> www.glert.at
Tab 2: XXX -> XXX -> XXX
Tab 3: .....
And so on: If the Users manuelly refreshes (Enter, F5,..) i want to clear the list of the tab (so basicaly only references/hrefs) should count. What is the best way to achive this? Is there in WindowStateChange oder DocumentComplete a way to get the id of the tab?
Thanks for your help!
Kind regards,
Harald |
|
Harald Holzmann
Posts: 39
Joined: 2017-08-08
|
Short update:
I found a possible solution (right now i am not sure if it's 100% save). In DocumentComplete event i get the url to store and the this.HTMLDocument.referrer the referrer (empty if enter or refresh or so on). IE starts a new instance of the toolbar for every tab. So i just save the history in an class variable as ArrayList. So i have the history of every tab :)
Is that correct and a possible solution?
One more question: The DocumentComplete is always called twice, any idea about this?
Thanks and kind regards,
Harald |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Harald,
Yes, this is the correct solution. You can read more info about the 'referer' property here: https://msdn.microsoft.com/en-us/library/aa752603(v=vs.85).aspx
Please try to use the DocumentComplete2 event of iemoddule instead of DocumentComplete.
E.g.
private void IEModule_DocumentComplete2(object pDisp, string url, bool rootDocLoaded)
{
if (rootDocLoaded)
{
// run your code here
}
} |
|