The Catalogue of Technologies Prohibited or Restricted from Export from #China in the new Export Control Law, including gunpowder, silk, paper, and ink
#electroplating pennies and nickels in lime juice with spent batteries. #electrolysis #materials
old versions of jQuery, d3, etc., tried to be smart about #CommonJS modules, which caused problems with loading them in #Electron; there’s a simple hack here for convincing them that they’re not being loaded in a CommonJS environment, if I understand correctly. #JS
Recent versions of #Electron don’t expose Node.js functions in the browser window (since version 5), but you can set webPreferences.nodeIntegration to true and contextIsolation to false if you’re willing to accept the risk. But the recommended approach is to pass stuff back and forth with ipcRenderer and ipcMain. Some of the answers have extensive histories of Electron #security. #JS
On Linux and Microsoft Windows you can set an #Electron app window icon with an option when you open the window, but not on macOS. #JS
how to do file uploads to #Electron apps in React with Redux. #JS
console.log() works in #Electron #JS but on Microsoft Windows you have to set ELECTRON_ENABLE_LOGGING=1 to see it in your console window
#Electron used to have two separate ways to build executables, electron-packager and electron-builder, but electron-packager was the one that survived. electron-forge grew around it. #JS
To use a Node native module, such as sqlite3, with #Electron, you generally need to rebuild it for use with Electron (which is generally pretty easy, a single command with a couple of npm dependencies). You generally can’t use the normally-compiled Node module. It used to work with electron-builder, but it’s been abandoned. #JS
Another question about how to use sqlite3 with #Electron; mentions in passing how to use other modules. #JS
"Lovefield" is a relational database in #JS for browser apps providing “SQL-like syntax”.
Aha, the reason #Electron has “preload” is because originally you couldn’t load modules in your renderer pages. This covers the #security implications a bit. #JS
discussion of alternative ways to store user settings in #Electron #JS.
#Electron’s “remote” module was another #JS #security blunder.