Bridge Module
The renderer's half of the bridge to the main process. Partner to src/Preload/preload.js and src/Main/Bridge.fs. This module is the only place the renderer reads anything the operating system knows, and it exists so that the rest of the code asks for `Bridge.staticDir` rather than reaching for `__static`, `process.platform` or `@electron/remote` - none of which survive contextIsolation. Everything here is a value rather than a function. These are constants for the life of the process, so the preload fetches them once and this module just reads the result: no round trip, no ordering to get wrong, and five operations that never have to exist on the bridge at all.
Functions and values
| Function or value | Description |
Full Usage:
buildCancel _jobId
Parameters:
string
|
|
Full Usage:
buildStart _stage _projectPath _name _device _profile
Parameters:
string
_projectPath : string
_name : string
_device : string
_profile : string
Returns: string
|
|
Full Usage:
buildStatus _jobId
Parameters:
string
Returns: int
|
|
Full Usage:
clearCache ()
Parameters:
unit
|
|
Full Usage:
clipboardWrite _text
Parameters:
string
|
|
Full Usage:
cwd
Returns: string
|
|
Full Usage:
dialogOpen _options
Parameters:
obj
Returns: string array
|
|
Full Usage:
dialogSave _options
Parameters:
obj
Returns: string
|
|
Full Usage:
documents
Returns: string
|
|
Full Usage:
editCommand _op
Parameters:
string
|
|
Full Usage:
getZoomLevel ()
Parameters:
unit
Returns: float
|
|
Full Usage:
hasDebugSwitch
Returns: bool
|
|
Full Usage:
hasWSwitch
Returns: bool
|
|
Full Usage:
ipcListenerCounts ()
Parameters:
unit
Returns: obj
|
|
Full Usage:
isDev
Returns: bool
|
|
Full Usage:
isMac
Returns: bool
|
|
Full Usage:
isWindows
Returns: bool
|
|
Full Usage:
logSwitch
Returns: string
|
|
Full Usage:
onApplicationMenuCommand _callback
Parameters:
string -> unit
|
|
Full Usage:
onClosingWindow _callback
Parameters:
unit -> unit
|
|
Full Usage:
onContextMenuCommand _callback
Parameters:
string -> unit
|
|
Full Usage:
onWindowLostFocus _callback
Parameters:
unit -> unit
|
|
Full Usage:
openExternal _url
Parameters:
string
|
|
Full Usage:
platform
Returns: string
|
|
|
|
Full Usage:
quit ()
Parameters:
unit
|
|
Full Usage:
resourceUsage ()
Parameters:
unit
Returns: obj
|
|
Full Usage:
revealInFileManager _folderPath
Parameters:
string
Returns: Promise<string>
|
|
Full Usage:
runDevTool _tool _args _dst
Parameters:
string
_args : string array
_dst : string
|
|
Full Usage:
setApplicationMenu _template
Parameters:
obj array
|
|
Full Usage:
setZoomLevel _level
Parameters:
float
|
|
Full Usage:
showContextMenu _menuType
Parameters:
string
|
|
Full Usage:
staticDir
Returns: string
|
|
Full Usage:
systemMemoryTotalKB ()
Parameters:
unit
Returns: float
|
|
Full Usage:
toggleDevTools ()
Parameters:
unit
|
|
Full Usage:
toggleFullScreen ()
Parameters:
unit
|
|
|
|
Full Usage:
uartContinue ()
Parameters:
unit
|
|
Full Usage:
uartDisconnect ()
Parameters:
unit
|
|
Full Usage:
uartPause ()
Parameters:
unit
|
|
|
|
|
|
Full Usage:
uartStep ()
Parameters:
unit
|
|
Full Usage:
uartStepAndReadAllViewers _viewers
Parameters:
int
Returns: Promise<string array>
|
|
Full Usage:
userData
Returns: string
|
|