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

6 lines
160 B
JavaScript

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