Methods
clearCache(options) → {Promise.<void>}
Clears cached data containing application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage.
Parameters:
Name | Type | Description |
---|---|---|
options |
ClearCacheOption | See tutorial for more details. |
- Tutorials:
Returns:
- Type
- Promise.<void>
deleteCacheOnExit() → {Promise.<void>}
Clears all cached data when OpenFin Runtime exits.
- Tutorials:
Returns:
- Type
- Promise.<void>
downloadAsset(appAsset) → {Promise.<void>}
Downloads the given application asset
Parameters:
Name | Type | Description |
---|---|---|
appAsset |
AppAssetInfo | App asset object |
- Tutorials:
Returns:
- Type
- Promise.<void>
downloadPreloadScripts(scripts) → {Promise.Array.<DownloadPreloadInfo>}
Download preload scripts from given URLs
Parameters:
Name | Type | Description |
---|---|---|
scripts |
Array.<DownloadPreloadOption> | URLs of preload scripts. See tutorial for more details. |
- Tutorials:
Returns:
- Type
- Promise.Array.<DownloadPreloadInfo>
downloadRuntime(options, progressListeneropt) → {Promise.<void>}
Downloads a version of the runtime.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
RuntimeDownloadOptions | Download options. |
|
progressListener |
function |
<optional> |
called as the runtime is downloaded with progress information. |
- Tutorials:
Returns:
- Type
- Promise.<void>
exit() → {Promise.<void>}
Exits the Runtime.
- Tutorials:
Returns:
- Type
- Promise.<void>
flushCookieStore() → {Promise.<void>}
Writes any unwritten cookies data to disk.
- Tutorials:
Returns:
- Type
- Promise.<void>
getAllApplications() → {Promise.Array.<ApplicationInfo>}
Retrieves an array of data for all applications.
- Tutorials:
Returns:
- Type
- Promise.Array.<ApplicationInfo>
getAllExternalApplications() → {Promise.Array.<Identity>}
Retrieves an array of data (name, ids, bounds) for all application windows.
- Tutorials:
Returns:
- Type
- Promise.Array.<Identity>
getAllWindows() → {Promise.Array.<WindowInfo>}
Retrieves an array of data (name, ids, bounds) for all application windows.
- Tutorials:
Returns:
- Type
- Promise.Array.<WindowInfo>
getAppAssetInfo(options) → {Promise.<AppAssetInfo>}
Retrieves app asset information.
Parameters:
Name | Type | Description |
---|---|---|
options |
AppAssetRequest |
- Tutorials:
Returns:
- Type
- Promise.<AppAssetInfo>
getCommandLineArguments() → {Promise.<string>}
Retrieves the command line argument string that started OpenFin Runtime.
- Tutorials:
Returns:
- Type
- Promise.<string>
getCookies(options) → {Promise.Array.<CookieInfo>}
Get additional info of cookies.
Parameters:
Name | Type | Description |
---|---|---|
options |
CookieOption | See tutorial for more details. |
- Tutorials:
Returns:
- Type
- Promise.Array.<CookieInfo>
getCrashReporterState() → {Promise.<CrashReporterOption>}
Get the current state of the crash reporter.
- Tutorials:
Returns:
- Type
- Promise.<CrashReporterOption>
getDeviceUserId() → {Promise.<string>}
Returns a hex encoded hash of the mac address and the currently logged in user name
- Tutorials:
Returns:
- Type
- Promise.<string>
getEntityInfo(uuid, name) → {Promise.<EntityInfo>}
Retrieves a frame info object for the uuid and name passed in
Parameters:
Name | Type | Description |
---|---|---|
uuid |
string | The UUID of the target. |
name |
string | The name of the target. |
- Tutorials:
Returns:
- Type
- Promise.<EntityInfo>
getEnvironmentVariable() → {Promise.<string>}
Gets the value of a given environment variable on the computer on which the runtime is installed
- Tutorials:
Returns:
- Type
- Promise.<string>
getFocusedWindow() → {Promise.<WindowInfo>}
Get current focused window.
- Tutorials:
Returns:
- Type
- Promise.<WindowInfo>
getHostSpecs() → {Promise.<Hostspecs>}
Retrieves system information.
- Tutorials:
Returns:
- Type
- Promise.<Hostspecs>
getLog(options) → {Promise.<string>}
Retrieves the contents of the log with the specified filename.
Parameters:
Name | Type | Description |
---|---|---|
options |
GetLogRequestType | A object that id defined by the GetLogRequestType interface |
- Tutorials:
Returns:
- Type
- Promise.<string>
getLogList() → {Promise.Array.<LogInfo>}
Retrieves an array containing information for each log file.
- Tutorials:
Returns:
- Type
- Promise.Array.<LogInfo>
getMachineId() → {Promise.<string>}
Returns a unique identifier (UUID) provided by the machine.
- Tutorials:
Returns:
- Type
- Promise.<string>
getMinLogLevel() → {Promise.<LogLevel>}
Returns the minimum (inclusive) logging level that is currently being written to the log.
- Tutorials:
Returns:
- Type
- Promise.<LogLevel>
getMonitorInfo() → {Promise.<MonitorInfo>}
Retrieves an object that contains data about the monitor setup of the computer that the runtime is running on.
- Tutorials:
Returns:
- Type
- Promise.<MonitorInfo>
getMousePosition() → {Promise.<PointTopLeft>}
Returns the mouse in virtual screen coordinates (left, top).
- Tutorials:
Returns:
- Type
- Promise.<PointTopLeft>
getProcessList() → {Promise.Array.<ProcessInfo>}
Retrieves an array of all of the runtime processes that are currently running. Each element in the array is an object containing the uuid and the name of the application to which the process belongs.
- Tutorials:
Returns:
- Type
- Promise.Array.<ProcessInfo>
getProxySettings() → {Promise.<ProxyInfo>}
Retrieves the Proxy settings.
- Tutorials:
Returns:
- Type
- Promise.<ProxyInfo>
getRuntimeInfo() → {Promise.<RuntimeInfo>}
Returns information about the running Runtime in an object.
- Tutorials:
Returns:
- Type
- Promise.<RuntimeInfo>
getRvmInfo() → {Promise.<RVMInfo>}
Returns information about the running RVM in an object.
- Tutorials:
Returns:
- Type
- Promise.<RVMInfo>
getVersion() → {Promise.<string>}
Returns the version of the runtime. The version contains the major, minor, build and revision numbers.
- Tutorials:
Returns:
- Type
- Promise.<string>
launchExternalProcess(options) → {Promise.<Identity>}
Runs an executable or batch file.
Parameters:
Name | Type | Description |
---|---|---|
options |
ExternalProcessRequestType | A object that is defined in the ExternalProcessRequestType interface |
- Tutorials:
Returns:
- Type
- Promise.<Identity>
log(level, message) → {Promise.<void>}
Writes the passed message into both the log file and the console.
Parameters:
Name | Type | Description |
---|---|---|
level |
string | The log level for the entry. Can be either "info", "warning" or "error" |
message |
string | The log message text |
- Tutorials:
Returns:
- Type
- Promise.<void>
monitorExternalProcess(pid) → {Promise.<Identity>}
Monitors a running process.
Parameters:
Name | Type | Description |
---|---|---|
pid |
number | See tutorial for more details |
- Tutorials:
Returns:
- Type
- Promise.<Identity>
openUrlWithBrowser(url) → {Promise.<void>}
Opens the passed URL in the default web browser.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL to open |
- Tutorials:
Returns:
- Type
- Promise.<void>
readRegistryValue(rootKey, subkey, value) → {Promise.<RegistryInfo>}
Reads the specifed value from the registry.
Parameters:
Name | Type | Description |
---|---|---|
rootKey |
string | The registry root key. |
subkey |
string | The registry key. |
value |
string | The registry value name. |
- Tutorials:
Returns:
- Type
- Promise.<RegistryInfo>
registerExternalConnection(uuid) → {Promise.<ExternalConnection>}
This function call will register a unique id and produce a token. The token can be used to broker an external connection.
Parameters:
Name | Type | Description |
---|---|---|
uuid |
string | A UUID for the remote connection. |
- Tutorials:
Returns:
- Type
- Promise.<ExternalConnection>
releaseExternalProcess(uuid) → {Promise.<void>}
Removes the process entry for the passed UUID obtained from a prior call of fin.System.launchExternalProcess().
Parameters:
Name | Type | Description |
---|---|---|
uuid |
string | The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess() |
- Tutorials:
Returns:
- Type
- Promise.<void>
resolveUuid(uuid) → {Promise.<Entity>}
Retrieves the UUID of the computer on which the runtime is installed
Parameters:
Name | Type | Description |
---|---|---|
uuid |
string | The uuid of the running application |
- Tutorials:
Returns:
- Type
- Promise.<Entity>
setMinLogLevel(The) → {Promise.<void>}
Set the minimum log level above which logs will be written to the OpenFin log
Parameters:
Name | Type | Description |
---|---|---|
The |
LogLevel | minimum level (inclusive) above which all calls to log will be written |
- Tutorials:
Returns:
- Type
- Promise.<void>
showDeveloperTools(identity) → {Promise.<void>}
Shows the Chromium Developer Tools for the specified window
Parameters:
Name | Type | Description |
---|---|---|
identity |
Identity | This is a object that is defined by the Identity interface |
- Tutorials:
Returns:
- Type
- Promise.<void>
startCrashReporter(options) → {Promise.<CrashReporterOption>}
Start the crash reporter for the browser process if not already running.
You can optionally specify diagnosticMode
to have the logs sent to
OpenFin on runtime close
Parameters:
Name | Type | Description |
---|---|---|
options |
CrashReporterOption | configure crash reporter |
- Tutorials:
Returns:
- Type
- Promise.<CrashReporterOption>
terminateExternalProcess(options) → {Promise.<void>}
Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds.
Parameters:
Name | Type | Description |
---|---|---|
options |
TerminateExternalRequestType | A object defined in the TerminateExternalRequestType interface |
- Tutorials:
Returns:
- Type
- Promise.<void>
updateProxySettings(options) → {Promise.<void>}
Update the OpenFin Runtime Proxy settings.
Parameters:
Name | Type | Description |
---|---|---|
options |
ProxyConfig | A config object defined in the ProxyConfig interface |
- Tutorials:
Returns:
- Type
- Promise.<void>