AboutSupportDeveloper GuideVersion 47.154.100.2
OpenFin JavaScript API
    Preparing search index...

    Interface ConstViewOptions

    View options that cannot be updated after creation.

    interface ConstViewOptions {
        accelerator?: Partial<Accelerator>;
        api: ApiSettings;
        autoplayPolicy: AutoplayPolicyOptions;
        bounds: Bounds;
        closeBehavior: "hide" | "detach" | "destroy";
        contentCreation: ContentCreationOptions;
        customRequestHeaders: CustomRequestHeaders[];
        disableAppRegion: boolean;
        downloadShelf: { enabled: boolean };
        enableBeforeUnload: boolean;
        excludeOptions: ExcludeOptions;
        experimental: any;
        fdc3InteropApi?: string;
        hotkeys: Hotkey[];
        ignoreChildFrameName?: boolean;
        manifestUrl: string;
        name: string;
        permissions: Partial<Permissions>;
        preloadScripts: PreloadScript[];
        processAffinity: string;
        target: Identity;
        title: string;
        titlePriority?: ViewTitlePriority;
        url: string;
        zoomLevel: number;
    }
    Index
    accelerator?: Partial<Accelerator>

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

    Configurations for API injection.

    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.

    bounds: Bounds

    Initial bounds given relative to the window.

    closeBehavior: "hide" | "detach" | "destroy"

    Platforms Only. Determines what happens when a view is closed in a platform window. Supersedes the deprecated detachOnClose. If not set, detaults to destroy if detachOnClose is false (default), or detach if detachOnClose is true. While this option is not updateable, it may change at runtime if detachOnClose is updated. 'hide' hides the view on the platform window that closed it. 'detach' behaves like 'detachOnClose': true. It attaches the closed view to the platform provider. 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.

    contentCreation: ContentCreationOptions

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

    customRequestHeaders: CustomRequestHeaders[]

    Custom headers for requests sent by the view.

    disableAppRegion: boolean

    When set to true, will prevent setting the -webkit-app-region and app-region css properties on the view. These css properties are used to enable dragging of a frameless window.

    false
    
    downloadShelf: { enabled: boolean }

    Controls interaction of the view with its parent window's download shelf.

    Type Declaration

    • enabled: boolean

      Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.

      If enabled: true, downloads from this view will cause the download shelf to display on the parent window even if that parent window's DownloadShelfOptions specify enabled: false.

    enableBeforeUnload: boolean

    When set to true, any beforeunload handler set on Views will fire.

    false
    
    excludeOptions: ExcludeOptions

    Control which options to ignore when creating a Platform View.

    experimental: any
    fdc3InteropApi?: string
    hotkeys: Hotkey[]

    Defines the hotkeys that will be emitted as a hotkey event on the view. For usage example, see hotkeys Example. 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.

    ignoreChildFrameName?: boolean

    Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name. When true, each call generates a new unique target name, ensuring a new window is always created. When false, the target name passed to window.open is respected.

    manifestUrl: string

    Platforms Only. Url to a manifest that contains View Options. Properties other than manifestUrl can still be used but the properties in the manifest will take precedence if there is any collision.

    name: string

    The name of the view.

    permissions: Partial<Permissions>

    API permissions for code running in the view.

    Superseded by DomainSettings.default.api.permissions - if present, this setting will be ignored. It is recommended for users to migrate to a domain-based security model, since it is more natural to assign trust to the source of the page content than to the context rendering it.

    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.

    target: Identity

    The identity of the window this view should be attached to.

    title: string

    Defaults to name.

    titlePriority?: ViewTitlePriority

    Controls order of title precedence: 'options': viewOptions.title (componentState), document.title, viewOptions.url 'document': document.title, viewOptions.title(componentState), viewOptions.url (default behavior)

    url: string

    The URL of the window

    "about:blank"
    
    zoomLevel: number