QuestionExterminator
QuestionExterminator

Reputation: 35

Electron "grab" localStorage from default browser

I am working on an Electron app that needs to be able to retrieve localStorage on the default OS browser from my site. How can I achieve that? Are there any API's/Modules? I was thinking something like this:

var electron = require("electron");
var storage = electron.OSBrowser.storage;

But I am pretty sure that does not exist. Thanks. (FYI I am in the Renderer not the main process)

Upvotes: 2

Views: 2311

Answers (1)

Geek Stocks
Geek Stocks

Reputation: 2030

Your question is a bit confusing because we don't know what "default browser" and "my site" are in your question's context. Since Electron ships with Chromium, the "default browser" is known: its Chromium. And since Chromium is HTML5 compliant, you can just use normal LocalStorage methods in your Renderer process.

When you say "my site" it makes it sound like you are expecting Electron to run from the web; it doesn't, its a local app on your PC/Mac.

If this answer doesn't help, we're going to need a lot more detail from you to narrow down your need.

Upvotes: 1

Related Questions