Files
Shuodedaoli-Deskpet/main/preload.js

6 lines
236 B
JavaScript
Raw Normal View History

const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('electronAPI', {
playSound: (file) => ipcRenderer.send('play-sound', file),
showTooltip: (text) => ipcRenderer.send('show-tooltip', text)
})