API function to register a Home provider.
A Workspace Platform must be initialized.
An error if the Workspace Platform is not initialized.
An error if a Home provider with the same id is already registered.
id
import { Home, type HomeProvider } from '@openfin/workspace';const provider: HomeProvider = { title: "My Home Provider" inputPlaceholder: "Search with My Home Provider", icon: "https://www.openfin.co/favicon-32x32.png", listTitle: "My Home Provider Results", logoUrl: "https://www.openfin.co/favicon-32x32.png", id: "my-home-provider", onUserInput: (req, res) => { console.log(req.query); return { results: [], context: { filters: [] } } }, dispatchFocusEvents: true,};await Home.register(provider)await Home.show() Copy
import { Home, type HomeProvider } from '@openfin/workspace';const provider: HomeProvider = { title: "My Home Provider" inputPlaceholder: "Search with My Home Provider", icon: "https://www.openfin.co/favicon-32x32.png", listTitle: "My Home Provider Results", logoUrl: "https://www.openfin.co/favicon-32x32.png", id: "my-home-provider", onUserInput: (req, res) => { console.log(req.query); return { results: [], context: { filters: [] } } }, dispatchFocusEvents: true,};await Home.register(provider)await Home.show()
The Home provider to register.
A promise that resolves with a HomeRegistration object once the Dock provider is successfully registered. This contains the client API version, Workspace Version and a function to set the search query.
HomeRegistration
API function to register a Home provider.
Remarks
A Workspace Platform must be initialized.
Throws
An error if the Workspace Platform is not initialized.
Throws
An error if a Home provider with the same
idis already registered.Example: **Register a Basic Home provider**