Questions tagged [electron]

Electron (formerly Atom Shell) is a framework created by GitHub that lets you write cross-platform desktop applications using HTML, CSS and JavaScript. Electron is based upon Node.js and Chromium.

Electron (formerly Atom Shell) project was originally started by Cheng Zhao, one of the authors of NW.js (formerly known as node-WebKit), another Node.js-based platform for building desktop applications using HTML, CSS, and JavaScript. Cheng Zhao was hired by GitHub and began work on the framework on or about April 11th, 2013. On the 17th of April, 2015, with the release of version 0.24 the framework was renamed from Atom Shell to Electron.

One of the differences between Electron and NW.js frameworks is that the entry point for the app is actual JavaScript instead of an HTML page. This makes Electron more suitable for testing with PhantomJS, for instance.

Another difference is that the build process is also simpler for Electron using electron-builder, electron-forge and electron-packager. Since Electron uses libchromiumcontent to access Chromium's Content API, it's no longer required to obtain a copy of the Chromium source code. On that same note, the integration with Chromium is much more loosely coupled than in case of NW.js (which requires Chromium to be patched and maintained separately by the NW.js developers).

Probably, the most popular application built on top of Electron is a hackable text editor called Atom (also from GitHub). But there are some other interesting projects like Vivaldi Web browser, Mapbox Studio, an email client from Nylas, Slack desktop application, Pixate, Fireball game editor, Visual Studio Code, an SQL editor called Wagon, Mac app that runs Docker containers called Kitematic.


Resources :

15116 questions
4
votes
2 answers

electron: How to remove a menu item from the default menu?

Goal I'm trying to remove the Help menu from Electron app's menu. I don't want to setApplicationMenu of my own because it's fine to use the default menu except for the help, which points to Electron's own help pages. Attempts I've tried the…
kakyo
  • 10,460
  • 14
  • 76
  • 140
4
votes
1 answer

Antd Datepicker in Electron - Cannot read property 'year' of null

I'm developing an electron application that's built w/ React, antd (as a primary component library), and packaged with webpack. I'm running into an extremely weird issue where, upon packaging the electron application using a packaging script…
dannybess
  • 599
  • 4
  • 18
4
votes
1 answer

How can I prevent Electron's Chromium from forcing HTTPS on fetch requests?

From the Electron renderer, I am accessing a local GraphQL endpoint served by a Django instance on my computer, which I'd like to do over HTTP, not HTTPS. But Electron's Chromium seems to intercept my fetch request and preemptively return a 307…
kaxline
  • 63
  • 6
4
votes
4 answers

Electron Remote (Close, Minimize etc) not work (Cannot read property 'getCurrentWindow' of undefined)

I am trying to add close and minimize button on frameless window in Electron JS app. But its not working in anyhow. It's alwasy show "Cannot read property 'getCurrentWindow' of undefined" error. Here is my code: const {remote} =…
4
votes
1 answer

Electron upload with progress

I have an Electron app which is able to upload very big files to the server via HTTP in renderer process without user input. I decided to use axios as my HTTP client and it was able to retrieve upload progress but with this I met few…
Darkzarich
  • 470
  • 6
  • 18
4
votes
0 answers

Unable to load React or Redux Chrome extensions on Electron 10

It looks like Electron 10 doesn't work with React and Redux DevTools Chrome extensions. When loading Redux extension, I'm getting the following error. (node:17777) ExtensionLoadWarning: Warnings loading extension at…
Perttu T
  • 561
  • 1
  • 5
  • 7
4
votes
2 answers

How to make npm package available as a command to electron application

A strange issue I am facing while developing an electron app. What I am trying to achieve is use lighthouse to conduct page audits. I am using it programmatically like this const command = `lighthouse ${website} --quiet --chrome-flags=--headless…
Parag Diwan
  • 3,007
  • 2
  • 19
  • 37
4
votes
2 answers

Electron: How to catch all the requests response from the main process?

I want to get the response for all the requests that happen at my electron app from the main process. This image shows that the response I want to get would be at the Response tab and not at the Headers tab on Chrome Dev Tools. I'm -not- using a…
Autumn
  • 325
  • 3
  • 13
4
votes
1 answer

Show Electron Windows Tray Icon on main taskbar, not under Show Hidden Icons

I'm building an electron app and I realized that the tray icon on Windows does now appear on the main taskbar, but in the area that pops out when you click the upward arrow. enter image description here I see that Dropbox has theirs on the main…
4
votes
0 answers

Electron-redux share state between browser windows

I am a relatively new programmer building an application using React, Electron, and now Redux. The app opens two windows when it loads, and these two windows have to share a bit of state. I previously was able to achieve this without Redux using…
Bender
  • 109
  • 7
4
votes
0 answers

webContents.savePage Alternative for Electron apps in Windows Build

Recently, I was trying to build Electron Apps for "Windows and Macintosh". I had to download the current web page running using the "load URL" method in Browser Window. In Macintosh, when I run below function: const { BrowserWindow } =…
John Cargo
  • 1,839
  • 2
  • 29
  • 59
4
votes
0 answers

How do I send a mediaStream from the electron renderer process to a background ffmpeg process?

Goal (to avoid the XY problem): I'm building a small linux desktop application using webRTC, electron, and create-react-app. The application should receive a mediaStream via a webRTC peer connection, display the stream to the user, create a virtual…
4
votes
3 answers

Ajax's headers not being sent (via electron webview)

I have tried the solutions that I found here for the headers issue, e.g. beforeSend and checking the version of ajax. I basically have an electron app, inside, there's a webview, this webview communicates with an ipc script, this ipc script adds…
Jaeger
  • 1,646
  • 8
  • 27
  • 59
4
votes
1 answer

Uncaught Error: DOM element provided is null or undefined in plotly JS

This is my Code: frequencywindow.webContents.executeJavaScript(`graphDiv = document.getElementById("myDiv");`) var traceA = { x: [1, 2, 3, 4, 16, 17, 26], y: [1, 40, 9, 60, 4, 20, 10], type: 'scatter' }; var data = [traceA]; var layout = { …
Surendar
  • 153
  • 3
  • 11
4
votes
2 answers

Enabling hardware acceleration in electron app

I am building an app using electron and react. In that i need to conditionally enable and disable hardware acceleration of app. I can disable it as below. But I did not find any thing in electron documentation to enable it back. How can I do…
1 2 3
99
100