We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let data = { url: "/test/web", resizable: true, webview: true, sendData: item }; ipcRenderer.invoke("open-win", data) 启动一个新页面 然后新页面 import { ipcRenderer } from "electron"; ipcRenderer.on("send-data", (event, data) => { console.log(event) console.log(data) }) 没有任何反应
let data = { url: "/test/web", resizable: true, webview: true, sendData: item }; ipcRenderer.invoke("open-win", data)
The text was updated successfully, but these errors were encountered:
因为新的页面展示会慢过send,这个将会在下个版本解决
Sorry, something went wrong.
我也刚好遇到这个问题,我是这样解决的:
在“ipc-main-handle.ts”里:
const bindWebContentSend = ( currentWindow: BrowserWindow, arg: { sendData?: unknown }, ): void => { webContentSend.SendDataTest(currentWindow.webContents, arg.sendData) } OpenWin:()=>{ …… // 改为‘did-finish-load’事件触发 childWin.webContents.once('did-finish-load', () => bindWebContentSend(childWin, arg), ), …… }
No branches or pull requests
let data = { url: "/test/web", resizable: true, webview: true, sendData: item }; ipcRenderer.invoke("open-win", data)
启动一个新页面
然后新页面
import { ipcRenderer } from "electron";
ipcRenderer.on("send-data", (event, data) => {
console.log(event)
console.log(data)
})
没有任何反应
The text was updated successfully, but these errors were encountered: