Release v0.2.10: Update package-lock.json and CI config
This commit is contained in:
17
pwa/electron/preload.cjs
Normal file
17
pwa/electron/preload.cjs
Normal file
@@ -0,0 +1,17 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
// Expose protected methods that allow the renderer process to use
|
||||
// ipcRenderer without exposing the entire object
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
// Get Steam authentication data
|
||||
getSteamAuth: () => ipcRenderer.invoke('get-steam-auth'),
|
||||
|
||||
// Check if Steam is available
|
||||
isSteamAvailable: () => ipcRenderer.invoke('is-steam-available'),
|
||||
|
||||
// Get platform info
|
||||
getPlatform: () => ipcRenderer.invoke('get-platform'),
|
||||
|
||||
// Flag to indicate we're running in Electron
|
||||
isElectron: true
|
||||
})
|
||||
Reference in New Issue
Block a user