Fix database error undefined on Chrome and count returns IDBRequest instead of result

e.target.webkitErrorMessage => Firefox?
e.target.error.message => Chrome?
e.target.errorCode => ?