// cadence: string,
// increment: integer (seconds),
// type: string ("live" or "corr")
// cadence: string,
// increment: integer (seconds),
// type: string ("live" or "corr")
// // Game (dynamic) state:
// fen: string,
// moves: array of Move objects,
// // Game (dynamic) state:
// fen: string,
// moves: array of Move objects,
objectStore.get(gameId).onsuccess = function(event) {
// Ignoring error silently: shouldn't happen now. TODO?
if (event.target.result) {
objectStore.get(gameId).onsuccess = function(event) {
// Ignoring error silently: shouldn't happen now. TODO?
if (event.target.result) {
dbOperation((err,db) => {
let objectStore = db.transaction("games").objectStore("games");
let games = [];
dbOperation((err,db) => {
let objectStore = db.transaction("games").objectStore("games");
let games = [];
let cursor = event.target.result;
// if there is still another cursor to go, keep running this code
if (cursor) {
let cursor = event.target.result;
// if there is still another cursor to go, keep running this code
if (cursor) {