View manifest options
A view defines the presentation and behavior of a piece of web content (for example, a web page or web app) within OpenFin Browser, through a view manifest file. Thanks to the manifest, these aspects are preserved if the user moves the view between pages or windows.
You can provide manifests for views in order to make them available to end-users via Workspace.
For a complete list of properties, refer to the View options type in the JavaScript API reference.
The only required properties are the following:
-
name
: a string containing the name of the view. -
target
: the identity of the window this view is attached to.
The following fields, which are all optional, are frequently used in a view manifest:
Name | Type | Description |
---|---|---|
backgroundColor | string; default: #FFF (white) | The view's background fill color as a hexadecimal value. Not to be confused with the content background color (document.body.style.backgroundColor ), this color briefly fills (a) a view’s content area before its content is loaded, and (b) a view’s newly exposed areas when growing a window. Setting this value to the anticipated content background color can help improve user experience. |
contextMenuOptions | (updatable) object | In Runtime v27+, supersedes contextMenuSettings . Configures the context menu that appears when the user right-clicks in a view. Contains the following members:- enabled A Boolean (default: true ) for whether the context displays on a right-click.- template An array of strings representing items in the right-click menu. Refer to Context menus for supported values. |
customData | (updatable) any; default: "" (empty string) | You can attach serializable data to this field and have it be transported with the rest of the view options. |
hotkeys | (updatable) array of objects | Defines a list of hotkeys that are emitted as hotkey events on the view. (Refer to the hotkeys usage example.) Contains the following members:- keys A string describing the key combination of the hotkey, such as "Ctrl+T" .- preventDefault A Boolean (default: false ) that indicates whether the page keydown and keyup events are prevented from being emitted. That is, if true , those events are not emitted. |
preloadScripts | array of preloadScript objects | Scripts that are evaluated before other scripts in the page. When omitted, inherits from the parent application. |
processAffinity | string | Groups renderers together. It is used only if the pages are on the same origin. |
url | string; default: "about:blank" | The URL of the view. |
Updated 3 months ago