Great, thanks! An API to enumerate open windows and tabs in a window would definitely help.
I'm glad the equality test works properly to group SPSafariPages of same tab not by chance, but it is an intention and thus can be relied upon.
Thanks a lot for the info of the archivability (is there such a word?!? 😉) of SFSafariPages; I did not know that, and it indeed would help! Very nice.
Here's a couple of ideas for further improvements which might help, too, if feasible to implement:
- an SFSafariPage might be able to get the SFSafariTab it is part of (and an SFSafariPage might be able to obtain its SFSafariWindow perhaps);
- if that works, an SFSafariWindow might be able to determine the frame of the window it represents (for the moment, we use JavaScript to get the frame and it seems to work reliably, but this would be much cleaner);
- an SFSafariPage might allow the user to distinguish whether it represents a root or an iframe;
- in the latter case, the user might be able to get the appropriate root SFSafariPage.
It would be also nice if we could reliably communicate with a specific script inside of a tab. For the moment, far as my testing goes, it seems that whichever script of the same tab (i.e., the one injected to the root or to any iframe) is sent a message, all the scripts in the page receive it.
We sort of solved all these problems for the moment using a rather elaborated protocol which assigns IDs to scripts, but it would be really nice to have appropriate APIs at the SFxxx level directly, without ugly and potentially unreliable tricks.
Also, we'd need to use GUIs... oh, this would rather hi-jack the thread; I shall use another one, better suited for that, instead.
Thanks again!