Get your own customer support community
 

Switching Tabs

If you want to update the sidebar whenever you switch tabs, "on page load" isn't enough. For that, you'll need to use Progress Listeners. The example in https://developer.mozilla.org/en/Code... is exactly what you'll need.
But that has a problem too, it raises the event as soon as the address bar value changes, before the content is loaded. Therefore, trying to get all the links will result in an empty list.
The solution? Combine the page load example with this example, register your handler for both events. That way, when a new page loads, the handler will be called twice, the first time will be on the address bar change, so it won't see any links, but the second time will be on page load (more specifally, on DOM content load), and the links will be there.
 
silly
Inappropriate?
1 person likes this idea

User_default_medium