Basic Javascript Use
I am trying to do some basic interactions with Zotero via javascript - for example adding a record. I tried the example code from:
http://dev.zotero.org/interacting_with_zotero_from_within_firefox
And did the following:
Error: Permission denied to get property XPCComponents.classes
Can someone post some basic sample js code that interacts with Zotero?
Thanks
Andrew
http://dev.zotero.org/interacting_with_zotero_from_within_firefox
And did the following:
But get the following error:
var Zotero = Components.classes["@zotero.org/Zotero;1"]
.getService(Components.interfaces.nsISupports)
.wrappedJSObject;
var data = {
title: "Much Ado About Nothing",
creators: [
['William', 'Shakespeare', 'author']
]
};
var item = Zotero.Items.add('book', data);
Error: Permission denied to get property XPCComponents.classes
Can someone post some basic sample js code that interacts with Zotero?
Thanks
Andrew
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
i have the same problem!