Welcome to the documentation for the OpenFin JavaScript/TypeScript API. OpenFin uses TypeScript strictly as a static check on the validity of JavaScript API usage, so these API docs are valid for both JavaScript and TypeScript.
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.
fin
namespaceWhen 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.
New applications and windows are instantiated by the respective start
and create
calls with the following options objects:
For a single-page reference to all application settings and configuration options, see also our Application Config page.
<!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">
fin.System.getVersion().then(version => {
document.querySelector('#of-version').innerText = version;
});
</script>
</head>
<body>
<p>
OpenFin version <span id="of-version"></span>
</p>
</body>
</html>