code: function() {
          if (!this._disconnected) {
              console.log(
                  `LocalIndexedDBStoreBackend.connect: already connected or connecting`,
              );
              return Promise.resolve();
          }
  
          this._disconnected = false;
  
          console.log(
              `LocalIndexedDBStoreBackend.connect: connecting...`,
          );
          const req = this.indexedDB.open(this._dbName, VERSION);
          req.onupgradeneeded = (ev) => {
              const db = ev.target.result;
              const oldVersion = ev.oldVersion;
              console.log(
                  `LocalIndexedDBStoreBackend.connect: upgrading from ${oldVersion}`,
              );
              if (oldVersion < 1) { // The database did not previously exist.
                  this._isNewlyCreated = true;
                  createDatabase(db);
              }
              if (oldVersion < 2) {
                  upgradeSchemaV2(db);
              }
              if (oldVersion < 3) {
                  upgradeSchemaV3(db);
              }
              // Expand as needed.
          };
  
          req.onblocked = () => {
              console.log(
                  `can't yet open LocalIndexedDBStoreBackend because it is open elsewhere`,
              );
          };
  
          console.log(
              `LocalIndexedDBStoreBackend.connect: awaiting connection...`,
          );
          return reqAsEventPromise(req).then((ev) => {
              console.log(
                  `LocalIndexedDBStoreBackend.connect: connected`,
              );
              this.db = ev.target.result;
  
              // add a poorly-named listener for when deleteDatabase is called
              // so we can close our db connections.
              this.db.onversionchange = () => {
                  this.db.close();
              };
  
              return this._init();
          });
      }
docs: Attempt to connect to the database. This can fail if the user does not
  grant permission.
  @return {Promise} Resolves if successfully connected.