Classdesc

A View can be used to embed additional web content into a Window. It is like a child window, except it is positioned relative to its owning window. It has the ability to listen for View-specific events.

By default, a View will try to share the same renderer process as other Views owned by its parent Application. To change that behavior, see the processAffinity View~options view option.

A View's lifecycle is tied to its owning window and can be re-attached to a different window at any point during its lifecycle.

Alias

View

Hideconstructor

Hierarchy

  • WebContents<ViewEvent>
    • View

Constructors

Properties

addListener: (<EventType>(eventType: EventType, listener: EventHandler<OpenFin.ViewEvents.ViewEvent, EventType>, options?: SubscriptionOptions) => Promise<OpenFin.View>) = ...

Type declaration

    • <EventType>(eventType: EventType, listener: EventHandler<OpenFin.ViewEvents.ViewEvent, EventType>, options?: SubscriptionOptions): Promise<OpenFin.View>
    • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

      Parameters

      Returns Promise<OpenFin.View>

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

Accessors

Methods

  • Experimental

    Attaches the current view to a the given window identity. Identity must be the identity of a window in the same application. This detaches the view from its current window, and sets the view to be destroyed when its new window closes.

    Returns

    Tutorial

    View.attach

    Parameters

    Returns Promise<void>

  • Experimental

    Destroys the current view

    Returns

    Tutorial

    View.destroy

    Returns Promise<void>

  • Type Parameters

    • EventType extends string

    Parameters

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

    Returns boolean

  • Returns (string | symbol)[]

  • Parameters

    • code: string

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Experimental

    Focuses the view

    Returns

    Function

    focus

    Memberof

    View

    Emits

    focused

    Instance

    Tutorial

    View.focus

    Parameters

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

    Returns Promise<void>

  • Experimental

    Gets the bounds (top, left, width, height) of the view relative to its window.

    Returns

    Tutorial

    View.getBounds

    Returns Promise<Bounds>

  • Retrieves the current TabStack of the view if it belongs to one.

    Returns

    The TabStack this view belongs to.

    Throws

    if this view does not belong to a TabStack or if the window has been destroyed.

    Returns Promise<TabStack>

  • Experimental

    Retrieves the window the view is currently attached to.

    Returns

    Returns Promise<Window>

  • Experimental

    Gets the View's info.

    Returns

    Tutorial

    View.getInfo

    Returns Promise<ViewInfo>

  • Experimental

    Gets the View's options.

    Returns

    Tutorial

    View.getOptions

    Returns Promise<ViewOptions>

  • Experimental

    Retrieves the layout for the window the view is attached to.

    Returns

    Tutorial

    View.getParentLayout

    Returns Promise<OpenFin.Layout>

  • Returns Promise<number>

  • Experimental

    Hides the current view if it is currently visible.

    Returns

    Tutorial

    View.hide

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • workerId: string

    Returns Promise<void>

  • Parameters

    • type: string | symbol

    Returns number

  • Parameters

    • type: string | symbol

    Returns Function[]

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<OpenFin.View>

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<OpenFin.View>

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<OpenFin.View>

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<OpenFin.View>

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Returns Promise<OpenFin.View>

  • 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" | "attached" | "created" | "destroyed" | "hidden" | "hotkey" | "shown" | "target-changed" | "found-in-page" | "certificate-error"

    Parameters

    Returns Promise<OpenFin.View>

  • Experimental

    Sets the bounds (top, left, width, height) of the view relative to its window.

    Returns

    Tutorial

    View.setBounds

    Parameters

    Returns Promise<void>

  • Parameters

    • level: number

    Returns Promise<void>

  • Experimental

    Shows the current view if it is currently hidden.

    Returns

    Tutorial

    View.show

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • action: string

    Returns Promise<void>

  • Returns Promise<void>

  • Experimental

    Triggers the before-unload handler for the View, if one is set. Returns true if the handler is trying to prevent the View from unloading, and false if it isn't. Only enabled when setting enableBeforeUnload: true in your View options. If this option is not enabled it will always return false.

    Returns

    Tutorial

    View.triggerBeforeUnload

    Returns Promise<boolean>

  • Experimental

    Updates the view's options.

    Returns

    Tutorial

    View.updateOptions

    Parameters

    Returns Promise<void>

Generated using TypeDoc