A sidebar created by the extension.

interface ExtensionSidebarPane {
    onHidden: WebExtEvent<() => void>;
    onShown: WebExtEvent<(window: Window) => void>;
    setExpression(expression: string, rootTitle?: string): Promise<void>;
    setHeight?(height: string): void;
    setObject(jsonObject: string, rootTitle?: string): Promise<void>;
    setPage(path: string): Promise<any>;
}
Index
onHidden: WebExtEvent<() => void>

Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar pane.

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

Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it.

The JavaScript window object of the sidebar page, if one was set with the setPage() method.

  • Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.

    Parameters

    • expression: string

      An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.

    • OptionalrootTitle: string

      An optional title for the root of the expression tree.

    Returns Promise<void>

  • Sets the height of the sidebar.

    Parameters

    • height: string

      A CSS-like size specification, such as '100px' or '12ex'.

    Returns void

    Unsupported on Firefox at this time.

  • Sets a JSON-compliant object to be displayed in the sidebar pane.

    Parameters

    • jsonObject: string

      An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).

    • OptionalrootTitle: string

      An optional title for the root of the expression tree.

    Returns Promise<void>

  • Sets an HTML page to be displayed in the sidebar pane.

    Parameters

    • path: string

      Relative path of an extension page to display within the sidebar.

    Returns Promise<any>