AboutSupportDeveloper GuideVersion 41.132.100.57

Interface LegacyWinOptionsInAppOptions

interface LegacyWinOptionsInAppOptions {
    accelerator?: Partial<Accelerator>;
    alwaysOnTop?: boolean;
    api?: ApiSettings;
    aspectRatio?: number;
    autoShow?: boolean;
    autoplayPolicy?: AutoplayPolicyOptions;
    backgroundColor?: string;
    contentNavigation?: NavigationRules;
    contextMenu?: boolean;
    cornerRounding?: Partial<CornerRounding>;
    customData?: any;
    customRequestHeaders?: CustomRequestHeaders[];
    defaultCentered?: boolean;
    defaultHeight?: number;
    defaultLeft?: number;
    defaultTop?: number;
    defaultWidth?: number;
    frame?: boolean;
    hideOnClose?: boolean;
    icon?: string;
    ignoreSavedWindowState?: boolean;
    maxHeight?: number;
    maxWidth?: number;
    maximizable?: boolean;
    minHeight?: number;
    minWidth?: number;
    minimizable?: boolean;
    opacity?: number;
    preloadScripts?: PreloadScript[];
    resizable?: boolean;
    resizeRegion?: ResizeRegion;
    saveWindowState?: boolean;
    shadow?: boolean;
    showTaskbarIcon?: boolean;
    smallWindow?: boolean;
    state?: WindowState;
    taskbarIconGroup?: string;
    waitForPageLoad?: boolean;
}

Properties

accelerator?: Partial<Accelerator>

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

alwaysOnTop?: boolean
false

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

Configurations for API injection.

aspectRatio?: number
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.

contentNavigation?: NavigationRules

Restrict navigation to URLs that match an allowed pattern. In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited. See here for more details.

contextMenu?: boolean

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

true

Show the context menu when right-clicking on the window.
Gives access to the devtools for the 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.

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

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

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

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

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.

frame?: boolean
true

Show the window's frame.
hideOnClose?: boolean
false

Hides the window instead of closing it when the close button is pressed.
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.

maxHeight?: number
-1

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

The maximum width of a window. Will default to the OS defined value if set to -1.
maximizable?: boolean
true

Allows the window to be maximized.
minHeight?: number
0

The minimum height of the window.
minWidth?: number
true

The minimum width of the window.
minimizable?: boolean
true

Allows the window to be minimized.
opacity?: number

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.

preloadScripts?: PreloadScript[]

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

resizable?: boolean
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

true

Caches the location of the window.

Note: this option is ignored in Platforms as it would cause inconsistent applySnapshot behavior.

shadow?: boolean

false

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

showTaskbarIcon?: boolean
true

Shows the window's icon in the taskbar.
smallWindow?: boolean

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

"normal"

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

  • "maximized"
  • "minimized"
  • "normal"
taskbarIconGroup?: string

Specify a taskbar group for the window. Can be shared across applications.

If omitted from a main window, defaults to app's uuid (fin.Application.getCurrentSync().identity.uuid). Use platform.defaultWindowOptions.taskbarIconGroup to set a default for platform applications. If omitted, defaults to app's uuid (fin.Application.getCurrentSync().identity.uuid).

It's only updatable when enableJumpList is set to false.

waitForPageLoad?: boolean

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.