Represents a panel created by extension.

interface ExtensionPanel {
    onHidden: WebExtEvent<() => void>;
    onSearch: WebExtEvent<(action: string, queryString?: string) => void>;
    onShown: WebExtEvent<(window: Window) => void>;
    createStatusBarButton?(
        iconPath: string,
        tooltipText: string,
        disabled: boolean,
    ): Button;
}
Index
onHidden: WebExtEvent<() => void>

Fired when the user switches away from the panel.

onSearch: WebExtEvent<(action: string, queryString?: string) => void>

Fired upon a search action (start of a new search, search result navigation, or search being canceled).

Type of search action being performed.

Query string (only for 'performSearch').

Unsupported on Firefox at this time.

onShown: WebExtEvent<(window: Window) => void>

Fired when the user switches to the panel.

The JavaScript window object of panel's page.

  • Appends a button to the status bar of the panel.

    Parameters

    • iconPath: string

      Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used when the button is inactive; the right icon is displayed when the button is pressed.

    • tooltipText: string

      Text shown as a tooltip when user hovers the mouse over the button.

    • disabled: boolean

      Whether the button is disabled.

    Returns Button

    Unsupported on Firefox at this time.