Turn IpcEvents into a const enum
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { contextBridge, ipcRenderer, webFrame } from "electron";
|
||||
import { GET_RENDERER_SCRIPT, GET_RENDERER_STYLES, GET_VENCORD_PRELOAD_FILE } from "../shared/IpcEvents";
|
||||
import { IpcEvents } from "../shared/IpcEvents";
|
||||
import { VencordDesktopNative } from "./VencordDesktopNative";
|
||||
|
||||
contextBridge.exposeInMainWorld("VencordDesktopNative", VencordDesktopNative);
|
||||
|
||||
require(ipcRenderer.sendSync(GET_VENCORD_PRELOAD_FILE));
|
||||
require(ipcRenderer.sendSync(IpcEvents.GET_VENCORD_PRELOAD_FILE));
|
||||
|
||||
webFrame.executeJavaScript(ipcRenderer.sendSync(GET_RENDERER_SCRIPT));
|
||||
ipcRenderer.invoke(GET_RENDERER_STYLES).then(s => webFrame.insertCSS(s));
|
||||
webFrame.executeJavaScript(ipcRenderer.sendSync(IpcEvents.GET_RENDERER_SCRIPT));
|
||||
ipcRenderer.invoke(IpcEvents.GET_RENDERER_STYLES).then(s => webFrame.insertCSS(s));
|
||||
|
||||
Reference in New Issue
Block a user