I'm using the Eclipse editor with JSDT to work through some Firefox add-on examples. The following code generates errors.
const {Cc, Ci} = require("chrome");
var downloadManager = Cc["@mozilla.org/download-manager;1"]
.getService(Ci.nsIDownloadManager);
The first line gives the error - Syntax error on token "}", delete this token
The last line gives the error - Syntax error, insert "}" to complete Block
Is there something wrong with this code or is it JSDT that is wrong?