electron/docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/preload.js

5 lines
160 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('shell', {
open: () => ipcRenderer.send('shell:open')
})