Uniquely identify every separate browser window that is currently open using JavaScript or jQuery?
How to uniquely identify every separate browser window that is currently open for all major browsers using javascript? Let me explain what I need to know and let's consider the scenario below:
I have 3 browser windows [any modern browser, i.e. Chrome, Firefox etc.] that are currently open, each containing multiple tabs.
- Window #1: 3 tabs [Tab A, Tab B, and Tab C]
- Window #2: 2 tabs [Tab D and Tab E]
- Window #3: 4 tabs [Tab E, Tab F, Tab G, and Tab H]
How can I uniquely identify each browser window [i.e. capture a unique ID/value for each browser window, not the tab's window]? So, at the end I will have 3 IDs [all windows], not 9 IDs [all tabs]. I am able to identify all the tabs in the windows by creating a browser add-on or extension which uses jQuery [crossrider], but could not find a way to uniquely identify each window.
Is this possible by JavaScript/JQuery? If so, how? if not, why?
I tried "window.name" in javascript, but that gives me 9 IDs, not 3 IDs.