Has anyone had success running ydn-db inside of a FF Jetpack add-on? I've got it partially working but am now stuck.
I'm using ydn.db-isw-sql-e-cur-qry-dev.js v1.03. I had to modify it to require Jetpack's indexeddb library, once I did that ydn's put and get methods seem to work fine. So, this works as expected:
var db = new ydn.db.Storage('test');
q = db.put({name: "store1", keyPath: "id"}, {id: "id1", value: "value1"});
q.done(function(x){ console.log("put done",x) });
q.fail(function(x){ console.log("put fail",x) });
var clog = function(r) { console.log(r.value); }
db.get("store1", "id1").done(clog);
However 'results' has 0 length below:
db.from('store1').list(100).done(
function(results){
console.log('done',results.length);
for(var i in results){
console.log(i,results[i].id);
}});
I've confirmed that the above works in Chrome and in FF in a regular web page.