src/_hansen/cssInjection.js
// queue a less compilation on the main process
queue a less compilation on the main process
queue a less compilation on the main process
function queueRender(css) {
      return new Promise(resolve => {
        const id = 'mainwindow-' + (uniqueId++);
        function callback(event, outCss, outId) {
          if (outId !== id) return;
          ipcRenderer.removeListener('HANSEN_LESS_COMPILE_REPLY', callback);
          resolve(outCss);
        }
        ipcRenderer.on('HANSEN_LESS_COMPILE_REPLY', callback);
        ipcRenderer.send('HANSEN_LESS_COMPILE', css, id);
      });
    }
function queueRender ( css ) { return new Promise ( resolve => { const id = 'mainwindow-' + ( uniqueId ++ ) ; function callback ( event , outCss , outId ) { if ( outId !== id ) return ; ipcRenderer . removeListener ( 'HANSEN_LESS_COMPILE_REPLY' , callback ) ; resolve ( outCss ) ; } ipcRenderer . on ( 'HANSEN_LESS_COMPILE_REPLY' , callback ) ; ipcRenderer . send ( 'HANSEN_LESS_COMPILE' , css , id ) ; } ) ; }
queue a less compilation on the main process
queue a less compilation on the main process