AboutSupportDeveloper GuideVersion 20.0.5
  • API function to register a Dock provider.

    Parameters

    Returns Promise<DockProviderRegistration>

    A promise that resolves with a DockProviderRegistration object once the Dock provider is successfully registered. This contains the client API version, Workspace Version and a function to update the Dock provider configuration.

    Remarks

    A Workspace Platform must be initialized.

    Throws

    An error if the Workspace Platform is not initialized.

    Throws

    An error if a Dock provider for this Workspace Platform is already registered.

    Throws

    An error if the Dock provider configuration contains buttons with duplicate ids. If no ids are specified, the buttons will be assigned ids automatically.

    Example

    Register a Dock provider with a single button.

    import { Dock, type DockProvider } from '@openfin/workspace';

    const provider: DockProvider = {
    id: 'provider-id',
    title: 'Sample Dock',
    icon: 'https://www.openfin.co/favicon-32x32.png',
    buttons: [
    {
    tooltip: 'Sample Button 1',
    iconUrl: 'https://www.openfin.co/favicon-32x32.png',
    action: {
    id: 'sampleButton1'
    }
    }
    ]
    };

    await Dock.register(provider)

    await Dock.show()