// const { ipcRenderer } = require('electron');



// const button = document.getElementById('copy_close')
// console.log(button)
// if (button) {
//     button.addEventListener('click', () => {
//         const message = "这里是消息"
//         ipcRenderer.send('my-message',  message)
//     })
// }

const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('api', {
    setTitle: (image_url) => ipcRenderer.send('set-title', image_url),
    openUrl: (url) => ipcRenderer.send('open-url', url)
})