oop
This commit is contained in:
parent
7558adc2d1
commit
70dd291dd9
1 changed files with 9 additions and 9 deletions
|
@ -60,6 +60,8 @@ function IDB_cond_create(db, objectStoreName, opts={}){
|
|||
});
|
||||
}
|
||||
function toggleLightDark(transaction){
|
||||
return new Promise((res)=>{
|
||||
const obj_store = transaction.objectStore("light-dark-store");
|
||||
// Add this temporarily to see all keys/values
|
||||
const cursor = obj_store.openCursor();
|
||||
cursor.onsuccess = (event) => {
|
||||
|
@ -69,8 +71,6 @@ function toggleLightDark(transaction){
|
|||
cursor.continue();
|
||||
}
|
||||
};
|
||||
return new Promise((res)=>{
|
||||
const obj_store = transaction.objectStore("light-dark-store");
|
||||
const grab = obj_store.get(1);
|
||||
grab.onerror = ()=>{console.error("grab error");res();};
|
||||
grab.onsuccess = (event)=>{
|
||||
|
|
Loading…
Reference in a new issue