Access to indexedb


hey @leedohm! do you happen to know how to access indexdb from atom inside chromium… im getting Uncaught SecurityError: Failed to execute ‘open’ on ‘IDBFactory’: access to the Indexed Database API is denied in this context. can you help me?? thanks! :metal:


Sorry, I haven’t played around with atom-shell that much. @zcbenz, do you have any tips?


@leedohm thanks! @zcbenz is there any workaround accessing indexdb from inside an iframe… that seems to be the problem…


@joaoafrmartins How are you accessing IndexedDB? Is there some code sample visible somewhere?


@abe not really im using mozilla/localforage on a pet project… the problem is that indexedb is disallowed inside iframes… and im using an iframe to embed a html page inside atom using atom-development-server package…


I am also have trouble accessing the indexdb.
In my case is i want to accessing indexdb from external site.

detail approach

I am using BrowserWindow to access the external site.

    console.log "db name: #{}";
    console.log "db version: #{@db.version}";
    console.log "stored #{@db.objectStoreNames.length}";

I assure that the indexdb already there, by manually interact with the new window UI. But it code above only give me db name, version with objectStoreNames.length 0.

Manual inspection via atom developer tools give: Security origin: file:…, Name: dbname, Version: some number

Also i can’t inspect from the new window, Presumably it disabled by default.
My suspicion is the new window have it’s on scope and context, but i am trying to retrieve on atom scope and context.

Let me know if i am wrong, or kindly give quick pointer. :smile: