mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
import { contextBridge, ipcRenderer } from 'electron';
|
|
|
|
// Expose protected methods that allow the renderer process to use
|
|
// ipcRenderer without exposing the entire object
|
|
contextBridge.exposeInMainWorld('electron', {
|
|
// Platform information
|
|
platform: () => ipcRenderer.invoke('get-platform'),
|
|
|
|
// App version
|
|
version: () => ipcRenderer.invoke('get-app-version'),
|
|
|
|
// Flag to indicate we're running in Electron
|
|
isElectron: true,
|
|
});
|