update electron android adb over browser
This commit is contained in:
parent
21109e4bf9
commit
f6295a9c2f
26 changed files with 1551 additions and 172 deletions
|
|
@ -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>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue