爱意满满的作品展示区。
shadeofgod

又撸了个轮子, RPC-styled API for electron ipc

  •  
  •   shadeofgod ·
    zoubingwu · Mar 19, 2020 · 2722 views
    This topic created in 2270 days ago, the information mentioned may be changed or developed.

    https://github.com/shadeofgod/electron-rpc-remote

    // main process
    import ipc from 'electron-rpc-remote';
    
    let count = 0;
    
    ipc.handle({
      inc() {
        count++;
        return count;
      },
    });
    
    // renderer process
    await ipc.invokeMain('inc'); // -> 1
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1251 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:44 · PVG 01:44 · LAX 10:44 · JFK 13:44
    ♥ Do have faith in what you're doing.