$(function(){ var download_progress = $('#download-progress'); var out = $('#output'); const ipcRenderer = require('electron').ipcRenderer; const request = require('request'); const {dialog} = require('electron').remote; var cache = {}; var path = ""; ipcRenderer.on('download-progress', function(event, arg) { console.log(arg); // prints "pong" $('#download-progress-'+arg.id).css("width",arg.percent); $('#download-progress-'+arg.id).html(arg.percent); }); ipcRenderer.on('process-fin', function(event, arg) { console.log(arg); // prints "pong" $('#download-progress-'+arg.id).css("width",arg.percent); $('#download-progress-'+arg.id).html("CONVERTED"); }); ipcRenderer.on('file', function(event, arg) { console.log(arg); // prints "pong" $('#body-'+arg.id).append('