Skip to content

Files

Latest commit

 

History

History
350 lines (154 loc) · 3.99 KB

zotero-plugin-toolkit.basictool.md

File metadata and controls

350 lines (154 loc) · 3.99 KB

Home > zotero-plugin-toolkit > BasicTool

BasicTool class

Basic APIs with Zotero 6 & newer (7) compatibility. See also https://www.zotero.org/support/dev/zotero\_7\_for\_developers

Signature:

export declare class BasicTool 

Constructors

Constructor

Modifiers

Description

(constructor)(data)

Constructs a new instance of the BasicTool class

Properties

Property

Modifiers

Type

Description

_basicOptions

protected

BasicOptions

configurations.

_console?

protected

Console

(Optional)

basicOptions

readonly

BasicOptions

patchSign

protected

readonly

string

Methods

Method

Modifiers

Description

_ensureMainWindowListener()

protected

Ensure the main window listener is registered.

_ensurePluginListener()

protected

Ensure the plugin listener is registered.

_ensureRemoveListener()

protected

Remove all Zotero event listener callbacks when the last callback is removed.

addListenerCallback(type, callback)

Add a Zotero event listener callback

createXULElement(doc, type)

Create an XUL element

For Zotero 6, use createElementNS;

For Zotero 7+, use createXULElement.

getGlobal(k)

Get global variables.

getZotero()

static

isXULElement(elem)

If it's an XUL element

log(data)

Output to both Zotero.debug and console.log

patch(object, funcSign, ownerSign, patcher)

Patch a function

removeListenerCallback(type, callback)

Remove a Zotero event listener callback

updateOptions(source)