0
不明白爲什麼這種情況正在發生屬性/方法不能被初始化索引資料
var request=window.indexedDB.open("known"); //async IDB request
request.onsuccess=function(){db=event.target.result;
alert("database created"+db); //it works fine database created
var store=db.createObjectStore("friends",{pathKey:"name"})
//error **"Uncaught InvalidStateError: An operation was called on an object on which it is not allowed or at a time when it is not allowed."** as on console box
}
當數據庫已被分配參照數據庫「已知」,那麼爲什麼錯誤彈出