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

    Interface UpdatableViewOptions

    View options that can be updated after creation.

    interface UpdatableViewOptions {
        api?: ApiSettings;
        appLogLevel?: AppLogLevel;
        autoResize?: AutoResizeOptions;
        backgroundColor?: string;
        chromiumPolicies?: ChromiumPolicies;
        contentNavigation?: NavigationRules;
        contentRedirect?: NavigationRules;
        contextMenu?: boolean;
        contextMenuOptions?: ContextMenuOptions;
        contextMenuSettings?: ContextMenuSettings;
        customContext?: any;
        customData?: any;
        detachOnClose?: boolean;
        icon?: string;
        interop?: InteropConfig;
        isClosable?: boolean;
        preventDragOut?: boolean;
        throttling?: ViewThrottling;
    }
    Index

    Configurations for API injection.

    appLogLevel?: AppLogLevel

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

    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.

    chromiumPolicies?: ChromiumPolicies

    Control behavior for Chromium policies

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

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

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

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

    false
    
    throttling?: ViewThrottling

    View throttling state.

    • enabled: Both background throttling and scheduler throttling are true. It's fully throttled.
    • scheduler-disabled: background throttling is true, but scheduler throttling is disabled.
    'enabled'