Home > zotero-plugin-toolkit > BasicTool > createXULElement
Create an XUL element
For Zotero 6, use createElementNS
;
For Zotero 7+, use createXULElement
.
Signature:
createXULElement(doc: Document, type: string): XUL.Element;
Parameter |
Type |
Description |
---|---|---|
doc |
Document | |
type |
string |
XUL.Element
Create a <menuitem>
:
const compat = new ZoteroCompat();
const doc = compat.getWindow().document;
const elem = compat.createXULElement(doc, "menuitem");