Detecting the different windows in Arrange > 2-up Vertical and Arrange > 2-up Horizontal

Photoshop allows creating multiple windows of the same document using the Window > Arrange menu.

Once a second window of a document is created, it seems to be invisible to scripting. I can’t figure out how to detect one window or the other in 2-up mode, select a specific window in 2-up mode, or how to close a specific window in 2-up mode.

The second window seems to be “property-free.” Just checking to see if anyone else had tried to work with these multiple windows in 2-up mode.

Are the windows pointing to the same document or to separate documents?

In 2-up mode, the windows are pointing to the same document. The app.documents.length API does not increase in value when the additional window is opened. So this window is not a new document. It’s just a new window of the current document. And I’m not seeing anything in the “Document” properties in Alchemist that distinguishes one window from the other.

A year ago I proposed that document view should be part of the DOM. Especially multiple views for the same document. I think that @Barkin noted that. But not sure about progress or position in the roadmap.