Skip to content
Advertisement

Tag: electron

Avoiding circular dependencies with Node require()?

I’m having a problem where I have an Electron app, we’ll say contained in files index.html and app.js. app.js is included in index.html with a script tag. Within app.js, I use var ENGINE = require(“./myGameEngine/”); which then requires different classes, each in their own file. It looks something like this: Unfortunately, sometimes ClassA, needs to use new myEngine.ClassB(). For example,

Save loaded HTML file from electron app

I am trying to explore electron and trying to make a simple Mac application. The problem is that I wanted to save the loaded HTML when user closes the application, and upon next start of application the saved html will be loaded. Now, consider following case: The html which i have loaded initially have some table and items, and during

Electron Dialog not saving the file

Electron version: 1.3.3 Operating system: Ubuntu 14.04 I want to save a XML object into a .xml file with Electron. I try this: A new windows is opening, I fill the name of the file but nothing has been saving. Answer The showSaveDialog() API does not save the file for you. You must use the returned path and use Node

Requiring electron dialog from render process is undefined

I am using electron and am trying to open a file browser when a user clicks on button. From the render process I am trying to include the elctron.dialog package like this. However the result from the console log is undefined I am absolutely sure I am in the rendering process so I am not sure why this is not

Saving JSON in Electron

I am building an app using Electron. In this app, I am building a data structure using JSON. My data structure looks like this: I want to save this JSON to a file called “data.json”. I want to save it to a file because I want to load the next time the application starts. My challenge is, I do not

Advertisement