Skip to content

Instantly share code, notes, and snippets.

const win = new electron.BrowserWindow(...)
// When work makes progress, show the progress bar
function onProgress (progress) {
// Use values 0 to 1, or -1 to hide the progress bar
win.setProgressBar(progress || -1) // Progress bar works on all platforms
}
// When work completes while the app is in the background, show a badge
var numDoneInBackground = 0