index.js
function ParseMessageFromThread(o) {
    var o = UnserializeFromProcess(o);
    if (typeof(o) == "object" && o.name && o.args) {

        // Process response from the thread
        // Electron: If we are in the Main Process, and it is not a global message, we executed it too
        if (!isElectron || electron.ipcRenderer || !o.electronSenderId) {
            var args = o.args;
            var name = o.name;
            ThreadMessage[name].apply(ThreadMessage, args);
        } else {
            // Electron: Send the message to the correct window
            var electronSenderId = o.electronSenderId;
            ipc.sendTo(electronSenderId, "threadify-message", o);
        }
    }
}
function ParseMessageFromThread(o) {
    var o = UnserializeFromProcess(o);
    if (typeof(o) == "object" && o.name && o.args) {

        // Process response from the thread
        // Electron: If we are in the Main Process, and it is not a global message, we executed it too
        if (!isElectron || electron.ipcRenderer || !o.electronSenderId) {
            var args = o.args;
            var name = o.name;
            ThreadMessage[name].apply(ThreadMessage, args);
        } else {
            // Electron: Send the message to the correct window
            var electronSenderId = o.electronSenderId;
            ipc.sendTo(electronSenderId, "threadify-message", o);
        }
    }
}
function ParseMessageFromThread ( o ) { var o = UnserializeFromProcess ( o ) ; if ( typeof ( o ) == "object" && o . name && o . args ) { // Process response from the thread // Electron: If we are in the Main Process, and it is not a global message, we executed it too if ( ! isElectron || electron . ipcRenderer || ! o . electronSenderId ) { var args = o . args ; var name = o . name ; ThreadMessage [ name ] . apply ( ThreadMessage , args ) ; } else { // Electron: Send the message to the correct window var electronSenderId = o . electronSenderId ; ipc . sendTo ( electronSenderId , "threadify-message" , o ) ; } } }
Parse the message from the thread or just passthrough to the Electron Renderer Process concerned
Parse the message from the thread or just passthrough to the Electron Renderer Process concerned