왜 오류가 있습니까?'IDBDatabase'에서 'createObjectStore'를 실행하지 못했습니다.
내 코드 :
var idb = window.indexedDB || // Use the standard DB API
window.mozIndexedDB || // Or Firefox's early version of it
window.webkitIndexedDB; // Or Chrome's early version
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
var dbName='nameDb';
var idbRequest=idb.open(dbName,'4.67' /*,dbDescription */);
idbRequest.onsuccess=function (e) {
debugger
var db=e.target.result;
if (!db.objectStoreNames.contains('chat')){
co=db.createObjectStore('chat',{'id':100});
};
if (!db.objectStoreNames.contains('iam')){
co1=db.createObjectStore('iam');
};
};
idbRequest.onerror = function (e) {
debugger
};
Uncaught InvalidStateError: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction. index.html:37 idbRequest.onsuccess
"무엇을 의미합니까?" 내게 D – nicael
코멘트. –
귀하의 모든 의견이 다음과 같이 기대됩니다 :-) – nicael