dumbmatter / fakeIndexedDB

A pure JS in-memory implementation of the IndexedDB API
Apache License 2.0
562 stars 69 forks source link

How to read one of the chrome database #97

Closed mortinlojen3030 closed 6 months ago

mortinlojen3030 commented 6 months ago

I'm trying to read the database like this, but nothing comes up. objectStoreNames empty. What am I doing wrong?

import "fake-indexeddb/auto";

const dbPath = "C:\Users\admin\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\chrome-extension_extension_0.indexeddb.leveldb";

let request = indexedDB.open(dbPath);

request.onsuccess = (event) => { console.log(event.target.result.objectStoreNames); // return [] }

dumbmatter commented 6 months ago

That's not what this library is for. In theory someone could write something to read data from Chrome's IndexedDB, but that might be better left for a separate project.