Closed zuphilip closed 6 years ago
I totally agree. With the code snippet you provided, I was able to implement this. Thank you! Please have a look at the new version.
@dstillman Any more comments? This would be ready to merge from my side.
Did menuitem.oncommand = (elem) => { Scaffold.addTemplate('templateNewItem', elem.getAttribute('label')) };
not work? Better to avoid building up code with strings if possible.
That didn't work. But I changed now to addEventListener
instead of the string concatenation. Please have a look at the new version.
@dstillman Can we merge this now? I would like to create afterwards a new release (with the help of #72), which I would like to use during a workshop about coding Zotero Translators in March. :hourglass_flowing_sand:
This should really be generated programatically in the window init function. Something like this (not checked for correctness):