Skip to content

Latest commit

 

History

History
187 lines (97 loc) · 2.42 KB

zotero-plugin-toolkit.progresswindowhelper.md

File metadata and controls

187 lines (97 loc) · 2.42 KB

Home > zotero-plugin-toolkit > ProgressWindowHelper

ProgressWindowHelper class

ProgressWindow helper.

Signature:

export declare class ProgressWindowHelper extends Zotero.ProgressWindow 

Extends: Zotero.ProgressWindow

Example 1

Show a popup with success icon

const tool = new ZoteroTool();
tool.createProgressWindow("Addon").createLine({
  type: "success",
  text: "Finish"
  progress: 100,
}).show();

Example 2

Show a popup and change line content

const compat = new ZoteroCompat();
const tool = new ZoteroTool();
const popupWin = tool.createProgressWindow("Addon").createLine({
  text: "Loading"
  progress: 50,
}).show(-1);
// Do operations
compat.getGlobal("setTimeout")(()=>{
  popupWin.changeLine({
    text: "Finish",
    progress: 100,
  });
}, 3000);

Constructors

Constructor

Modifiers

Description

(constructor)(header, options)

Constructs a new instance of the ProgressWindowHelper class

Properties

Property

Modifiers

Type

Description

show

typeof _popupWindowShow

Methods

Method

Modifiers

Description

changeLine(options)

Change the line content

createLine(options)

Create a new line

setIconURI(key, uri)

static

Set custom icon uri for progress window