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.
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.
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks Mo!
Loading Profile...



EMPLOYEE