Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BrowserCreateWindowRequest

Request for creating a browser window.

Hierarchy

  • Omit<OpenFin.PlatformWindowCreationOptions, "workspacePlatform">
    • BrowserCreateWindowRequest

Index

Properties

accelerator?: Partial<Accelerator>

Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.

alphaMask?: RGB

Turns anything of matching RGB value transparent.

Caveats:

  • runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
  • User cannot click-through transparent regions
  • Not supported on Mac
  • Windows Aero must be enabled
  • Won't make visual sense on Pixel-pushed environments such as Citrix
  • Not supported on rounded corner windows
alwaysOnTop?: boolean
defaultvalue

false

Always position the window at the top of the window stack.

api?: Api

Configurations for API injection.

applicationIcon?: string
deprecated

use icon instead.

aspectRatio?: number
defaultvalue

0

The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero, an aspect ratio will not be enforced.

autoShow?: boolean

Automatically show the window when it is created.

autoplayPolicy?: AutoplayPolicyOptions

Autoplay policy to apply to content in the window, can be no-user-gesture-required, user-gesture-required, document-user-activation-required. Defaults to no-user-gesture-required.

backgroundColor?: string

The window’s backfill color as a hexadecimal value. Not to be confused with the content background color (document.body.style.backgroundColor), this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed areas when growing a window. Setting this value to the anticipated content background color can help improve user experience. Default is white.

closeOnLastViewRemoved?: boolean
defaultvalue

true

Toggling off would keep the Window alive even if all its Views were closed. This is meant for advanced users and should be used with caution. Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail. Use layout.replace to create a fresh Layout instance in case you want to populate it with Views again. ** note ** - This option is ignored in non-Platforms apps.

contentCreation?: ContentCreationOptions

Configures how new content (e,g, from window.open or a link) is opened.

contentNavigation?: ContentNavigation

Restrict navigation to URLs that match a whitelisted pattern. In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited. See here for more details.

contentRedirect?: Partial<ContentRedirect>

Restrict redirects to URLs that match a whitelisted pattern. In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited. See here for more details.

contextMenu?: boolean
deprecated

Superseded by contextMenuOptions, which offers a larger feature-set and cleaner syntax.

defaultvalue

true

Show the context menu when right-clicking on the window. Gives access to the devtools for the window.

contextMenuOptions?: ContextMenuOptions

Configure the context menu when right-clicking on a window.

contextMenuSettings?: ContextMenuSettings
deprecated

Superseded by contextMenuOptions, which offers a larger feature-set and cleaner syntax.

Configure the context menu when right-clicking on a window.

cornerRounding?: Partial<CornerRounding>

Defines and applies rounded corners for a frameless window. NOTE: On macOS corner is not ellipse but circle rounded by the average of height and width.

customContext?: any

A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot} is called. If a window in a Platform is trying to update or retrieve its own context, it can use the {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls. When omitted, inherits from the parent application. As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}

customData?: any

A field that the user can attach serializable data to be ferried around with the window options. When omitted, inherits from the parent application.

customRequestHeaders?: CustomRequestHeaders[]

Custom headers for requests sent by the window.

defaultCentered?: boolean

Centers the window in the primary monitor. This option overrides defaultLeft and defaultTop. When saveWindowState is true, this value will be ignored for subsequent launches in favor of the cached value. NOTE: On macOS defaultCenter is somewhat above center vertically.

defaultHeight?: number
defaultvalue

500

The default height of the window. When saveWindowState is true, this value will be ignored for subsequent launches in favor of the cached value.

defaultLeft?: number
defaultvalue

100

The default left position of the window. When saveWindowState is true, this value will be ignored for subsequent launches in favor of the cached value.

defaultTop?: number
defaultvalue

100

The default top position of the window. When saveWindowState is true, this value will be ignored for subsequent launches in favor of the cached value.

defaultWidth?: number
defaultvalue

800

The default width of the window. When saveWindowState is true, this value will be ignored for subsequent launches in favor of the cached value.

experimental?: any
fdc3InteropApi?: string
frame?: boolean
defaultvalue

true

Show the window's frame.

height?: number
hideOnClose?: boolean
defaultvalue

false

Hides the window instead of closing it when the close button is pressed.

hotkeys?: Hotkey[]

Defines the hotkeys that will be emitted as a hotkey event on the window. For usage example see [example]{@tutorial hotkeys}. Within Platform, OpenFin also implements a set of pre-defined actions called keyboard commands that can be assigned to a specific hotkey in the platform manifest.

icon?: string

A URL for the icon to be shown in the window title bar and the taskbar. When omitted, inherits from the parent application._ note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.

ignoreSavedWindowState?: boolean

Ignores the cached state of the window. Defaults the opposite value of saveWindowState to maintain backwards compatibility.

includeInSnapshots?: boolean
defaultvalue

true

Include window in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.

interop?: InteropConfig
layout?: any
maxHeight?: number
defaultvalue

-1

The maximum height of a window. Will default to the OS defined value if set to -1.

maxWidth?: number
defaultvalue

-1

The maximum width of a window. Will default to the OS defined value if set to -1.

maximizable?: boolean
defaultvalue

true

Allows the window to be maximized.

minHeight?: number
defaultvalue

0

The minimum height of the window.

minWidth?: number
defaultvalue

true

The minimum width of the window.

minimizable?: boolean
defaultvalue

true

Allows the window to be minimized.

modalParentIdentity?: Identity

Parent identity of a modal window. It will create a modal child window when this option is set.

name?: string

The name of the window.

opacity?: number
defaultvalue

1

A flag that specifies how transparent the window will be. Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there. This value is clamped between 0.0 and 1.0.

permissions?: Partial<Permissions>
preloadScripts?: PreloadScript[]

Scripts that run before page load. When omitted, inherits from the parent application.

processAffinity?: string

String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.

reason?: WindowCreationReason
resizable?: boolean
defaultvalue

true

A flag to allow the user to resize the window.

resizeRegion?: ResizeRegion

Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.

saveWindowState?: boolean
defaultvalue

true

Caches the location of the window. Note: this option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.

shadow?: boolean
defaultvalue

false

Displays a shadow on frameless windows. shadow and cornerRounding are mutually exclusive. On Windows 7, Aero theme is required.

showBackgroundImages?: boolean
defaultvalue

false

Platforms Only. If true, will show background images in the layout when the Views are hidden. This occurs when the window is resizing or a tab is being dragged within the layout.

showTaskbarIcon?: boolean
defaultvalue

true

Shows the window's icon in the taskbar.

smallWindow?: boolean
defaultvalue

false

Makes this window a frameless window that can be created and resized to less than 41x36 px (width x height). Note: Caveats of small windows are no Aero Snap and drag to/from maximize. Windows 10: Requires maximizable to be false. Resizing with the mouse is only possible down to 38x39 px.

state?: WindowState
defaultvalue

"normal"

The visible state of the window on creation. One of:

  • "maximized"
  • "minimized"
  • "normal"
taskbarIcon?: string
deprecated
  • use icon instead.
taskbarIconGroup?: string

Specify a taskbar group for the window. If omitted, defaults to app's uuid (fin.Application.getCurrentSync().identity.uuid).

updateStateIfExists?: boolean
url?: string
defaultvalue

"about:blank"

The URL of the window

uuid?: string
defaultvalue

The uuid of the application, unique within the set of all Applications running in OpenFin Runtime. If omitted, defaults to the uuid of the application spawning the window. If given, must match the uuid of the application spawning the window. In other words, the application's uuid is the only acceptable value, but is the default, so there's really no need to provide it.

viewVisibility?: ViewVisibilityOptions

Platform Windows Only. Controls behavior for showing views when they are being resized by the user.

waitForPageLoad?: boolean
defaultvalue

false

When set to true, the window will not appear until the window object's load event fires. When set to false, the window will appear immediately without waiting for content to be loaded.

width?: number
workspacePlatform: { disableMultiplePages?: boolean; favicon?: string; isLocked?: boolean; newPageUrl?: string; newTabUrl?: string; pages: Page[]; preventPageClose?: boolean; preventPageDrag?: boolean; preventPageDragIn?: boolean; preventPageDragOut?: boolean; title?: string; toolbarOptions?: ToolbarOptions; windowStateButtonOptions?: WindowStateButtonOptions }

WorkspacePlatform specific window options. These options will not work unless a workspace platform has been initialized.

Type declaration

  • Optional disableMultiplePages?: boolean

    Remove the Page UI and only allow a single page in the browser window. Must be set to true for this behavior. If this is not set to false, then an empty pages option will be populated with a single page.

  • Optional favicon?: string

    The favicon to display on the top left of the created browser window.

  • Optional isLocked?: boolean

    When true, disables the ability to close pages, drag pages within the window, and drag pages into/out of the window. False by default.

  • Optional newPageUrl?: string

    Landing page that shows up when you add a new page from the plus button that exists in the window frame where the page selector is shown. If you do not provide a newPageUrl, then the new Page plus button will not be shown and you cannot create a new empty Page or Window.

  • Optional newTabUrl?: string

    Landing page that shows up when you add a new tab from the plus button that exists in the tabstrip. If you do not provide a newTabUrl, then the plus button in the tabstrip will not be shown and users cannot create a new empty tab.

  • pages: Page[]

    The initial set of pages to add to the created browser window.

  • Optional preventPageClose?: boolean

    When true, disables the ability to close pages in the window. False by default.

  • Optional preventPageDrag?: boolean

    When true, page tabs in the window will not be draggable. This includes reordering pages and dragging them out of the window. False by default.

  • Optional preventPageDragIn?: boolean

    When true, disables the ability to drag pages into the window. False by default.

  • Optional preventPageDragOut?: boolean

    When true, disables the ability to drag pages out of a window. False by default.

  • Optional title?: string

    A UI friendly title for the created browser window.

  • Optional toolbarOptions?: ToolbarOptions
  • Optional windowStateButtonOptions?: WindowStateButtonOptions
x?: number
y?: number

Generated using TypeDoc