jakcy26
V2EX  ›  Electron

electron 怎么开启独立窗口而不增加渲染进程?

  •  
  •   jakcy26 · Apr 7, 2025 · 4463 views
    This topic created in 581 days ago, the information mentioned may be changed or developed.

    如题,在 electron 开发中,如何新开一个独立窗口,让渲染进程跟着对应增加。怎么实现呢?

    2 replies  •  2025-05-12 13:55:06 +08:00
    BABA983
    BABA983
    Apr 17, 2025
    1
    window.open 然后 setWindowOpenHandler 拦截就可以
    https://www.electronjs.org/docs/latest/api/window-open#native-window-example
    jakcy26
    jakcy26
    OP
    May 12, 2025
    2
    @BABA983 这样操作就不会新开一个 render 进程吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1512 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 232ms · UTC 16:30 · PVG 00:30 · LAX 08:30 · JFK 11:30
    ♥ Do have faith in what you're doing.