Classdesc

A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window. It has the ability to listen for window specific events.

Alias

Window

Hideconstructor

Hierarchy

Constructors

Properties

addListener: (<EventType>(eventType: EventType, listener: EventHandler<OpenFin.WindowEvents.WindowEvent, EventType>, options?: SubscriptionOptions) => Promise<Window>) = ...

Type declaration

    • <EventType>(eventType: EventType, listener: EventHandler<OpenFin.WindowEvents.WindowEvent, EventType>, options?: SubscriptionOptions): Promise<Window>
    • Type Parameters

      • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

      Parameters

      Returns Promise<Window>

entityType: string
identity: Identity
wire: Transport<EntityType>

Accessors

Methods

  • Performs the specified window transitions.

    Returns

    Tutorial

    Window.animate

    Parameters

    • transitions: Transition

      Describes the animations to perform. See the tutorial.

    • options: TransitionOptions

      Options for the animation. See the tutorial.

    Returns Promise<void>

  • Provides credentials to authentication requests

    Returns

    Tutorial

    Window.authenticate

    Parameters

    • userName: string

      userName to provide to the authentication challenge

    • password: string

      password to provide to the authentication challenge

    Returns Promise<void>

  • Removes focus from the window.

    Returns

    Tutorial

    Window.blur

    Returns Promise<void>

  • Brings the window to the front of the window stack.

    Returns

    Tutorial

    Window.bringToFront

    Returns Promise<void>

  • Centers the window on its current screen.

    Returns

    Tutorial

    Window.center

    Returns Promise<void>

  • closes the window application

    Returns

    Tutorial

    Window.close

    Parameters

    • Optional force: boolean = false

    Returns Promise<void>

  • Experimental

    Closes the window's popup menu, if one exists.

    Returns

    Tutorial

    Window.closePopupMenu

    Returns Promise<void>

  • Opens the developer tools for the service worker context.

    Function

    inspectServiceWorker

    Member Of

    Window

    Instance

    Returns

    Tutorial

    Window.inspectServiceWorker

    Parameters

    Returns Promise<Window>

  • Returns Promise<void>

  • Prevents a user from changing a window's size/position when using the window's frame.

    Returns

    Tutorial

    Window.disableUserMovement

    Returns Promise<void>

  • Dispatch a result to the caller of showPopupWindow. If this window isn't currently being shown as a popup, this call will silently fail.

    Returns

    Tutorial

    Window.dispatchPopupResult

    Parameters

    • data: any

      Serializable data to send to the caller window.

    Returns Promise<void>

  • Type Parameters

    • EventType extends string

    Parameters

    • eventType: EventType
    • payload: Extract<EmitterEvent, {
          type: EventType;
      }>
    • Rest ...args: any[]

    Returns boolean

  • Returns Promise<void>

  • Re-enables user changes to a window's size/position when using the window's frame.

    Returns

    Tutorial

    Window.enableUserMovement

    Returns Promise<void>

  • Returns (string | symbol)[]

  • Parameters

    • code: string

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Flashes the window’s frame and taskbar icon until stopFlashing is called or until a focus event is fired.

    Returns

    Tutorial

    Window.flash

    Returns Promise<void>

  • Parameters

    • __namedParameters: {
          emitSynthFocused: boolean;
      } = ...
      • emitSynthFocused: boolean

    Returns Promise<void>

  • Returns Promise<void>

  • Retrieves an array of frame info objects representing the main frame and any iframes that are currently on the page.

    Returns

    Tutorial

    Window.getAllFrames

    Returns Promise<FrameInfo[]>

  • Gets the current bounds (top, bottom, right, left, width, height) of the window.

    Returns

    Tutorial

    Window.getBounds

    Returns Promise<WindowBounds>

  • Experimental

    Retrieves window's attached views.

    Returns

    Tutorial

    Window.getCurrentViews

    Returns Promise<OpenFin.View[]>

  • Gets an information object for the window.

    Returns

    Tutorial

    Window.getInfo

    Returns Promise<WindowInfo>

  • Experimental

    Retrieves the window's Layout

    Returns

    Tutorial

    Window.getLayout

    Returns Promise<OpenFin.Layout>

  • Returns the native OS level Id. In Windows, it will return the Windows handle.

    Returns

    Tutorial

    Window.getNativeId

    Returns Promise<string>

  • Gets the current settings of the window.

    Returns

    Tutorial

    Window.getOptions

    Returns Promise<WindowOptions>

  • Gets the parent window.

    Returns

    Tutorial

    Window.getParentWindow

    Returns Promise<Window>

  • DEPRECATED - please use Window.capturePage. Gets a base64 encoded PNG image of the window or just part a of it.

    Returns

    Tutorial

    Window.capturePage

    Parameters

    • Optional area: Rectangle

      The area of the window to be captured. Omitting it will capture the whole visible window.

    Returns Promise<string>

  • Gets the current state ("minimized", "maximized", or "normal") of the window.

    Returns

    Tutorial

    Window.getState

    Returns Promise<"maximized" | "minimized" | "normal">

  • Previously called getNativeWindow. Returns the Window Object that represents the web context of the target window. This is the same object that you would get from calling window.open() in a standard web context. The target window needs to be in the same application as the requesting window as well as comply with same-origin policy requirements.

    Returns

    Tutorial

    Window.getWebWindow

    Returns Window

  • Returns Promise<number>

  • Hides the window.

    Returns

    Tutorial

    Window.hide

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • workerId: string

    Returns Promise<void>

  • Determines if the window is a main window.

    Returns

    Tutorial

    Window.isMainWindow

    Returns boolean

  • Determines if the window is currently showing.

    Returns

    Tutorial

    Window.isShowing

    Returns Promise<boolean>

  • Parameters

    • type: string | symbol

    Returns number

  • Parameters

    • type: string | symbol

    Returns Function[]

  • Maximizes the window

    Returns

    Tutorial

    Window.maximize

    Returns Promise<void>

  • Minimizes the window.

    Returns

    Tutorial

    Window.minimize

    Returns Promise<void>

  • Moves the window by a specified amount.

    Returns

    Tutorial

    Window.moveBy

    Parameters

    • deltaLeft: number

      The change in the left position of the window

    • deltaTop: number

      The change in the top position of the window

    • Optional positioningOptions: PositioningOptions

    Returns Promise<void>

  • Moves the window to a specified location.

    Returns

    Tutorial

    Window.moveTo

    Parameters

    • left: number

      The left position of the window

    • top: number

      The top position of the window

    • Optional positioningOptions: PositioningOptions

    Returns Promise<void>

  • Parameters

    • url: string

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Type Parameters

    • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<Window>

  • Type Parameters

    • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<Window>

  • Type Parameters

    • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<Window>

  • Type Parameters

    • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<Window>

  • Prints the contents of the window.

    Tutorial

    Window.print

    Parameters

    Returns Promise<void>

  • Parameters

    • ignoreCache: boolean = false

    Returns Promise<void>

  • Parameters

    • Optional eventType: "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Returns Promise<Window>

  • Type Parameters

    • EventType extends "blurred" | "certificate-selection-shown" | "crashed" | "did-change-theme-color" | "focused" | "navigation-rejected" | "url-changed" | "did-fail-load" | "did-finish-load" | "page-favicon-updated" | "page-title-updated" | "resource-load-failed" | "response-received" | "child-content-blocked" | "child-content-opened-in-browser" | "child-view-created" | "file-download-started" | "file-download-progress" | "file-download-completed" | "hidden" | "hotkey" | "shown" | "view-detached" | "auth-requested" | "begin-user-bounds-changing" | "bounds-changed" | "bounds-changing" | "close-requested" | "closed" | "closing" | "disabled-movement-bounds-changed" | "disabled-movement-bounds-changing" | "embedded" | "end-user-bounds-changing" | "external-process-exited" | "external-process-started" | "initialized" | "layout-initialized" | "layout-ready" | "maximized" | "minimized" | "options-changed" | "performance-report" | "preload-script-state-changed" | "preload-script-state-changing" | "reloaded" | "restored" | "show-requested" | "user-movement-disabled" | "user-movement-enabled" | "will-move" | "will-redirect" | "will-resize" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<Window>

  • Resizes the window by a specified amount.

    Returns

    Tutorial

    Window.resizeBy

    Parameters

    • deltaWidth: number

      The change in the width of the window

    • deltaHeight: number

      The change in the height of the window

    • anchor: AnchorType

      Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left"

    • Optional positioningOptions: PositioningOptions

    Returns Promise<void>

  • Resizes the window to the specified dimensions.

    Returns

    Tutorial

    Window.resizeTo

    Parameters

    • width: number

      The change in the width of the window

    • height: number

      The change in the height of the window

    • anchor: AnchorType

      Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left"

    • Optional positioningOptions: PositioningOptions

    Returns Promise<void>

  • Restores the window to its normal state (i.e., unminimized, unmaximized).

    Returns

    Tutorial

    Window.restore

    Returns Promise<void>

  • Will bring the window to the front of the entire stack and give it focus.

    Returns

    Tutorial

    Window.setAsForeground

    Returns Promise<void>

  • Sets the window's size and position.

    Property

    This is a *

    Returns

    Tutorial

    Window.setBounds

    Parameters

    Returns Promise<void>

  • Parameters

    • level: number

    Returns Promise<void>

  • Shows the window if it is hidden.

    Returns

    Tutorial

    Window.show

    Parameters

    • Optional force: boolean = false

    Returns Promise<void>

  • Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding.

    Returns

    Tutorial

    Window.showAt

    Parameters

    • left: number

      The left position of the window

    • top: number

      The right position of the window

    • force: boolean = false

      Show will be prevented from closing when force is false and ‘show-requested’ has been subscribed to for application’s main window

    Returns Promise<void>

  • Returns Promise<void>

  • Experimental

    Shows a menu on the window. Returns a promise that resolves when the user has either selected an item or closed the menu. (This may take longer than other apis). Resolves to an object with {result: 'clicked', data } where data is the data field on the menu item clicked, or {result 'closed'} when the user doesn't select anything. Calling this method will close previously opened menus.

    Returns

    Tutorial

    Window.showPopupMenu

    Parameters

    Returns Promise<MenuResult>

  • Parameters

    • action: string

    Returns Promise<void>

  • Stops the taskbar icon from flashing.

    Returns

    Tutorial

    Window.stopFlashing

    Returns Promise<void>

  • Returns Promise<void>

  • Updates the window using the passed options. Values that are objects are deep-merged, overwriting only the values that are provided.

    Returns

    Tutorial

    Window.updateOptions

    Parameters

    • options: Partial<MutableWindowOptions>

      Changes a window's options that were defined upon creation. See tutorial

    Returns Promise<void>

Generated using TypeDoc