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 discussion has been closed.
i have the same problem!