OpenFin Workspace Platform API
    Preparing search index...

    Interface BrowserViewState

    interface BrowserViewState {
        accelerator?: Partial<Accelerator>;
        api?: ApiSettings;
        appLogLevel?: AppLogLevel;
        autoplayPolicy?: AutoplayPolicyOptions;
        autoResize?: AutoResizeOptions;
        backgroundColor?: string;
        bounds?: Bounds;
        chromiumPolicies?: ChromiumPolicies;
        closeBehavior?: "hide" | "detach" | "destroy";
        componentName: "view";
        contentCreation?: ContentCreationOptions;
        contentNavigation?: NavigationRules;
        contentRedirect?: NavigationRules;
        contextMenu?: boolean;
        contextMenuOptions?: ContextMenuOptions;
        contextMenuSettings?: ContextMenuSettings;
        customContext?: any;
        customData?: any;
        customRequestHeaders?: CustomRequestHeaders[];
        detachOnClose?: boolean;
        disableAppRegion?: boolean;
        downloadShelf?: { enabled: boolean };
        enableBeforeUnload?: boolean;
        excludeOptions?: ExcludeOptions;
        experimental?: any;
        fdc3InteropApi?: string;
        hotkeys?: Hotkey[];
        icon?: string;
        ignoreChildFrameName?: boolean;
        initialUrl: string;
        interop?: InteropConfig;
        isClosable?: boolean;
        manifestUrl?: string;
        minWidth?: number;
        name: string;
        permissions?: Partial<Permissions_2>;
        preloadScripts?: PreloadScript[];
        preventDragOut?: boolean;
        processAffinity?: string;
        target: Identity_4 | Identity_4 & { layoutName: string };
        throttling?: ViewThrottling;
        title?: string;
        titlePriority?: ViewTitlePriority;
        url: string;
        zoomLevel?: number;
    }

    Hierarchy

    • ViewState
      • BrowserViewState
    Index
    accelerator?: Partial<Accelerator>

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

    api?: ApiSettings

    Configurations for API injection.

    appLogLevel?: AppLogLevel

    Specifies the AppLogLevel for the specified View. See AppLogLevel for more information.

    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.

    autoResize?: AutoResizeOptions
    backgroundColor?: string

    The view’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 view’s (a) content area before its content is loaded as well as (b) newly exposed areas when growing a view. Setting this value to the anticipated content background color can help improve user experience. Default is white.

    bounds?: Bounds

    Initial bounds given relative to the window.

    chromiumPolicies?: ChromiumPolicies

    {@inheritDoc ChromiumPolicies}

    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.

    componentName: "view"
    contentCreation?: ContentCreationOptions

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

    contentNavigation?: NavigationRules

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

    contentRedirect?: NavigationRules
    contextMenu?: boolean

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

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

    true
    
    contextMenuOptions?: ContextMenuOptions

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

    contextMenuSettings?: ContextMenuSettings

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

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

    customContext?: any

    A field that the user can use to attach serializable data that will be saved when 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 Platform.setWindowContext and 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. For usage example, see MutableWindowOptions customContext Example.

    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 view.

    detachOnClose?: boolean

    Platforms Only. If true, will hide and detach the View from the window for later use instead of closing, allowing the state of the View to be saved and the View to be immediately shown in a new Layout.

    false
    
    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 MutableWindowOptions 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.

    icon?: string

    Per-view tab icon. Exception to showFavicons / defaultFaviconUrl.

    Distinct from Window icon (taskbar).

    • Omitted / '' / 'unset': inherit — if showFavicons, page favicon then defaultFaviconUrl, else hide
    • URL string: always show that URL, even when showFavicons is false. Load failure uses defaultFaviconUrl
    • 'hide': always hide, even when showFavicons is true

    On updateOptions, omitted keys are a no-op; set 'unset' to return to inherit.

    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.

    initialUrl: string
    interop?: InteropConfig
    isClosable?: boolean

    Platforms Only. If false, the view will be persistent and can't be closed through either UI or Platform.closeView. Note that the view will still be closed if the host window is closed or if the view isn't part of the new layout when running Layout.replace.

    true
    
    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.

    minWidth?: number
    name: string

    The name of the view.

    permissions?: Partial<Permissions_2>

    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.

    preventDragOut?: boolean

    Platforms Only. If true, the tab of the view can't be dragged out of its host window.

    false
    
    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_4 | Identity_4 & { layoutName: string }

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

    Type Declaration

    • Identity_4
    • Identity_4 & { layoutName: string }
      • layoutName: string

        The name of the layout in a given window.

    throttling?: ViewThrottling

    {@inheritDoc ViewThrottling}

    'enabled'
    
    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