I want to foreach an array to show on the screen. This array is the data from a database table. The code to get this data: But this variable comes this way: And I’m not able to select that array (_rejectionHandler0) Answer Since .query also returns a Promise, you need to await it. await conn waits for the connection to
Tag: electron
How to overflow auto focus last element
I develop Todo App. İf add to new element, scrollbars not focusing bottom of the page. How can i solve this problem ? Answer You can make use of Element.scrollIntoView() after adding it. For example: For more information’s about compatibility you should have a look at https://developer.mozilla.org/de/docs/Web/API/Element/scrollIntoView it is marked as experimental, but all common browsers support it.
React component not rerendering after state change despite using setState()
I tried to fetch data from an embedded sqlite db and displayed it in list format. The fetchData() function is working, with correct returned result. However, when I used setState() to update the state, react did not re-render. Next I tried to setState() with array [‘a’,’b’,’c’] at componentDidMount(). React did re-render and showed a, b, c. Answer Because of db.each
What is the url where an express app is located at inside an electron app
I am not sure I am doing this quite right. My end goal is to send a post request from a lambda function to my electron app and create a system notification. Locally I have been able to do it from post man, but when I install the app (on linux) It doesn’t work, now I am not sure where
Electron notarisation failed due to The binary uses an SDK older than the 10.9 SDK
We are trying to notarise the electron app but I’m getting this error.The versions which we are using are electron: 3.0.6, electron-builder”: “^21.2.0 Answer By installing some dependencies and moving some dependency to dev-dependencies worked for me. In my case, electron-publisher-s3 I moved this package to dev dependency. This ticket helped me Link
Window does not render on build, works fine in development server
My app does not display a window when it’s built, but works fine when I run npm run serve There is still an process running in task manager, and the same thing happens if I use the installer. I don’t get any errors warnings from electron-builder. background.js: I tried the fixes here and here to no avail. I’m using electron-vue.
import menu to browser window by “require” function
I am working on a electron demo by following this tutorial. just wondering what happened in the require line of code. ./menu/mainmenu.js defines the menu items. main.js does the require(‘./menu/mainmenu’) copy whole file into main.js? Or imported some modules? In the mainmenu.js file There is no export keyword. according to the node.js documentation, “The basic functionality of require is that
Import jQuery with contextBridge
I’m trying to use contextBridge in Electron, but I keep getting an error when I try to require(‘jQuery’) in preload.js. Here is my preload.js: As soon as I put require(‘jQuery’), I get this error: I want to import APIs like this since it improves security and contextIsolation will be enabled by default in later versions of Electron. Answer I have
Should I use Context Isolation with my Electron App
My friend and I are almost done with our project. It’s basically a now playing/miniplayer app for Spotify. When I was checking the render process console, I had one more warning that I wanted to clear. It was about worldSafeExecuteJavaScript being true and how it’s unsafe. I looked farther in to it and it turns out I need to turn
Accessing html elements from another page inside div
So I’m pretty new to html/javascript but i’m working on a project where i’m loading a external html page inside a div, that when loaded looks like so: and inside the ‘#document’ is the external html. This external html contains some titles that can be minimized and maximazed to hide/show their content. I have a side-menu on the main html