electron/spec/fixtures/module/preload-remote-function.js
Cheng Zhao a8f2646ba6 Fix missing remote object error when calling remote function created in preload script (#15444)
* fix: report wrong context error based on contextId

* fix: destroyed remote renderer warning is now async
2018-10-31 11:26:57 -04:00

5 lines
171 B
JavaScript

const { remote, ipcRenderer } = require('electron')
remote.getCurrentWindow().rendererFunc = () => {
ipcRenderer.send('done')
}
remote.getCurrentWindow().rendererFunc()