mirror of
https://github.com/yang991178/fluent-reader.git
synced 2026-09-18 13:41:51 +00:00
10 lines
306 B
JavaScript
10 lines
306 B
JavaScript
const { contextBridge, ipcRenderer } = require("electron")
|
|
|
|
contextBridge.exposeInMainWorld("renderer",{
|
|
requestNavigation: (href) => {
|
|
ipcRenderer.sendToHost("request-navigation", href)
|
|
},
|
|
contextMenu: (pos, text) => {
|
|
ipcRenderer.sendToHost("context-menu", pos, text)
|
|
}
|
|
}) |