Message
listener
MessageType
NonTabMessageType
TabMessageType
addListener
attributeCaller
message
messageActiveTab
messageAllTabs
messageOwnTab
messageTab
setupListener
listener: (
    message: Message,
    sender?: any,
    sendResponse?: any,
) => void | Promise<any>

Type Declaration

    • (message: Message, sender?: any, sendResponse?: any): void | Promise<any>
    • Parameters

      • message: Message
      • Optionalsender: any
      • OptionalsendResponse: any

      Returns void | Promise<any>

NonTabMessageType:
    | "browser_action_background"
    | "owntab_background"
    | "excmd_background"
    | "controller_background"
    | "browser_proxy_background"
    | "download_background"
    | "performance_background"
TabMessageType:
    | "editorfn_content"
    | "excmd_content"
    | "controller_content"
    | "commandline_content"
    | "finding_content"
    | "omniscient_content"
    | "commandline_cmd"
    | "commandline_frame"
    | "state"
    | "lock"
    | "alive"
    | "history_state"
    | "tab_changes"
    | "stop_buffering_page_keys"
    | "commandline_frame_ready_to_receive_messages"
  • Parameters

    • obj: any

    Returns (message: Message, sender: any, sendResponse: any) => Promise<never>

  • Send a message to non-content scripts

    Type Parameters

    • Type extends
          | "config_background"
          | "controller_background"
          | "browser_proxy_background"
          | "browser_action_background"
          | "excmd_background"
          | "performance_background"
          | "download_background"
          | "omniscient_background"
    • Command extends string | number | symbol
    • Handler extends AnyHandler

    Parameters

    Returns Promise<any>

  • Message the active tab of the currentWindow

    Parameters

    Returns Promise<any>

  • Parameters

    • tabId: any
    • type: TabMessageType
    • Optionalcommand: any
    • Optionalargs: any

    Returns Promise<any>