Stop Node Webkit from pausing when unfocusing / minimizing

Is there a way to pause my Node-Webkit app when I minimize the window?

Something I can add to Package.json?

+4
source share
1 answer

I think it's too late, but in any case there are 2 versions in NodeWebkit (setInterval / setTimeout): 1- window.setInterval / window.setTimeout (Chrome version) 2- global.setInterval / global.setTimeout (NodeJs version)

NodeJS , Chrome , , , NodeJs, (global. setInterval)

:, , chrome :

// override chrome timing function with node js versions
this.setTimeout = window.setTimeout = global.setTimeout;
this.clearTimeout = window.clearTimeout = global.clearTimeout;
this.setInterval = window.setInterval = global.setInterval;
this.clearInterval = window.clearInterval = global.clearInterval;

;)

0

Source: https://habr.com/ru/post/1533778/


All Articles