OpenFin Workspace API
    Preparing search index...

    Function register

    • API function to register a Home provider.

      Parameters

      Returns Promise<HomeRegistration>

      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.

      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.

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