Welcome to the JavaScript API. This API allows you to create an HTML/JavaScript application that has access to the native windowing environment, can communicate with other applications and has access to sandboxed system-level features.
The fin
namespace
When running within the OpenFin Runtime your web applications have access to the fin
namespace and all the modules within the API without the need to include additional source files.
You can treat the fin
namespace as you would the window
, navigator
or document
objects.
API Ready
When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main()
method or explicitly after it has returned. This avoids the situation of trying to access methods that are not yet fully injected.
API Methods
The full API Method Index can be found below.
- To find a specific method by name, simply search this page.
- To browse the API, click one of the classes or namespaces in the sidebar at left.
Configuration
New applications and windows are instantiated with the following options objects:
- The Application Options object is consumed by the Application constructor
- The Window Options object is consumed by the Window constructor
Example
<!DOCTYPE html>
<head>
<style>
#status-indicator {
display: inline-block;
height: 10px;
width: 10px;
background-color: red;
border-radius: 20px;
}
#status-indicator.online {
background-color: green;
}
</style>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', () => {
//OpenFin is ready
fin.desktop.main(() => {
//Update the status Indicator.
document.querySelector('#status-indicator').classList.toggle("online");
//get the current version.
fin.desktop.System.getVersion(version => {
document.querySelector('#of-version').innerText = version;
});
});
});
</script>
</head>
<body>
<p>
OpenFin adapter <span id="of-version"></span>
Ready: <span id="status-indicator"></span>
</p>
</body>
</html>
Index of API Methods
- addEventListener Application
- addEventListener ExternalApplication
- addEventListener Frame
- addEventListener System
- addEventListener Window
- addSubscribeListener InterApplicationBus
- addUnsubscribeListener InterApplicationBus
- animate Window
- Application (constructor)
- authenticate Window
- availableFormats Clipboard
- blur Window
- bringToFront Window
- clearCache System
- close Application
- close Window
- connect Channel
- create Channel
- createFromManifest Application
- deleteCacheOnExit System
- disableFrame Window
- dispatch ChannelClient
- dispatch ChannelProvider
- downloadAsset System
- downloadPreloadScripts System
- downloadRuntime System
- enableFrame Window
- executeJavaScript Window
- exit System
- ExternalApplication (constructor)
- flash Window
- flushCookieStore System
- focus Window
- getAllApplications System
- getAllExternalApplications System
- getAllWindows System
- getAppAssetInfo System
- getBounds Window
- getChildWindows Application
- getCommandLineArguments System
- getCookies System
- getCrashReporterState System
- getCurrent Application
- getCurrent Frame
- getCurrent Window
- getEntityInfo System
- getEnvironmentVariable System
- getFocusedWindow System
- getHostSpecs System
- getInfo Application
- getInfo ExternalApplication
- getInfo Frame
- getInfo Window
- getLog System
- getLogList System
- fin.desktop.System.getMachineId System
- getMinLogLevel System
- getManifest Application
- getMonitorInfo System
- getMousePosition System
- getNativeWindow Window
- getOptions Window
- getParentApplication Window
- getParentUuid Application
- getParentWindow Frame
- getParentWindow Window
- getProcessList System
- getProxySettings System
- getRuntimeInfo System
- getRvmInfo System
- getShortcuts Application
- getSnapshot Window
- getState Window
- getTrayIconInfo Application
- getVersion System
- getWindow Application
- getZoomLevel Application
- getZoomLevel Window
- hide Window
- isRunning Application
- isShowing Window
- launchExternalProcess System
- log System
- maximize Window
- minimize Window
- monitorExternalProcess System
- moveBy Window
- moveTo Window
- navigate Window
- navigateBack Window
- navigateForward Window
- onChannelConnect Channel
- onChannelDisconnect Channel
- openUrlWithBrowser System
- publish ChannelProvider
- publish InterApplicationBus
- readHtml Clipboard
- readRegistryValue System
- readRtf Clipboard
- readText Clipboard
- register ChannelClient
- register ChannelProvider
- registerExternalConnection System
- registerUser Application
- releaseExternalProcess System
- reload Window
- remove ChannelClient
- remove ChannelProvider
- removeEventListener Application
- removeEventListener ExternalApplication
- removeEventListener Frame
- removeEventListener System
- removeEventListener Window
- removeSubscribeListener InterApplicationBus
- removeTrayIcon Application
- removeUnsubscribeListener InterApplicationBus
- resizeBy Window
- resizeTo Window
- restart Application
- restore Window
- run Application
- scheduleRestart Application
- send InterApplicationBus
- sendApplicationLog Application
- setAppLogUsername Application
- setAsForeground Window
- setBounds Window
- setMinLogLevel System
- setShortcuts Application
- setTrayIcon Application
- setZoomLevel Application
- setZoomLevel Window
- show Window
- showAt Window
- showDeveloperTools System
- startCrashReporter System
- stopFlashing Window
- stopNavigation Window
- subscribe InterApplicationBus
- terminate Application
- terminateExternalProcess System
- unsubscribe InterApplicationBus
- updateOptions Window
- updateProxySettings System
- Window (constructor)
- wrap Application
- wrap ExternalApplication
- wrap Frame
- wrap Window
- write Clipboard
- writeHtml Clipboard
- writeRtf Clipboard
- writeText Clipboard