update electron android adb over browser

This commit is contained in:
Kenta420 2024-01-19 17:53:48 +07:00
parent 21109e4bf9
commit f6295a9c2f
26 changed files with 1551 additions and 172 deletions

View file

@ -4,6 +4,8 @@ import { contextBridge, ipcRenderer } from 'electron'
// --------- Expose some API to the Renderer process ---------
contextBridge.exposeInMainWorld('ipcRenderer', withPrototype(ipcRenderer))
contextBridge.exposeInMainWorld('electronRuntime', true)
contextBridge.exposeInMainWorld('platform', process.platform)
// `exposeInMainWorld` can't detect attributes and methods of `prototype`, manually patching it.
function withPrototype(obj: Record<string, any>) {