V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
jakcy26
V2EX  ›  Electron

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

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

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

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