Hexa Content Client Service (core)
Classes
HexaContentClient
Content-context HexaClient. Sends messages from the content script to the background.
import { HexaContentClient } from '@hexajs-dev/core';
class HexaContentClient { ... }
Methods
sendMessage()
Send a message and await a response. Content → background uses runtime.sendMessage. Background → content requires a tabId — use BackgroundHexaClient.sendToTab().
sendMessage<TPayload, TResponse>(target: `${namespace}:${api}`, payload?: TPayload): Promise<TResponse>