需要帮助将Remote.BrowserWindow.GetFocusedWidow()Remote.getCurrentWindow()和Remote.dialog从Electron Remote传输到IPC吗

需要帮助将Remote.BrowserWindow.GetFocusedWidow()Remote.getCurrentWindow()和Remote.dialog从Electron Remote传输到IPC吗,electron,ipc,Electron,Ipc,Electron remote从版本14开始就被弃用了,我想改用IPC main和IPC渲染器。我是新的编码和个人项目的工作,所以一个完整的解释是非常感谢。我找不到任何关于如何使用IPC完成以下任务的说明,也没有太多详细的说明如何实际使用IPC main和IPC渲染器。手头的任务包括使用Puppeter打印pdf和自定义标题栏控件 const remote = require('electron').remote const focusedWindow = remote.BrowserWindo

Electron remote从版本14开始就被弃用了,我想改用IPC main和IPC渲染器。我是新的编码和个人项目的工作,所以一个完整的解释是非常感谢。我找不到任何关于如何使用IPC完成以下任务的说明,也没有太多详细的说明如何实际使用IPC main和IPC渲染器。手头的任务包括使用Puppeter打印pdf和自定义标题栏控件

const remote = require('electron').remote
const focusedWindow = remote.BrowserWindow.getFocusedWindow()
const dialog = remote.dialog,
const currentWindow = remote.getCurrentWindow()

嗨@joverman,你看过其他的答案了吗?那些没有帮助的答案呢?e、 谢谢,这是一个比我发现的更清楚的例子。另外,如果我不需要使用木偶演员,那也不错。我看看能不能用。