indexedDB レコードを更新しようとしていますが、このエラーが発生します
DataError: 操作に提供されたデータが要件を満たしていません。ソースファイル
私はすでにこれを試しましたが、うまくいきませんでした
これは私の機能です:
function updNotes(text, timestamp, blob)
{
var obj = {text: text, timestamp: timestamp};
if (typeof blob != 'undefined')
obj.image = blob;
store = getObjectStore("notes", 'readwrite');
objKeyRange = IDBKeyRange.only(+objtoedit);
req = store.openCursor(objKeyRange);
req.onsuccess = function(evt){
var cursor = evt.target.result;
console.log(cursor.key);
//do the update
var objRequest = cursor.update(obj);
objRequest.onsuccess = function(ev){
console.log('Success');
};
objRequest.onerror = function(ev){
console.log('Error');
};
};
req.onerror = function(evt){
console.log('Error');
};
誰でもこれを修正するのを手伝ってくれますか?
よろしくお願いします