AboutSupportDeveloper GuideVersion 22.3.18

API function to register a Dock provider.

A Workspace Platform must be initialized.

An error if the Workspace Platform is not initialized.

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

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

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()
  • 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.