vendredi 1 mai 2015

Firefox extension sqlite db not being created

I`m trying to create a new local sqlite database from a firefox extension. I have been reading Storage | MDN and I have the following code.

Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");

window.addEventListener("load", function() {
let file = FileUtils.getFile("ProfD", ["my_db_file_name.sqlite"]);
let dbConn = Services.storage.openDatabase(file); // Will also create the file if it does not exist

}, false);

sqlite file is not being created at all. What could be the issue?

Aucun commentaire:

Enregistrer un commentaire