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.

contentNavigation

object

Specifies a set of match patterns for URLs that the user can navigate to, or is prevented from navigating to. Contains the following members:

  • whitelist An array of strings that specify match patterns for URLs the user is allowed to navigate to.
  • blacklist An array of strings that specify match patterns for URLs the user is not allowed to navigate to.

contextMenuSettings

(updatable) object

Configures the context menu that appears when the user right-clicks in a view. Contains the following members:

  • enable A Boolean (default: true) that indicates whether the context displays on a right-click.
  • devtools A Boolean (default: true) that indicates whether the context menu contains a button for opening developer tools.
  • reload A Boolean (default: true) that indicates whether the context menu contains a button for reloading the page.

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.


Did this page help you?