After the mainWindow.minimize () method is called in electron, the page state is frozen, how to resume running?

for example, when I use mainWindow.minimize () to minimize the window, then click the dock bar to restore the window. At this time, the window seems to be frozen, and js is not running
clipboard.png

.
Apr.28,2021

I encountered this problem because I used ipcRenderer.sendSync ('*','*') in the rendering process; sent Synchronize messages, which may cause the process to block. Change to ipcRenderer.send () and ok. For reference only, everyone may encounter different specific problems


add this code to main.js :
app.commandLine.appendSwitch ('disable-background-timer-throttling');


Hello, landlord. I have encountered this problem, too. Have you solved your problem? How did you solve it?

Menu