On 6/6/23 3:54 AM, Emiliano Heyns wrote:
> What is ZoteroPane, conceptually? I know it gathers some functionality
> that's centered around the main UI, but is that just it, functionality
> gathered for the main UI?
It's window-level functionality. `Zotero` is XPCOM scope, so it's code
unrelated to a window, whereas `ZoteroPane` applies to the main window,
with functions that access `window` and `document`. On a literal level,
zoteroPane.js is just a script loaded by zoteroPane.xhtml, which is the
document for the main Zotero window.
I'm sure there are a few functions that don't technically belong there
because they don't access properties of the window, but mostly that's
what it is.
> I also see there can be more than one (given getZoteroPanes), how am I
> to understand that
That's for the once and future (and current, if you find the right hack)
ability to open multiple Zotero library windows.
> can I get the associated Window objects from these ZoteroPanes?
You would generally get the ZoteroPane from the window
(window.ZoteroPane), not the other way around, but
`ZoteroPane.document.ownerGlobal` would give you the window.