tags:

views:

39

answers:

2

Hello,

Let's assume that I have several tabs open within the same browser.

Is there a way to go read the URL bar of each browser tab?

Same question if instead of having several tabs open in the same browser, I have several browser windows open?

I am thinking that there may be a way with the DOM but all I could find is that the root element is a specific tab within a browser. If I have 2 tabs open within the same browser, does it mean that I have 2 DOMs with 2 roots?

Thanks!

+1  A: 

You mean from javascript? I am pretty sure no browser will let you do that as its a big security hole. Imagine if there is a tab with a banking site you could start messing with its DOM!

Joshua
+1 for pointing out that this would be an absolutely horrendous security hole if it were possible.
Chris
A: 

Yes, you have a DOM tree per tab. You can't get any information from other tabs. (At least not with Javascript only)

Franci Penov