code: function(storeNames, mode, result, cb) {
      var transaction;
      try {
        transaction = this.idb.transaction(storeNames, mode);
      } catch (err) {
        if (isFunction(cb)) return cb(err);
      }
      transaction.onabort = function(event) {
        if (isFunction(cb)) return cb(event.target.error);
      };
      transaction.onerror = function(event) {
        if (isFunction(cb)) return cb(event.target.error);
      };
      transaction.oncomplete = function(event) {
        if (isFunction(cb)) return cb(null, result);
      };
      return transaction;
    }
docs: Wrap IDBDatabase.transaction
  
  @param {String} storeNames - names of the object stores to use.
  @param {String} mode - transaction mode to use.
  @param {Function} callback - gets two arguments `(err, result)`,
  if there is no Error `err` is `null`.
  @param {Object} result - Object that will be returned as a result of
  the transaction.