yathit / ydn-db

Javascript database module for Indexeddb, Web SQL and localStorage storage mechanisms supporting version migration, advanced query, SQL and transaction.
Apache License 2.0
503 stars 41 forks source link

pass parameters into done callback #72

Closed 0090491 closed 9 years ago

0090491 commented 9 years ago

How can I pass extra parameters into the done callback function for example i need to pass the array value into the done function something like this

for (i = 0; i < arrNewLinesText.length; i++) { transcriptTextDB.indexedDB.db.get("tableName", "lineID").done(function (record, arrNewLinesText[i]) { //inside the done do something with array element arrNewLinesText[i]; });

yathit commented 9 years ago

Use underscore bind method.