mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Preferences: Add getScope() function
This commit is contained in:
parent
b1dbe35102
commit
1a3ea508fe
1 changed files with 11 additions and 0 deletions
|
|
@ -140,6 +140,17 @@ var Zotero_Preferences = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the scope object for a pane by its ID.
|
||||
* A pane's scope contains the top-level variables defined by its scripts.
|
||||
*
|
||||
* @param {string} paneID
|
||||
* @returns {Cu.Sandbox | null}
|
||||
*/
|
||||
getScope(paneID) {
|
||||
return this.panes.get(paneID)?.scope ?? null;
|
||||
},
|
||||
|
||||
async _handleNavigationMouseOver(event) {
|
||||
if (event.target.tagName === 'richlistitem') {
|
||||
await this._loadPane(event.target.value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue