Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Latest commit

 

History

History
274 lines (265 loc) · 13.5 KB

docs.README.md

File metadata and controls

274 lines (265 loc) · 13.5 KB
<style> article > ul:last-of-type { position: relative; width: 50em; list-style-type: none; padding: 0; column-count: 2; -moz-column-count: 2 } .dashbox { position: relative; width: 30em; padding: .65em; text-align: center; margin-top: 2em; margin-bottom: 2.5em; border: 1px dashed grey; background-color: ivory; } .tempheader { padding: .65em; text-align: left; margin-top: 2em; margin-bottom: 2.5em; border: 1px dashed grey; background-color: ivory; } </style>
Have you been using our {@link https://cdn.openfin.co/jsdocs/stable/index.html legacy API} under the `fin.desktop` object? Welcome to the new and improved V2 API! You can now access the same classes and methods directly on the `fin` object. Please read {@link https://openfin.co/documentation/api-v2 this explanation} of the differences between the legacy V1 API and the new V2 API.

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 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 by the respective start and create calls with the following options objects:

  • The {@link Application~options Application Options } object is consumed by {@link Application.start Application.start}
  • The {@link Window~options Window Options } object is consumed by {@link Window.create Window.create}
For a single-page reference to all application settings and configuration options, see also our {@link https://openfin.co/application-config Application Config} page.

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">
            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>

Index of API Methods

  • {@link Window#animate animate} Window
  • {@link Window#authenticate authenticate} Window
  • {@link Window#blur blur} Window
  • {@link ExternalWindow#bringToFront bringToFront} ExternalWindow
  • {@link Window#bringToFront bringToFront} Window
  • {@link System#clearCache clearCache} System
  • {@link ExternalWindow#close close} ExternalWindow
  • {@link Notification#close close} Notification
  • {@link Window#close close} Window
  • {@link InterApplicationBus.Channel.connect connect} Channel
  • {@link Notification.create create} Notification
  • {@link InterApplicationBus.Channel.create create} Channel
  • {@link Window.create create} Window
  • {@link Application.createFromManifest createFromManifest} Application
  • {@link System#deleteCacheOnExit deleteCacheOnExit} System
  • {@link Window#disableUserMovement disableUserMovement} Window
  • {@link Channel#ChannelClient#dispatch dispatch} ChannelClient
  • {@link Channel#ChannelProvider#dispatch dispatch} ChannelProvider
  • {@link System#downloadAsset downloadAsset} System
  • {@link System#downloadPreloadScripts downloadPreloadScripts} System
  • {@link System#downloadRuntime downloadRuntime} System
  • {@link Window#enableUserMovement enableUserMovement} Window
  • {@link Window#executeJavaScript executeJavaScript} Window
  • {@link System#exit exit} System
  • {@link ExternalWindow#flash flash} ExternalWindow
  • {@link Window#flash flash} Window
  • {@link System#flushCookieStore flushCookieStore} System
  • {@link ExternalWindow#focus focus} ExternalWindow
  • {@link Window#focus focus} Window
  • {@link System#getAllApplications getAllApplications} System
  • {@link System#getAllExternalApplications getAllExternalApplications} System
  • {@link System#getAllExternalWindows getAllExternalWindows} System
  • {@link System#getAllWindows getAllWindows} System
  • {@link System#getAppAssetInfo getAppAssetInfo} System
  • {@link Clipboard#getAvailableFormats getAvailableFormats} Clipboard
  • {@link ExternalWindow#getBounds getBounds} ExternalWindow
  • {@link Window#getBounds getBounds} Window
  • {@link Application#getChildWindows getChildWindows} Application
  • {@link System#getCommandLineArguments getCommandLineArguments} System
  • {@link System#getCookies getCookies} System
  • {@link System#getCrashReporterState getCrashReporterState} System
  • {@link Application.getCurrent getCurrent} Application
  • {@link Frame.getCurrent getCurrent} Frame
  • {@link Notification.getCurrent getCurrent} Notification
  • {@link Window.getCurrent getCurrent} Window
  • {@link Application.getCurrentSync getCurrentSync} Application
  • {@link Frame.getCurrentSync getCurrentSync} Frame
  • {@link Notification.getCurrentSync getCurrentSync} Notification
  • {@link Window.getCurrentSync getCurrentSync} Window
  • {@link System#getDeviceUserId getDeviceUserId} System
  • {@link System#getEntityInfo getEntityInfo} System
  • {@link System#getEnvironmentVariable getEnvironmentVariable} System
  • {@link System#getFocusedExternalWindow getFocusedExternalWindow} System
  • {@link System#getFocusedWindow getFocusedWindow} System
  • {@link ExternalWindow#getGroup getGroup} ExternalWindow
  • {@link Window#getGroup getGroup} Window
  • {@link Application#getGroups getGroups} Application
  • {@link System#getHostSpecs getHostSpecs} System
  • {@link Application#getInfo getInfo} Application
  • {@link ExternalApplication#getInfo getInfo} ExternalApplication
  • {@link ExternalWindow#getInfo getInfo} ExternalWindow
  • {@link Frame#getInfo getInfo} Frame
  • {@link Window#getInfo getInfo} Window
  • {@link System#getLog getLog} System
  • {@link System#getLogList getLogList} System
  • {@link System#getMachineId getMachineId} System
  • {@link System#getMinLogLevel getMinLogLevel} System
  • {@link Application#getManifest getManifest} Application
  • {@link System#getMonitorInfo getMonitorInfo} System
  • {@link System#getMousePosition getMousePosition} System
  • {@link ExternalWindow#getOptions getOptions} ExternalWindow
  • {@link Window#getOptions getOptions} Window
  • {@link Window#getParentApplication getParentApplication} Window
  • {@link Application#getParentUuid getParentUuid} Application
  • {@link Frame#getParentWindow getParentWindow} Frame
  • {@link Window#getParentWindow getParentWindow} Window
  • {@link System#getProcessList getProcessList} System
  • {@link System#getProxySettings getProxySettings} System
  • {@link System#getRuntimeInfo getRuntimeInfo} System
  • {@link System#getRvmInfo getRvmInfo} System
  • {@link Application#getShortcuts getShortcuts} Application
  • {@link Window#getSnapshot getSnapshot} Window
  • {@link ExternalWindow#getState getState} ExternalWindow
  • {@link Window#getState getState} Window
  • {@link Application#getTrayIconInfo getTrayIconInfo} Application
  • {@link System#getVersion getVersion} System
  • {@link Application#getWindow getWindow} Application
  • {@link Application#getZoomLevel getZoomLevel} Application
  • {@link Window#getZoomLevel getZoomLevel} Window
  • {@link ExternalWindow#hide hide} ExternalWindow
  • {@link Window#hide hide} Window
  • {@link Window#isMainWindow isMainWindow} Window
  • {@link GlobalHotkey#isRegistered isRegistered} GlobalHotkey
  • {@link Application#isRunning isRunning} Application
  • {@link ExternalWindow#isShowing isShowing} ExternalWindow
  • {@link Window#isShowing isShowing} Window
  • {@link ExternalWindow#joinGroup joinGroup} ExternalWindow
  • {@link Window#joinGroup joinGroup} Window
  • {@link System#launchExternalProcess launchExternalProcess} System
  • {@link ExternalWindow#leaveGroup leaveGroup} ExternalWindow
  • {@link Window#leaveGroup leaveGroup} Window
  • {@link System#log log} System
  • {@link ExternalWindow#maximize maximize} ExternalWindow
  • {@link Window#maximize maximize} Window
  • {@link ExternalWindow#mergeGroups mergeGroups} ExternalWindow
  • {@link Window#mergeGroups mergeGroups} Window
  • {@link ExternalWindow#minimize minimize} ExternalWindow
  • {@link Window#minimize minimize} Window
  • {@link System#monitorExternalProcess monitorExternalProcess} System
  • {@link ExternalWindow#moveBy moveBy} ExternalWindow
  • {@link Window#moveBy moveBy} Window
  • {@link ExternalWindow#moveTo moveTo} ExternalWindow
  • {@link Window#moveTo moveTo} Window
  • {@link Window#navigate navigate} Window
  • {@link Window#navigateBack navigateBack} Window
  • {@link Window#navigateForward navigateForward} Window
  • {@link InterApplicationBus.Channel.onChannelConnect onChannelConnect} Channel
  • {@link InterApplicationBus.Channel.onChannelDisconnect onChannelDisconnect} Channel
  • {@link System#openUrlWithBrowser openUrlWithBrowser} System
  • {@link Channel#ChannelProvider#publish publish} ChannelProvider
  • {@link InterApplicationBus#publish publish} InterApplicationBus
  • {@link Application#quit quit} Application
  • {@link Clipboard#readHtml readHtml} Clipboard
  • {@link System#readRegistryValue readRegistryValue} System
  • {@link Clipboard#readRtf readRtf} Clipboard
  • {@link Clipboard#readText readText} Clipboard
  • {@link Channel#ChannelClient#register register} ChannelClient
  • {@link Channel#ChannelProvider#register register} ChannelProvider
  • {@link GlobalHotkey#register register} GlobalHotkey
  • {@link System#registerExternalConnection registerExternalConnection} System
  • {@link Application#registerUser registerUser} Application
  • {@link System#releaseExternalProcess releaseExternalProcess} System
  • {@link Window#reload reload} Window
  • {@link Channel#ChannelClient#remove remove} ChannelClient
  • {@link Channel#ChannelProvider#remove remove} ChannelProvider
  • {@link Application#removeTrayIcon removeTrayIcon} Application
  • {@link ExternalWindow#resizeBy resizeBy} ExternalWindow
  • {@link Window#resizeBy resizeBy} Window
  • {@link ExternalWindow#resizeTo resizeTo} ExternalWindow
  • {@link Window#resizeTo resizeTo} Window
  • {@link Application#restart restart} Application
  • {@link ExternalWindow#restore restore} ExternalWindow
  • {@link Window#restore restore} Window
  • {@link Application#scheduleRestart scheduleRestart} Application
  • {@link InterApplicationBus#send send} InterApplicationBus
  • {@link Notification#sendMessage sendMessage} Notification
  • {@link Application#setAppLogUsername setAppLogUsername} Application
  • {@link ExternalWindow#setAsForeground setAsForeground} ExternalWindow
  • {@link Window#setAsForeground setAsForeground} Window
  • {@link ExternalWindow#setBounds setBounds} ExternalWindow
  • {@link Window#setBounds setBounds} Window
  • {@link System#setMinLogLevel setMinLogLevel} System
  • {@link Application#setShortcuts setShortcuts} Application
  • {@link Application#setTrayIcon setTrayIcon} Application
  • {@link Application#setZoomLevel setZoomLevel} Application
  • {@link Window#setZoomLevel setZoomLevel} Window
  • {@link ExternalWindow#show show} ExternalWindow
  • {@link Window#show show} Window
  • {@link ExternalWindow#showAt showAt} ExternalWindow
  • {@link Window#showAt showAt} Window
  • {@link System#showDeveloperTools showDeveloperTools} System
  • {@link Application.start start} Application
  • {@link System#startCrashReporter startCrashReporter} System
  • {@link ExternalWindow#stopFlashing stopFlashing} ExternalWindow
  • {@link Window#stopFlashing stopFlashing} Window
  • {@link Window#stopNavigation stopNavigation} Window
  • {@link InterApplicationBus#subscribe subscribe} InterApplicationBus
  • {@link Application#terminate terminate} Application
  • {@link System#terminateExternalProcess terminateExternalProcess} System
  • {@link GlobalHotkey#unregister unregister} GlobalHotkey
  • {@link GlobalHotkey#unregisterAll unregisterAll} GlobalHotkey
  • {@link InterApplicationBus#unsubscribe unsubscribe} InterApplicationBus
  • {@link ExternalWindow#updateOptions updateOptions} ExternalWindow
  • {@link Window#updateOptions updateOptions} Window
  • {@link System#updateProxySettings updateProxySettings} System
  • {@link Application.wrap wrap} Application
  • {@link ExternalApplication.wrap wrap} ExternalApplication
  • {@link ExternalWindow.wrap wrap} ExternalWindow
  • {@link Frame.wrap wrap} Frame
  • {@link Window.wrap wrap} Window
  • {@link Application.wrapSync wrapSync} Application
  • {@link ExternalApplication.wrapSync wrapSync} ExternalApplication
  • {@link Frame.wrapSync wrapSync} Frame
  • {@link Window.wrapSync wrapSync} Window
  • {@link Clipboard#write write} Clipboard
  • {@link Clipboard#writeHtml writeHtml} Clipboard
  • {@link Clipboard#writeRtf writeRtf} Clipboard
  • {@link Clipboard#writeText writeText} Clipboard