Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Browser

Index

Methods

  • listenTextSelection(callback: (value: string) => void): Promise<Cancellable>
  • Calls callback on any text selection event pushed from a browser running the Olive Helps extension.

    Parameters

    • callback: (value: string) => void

      The callback function called when text is selected in the browser.

        • (value: string): void
        • Parameters

          • value: string

          Returns void

    Returns Promise<Cancellable>

  • Calls the callback when an event is pushed from the provided UIElement in a browser running the olive Helps extension.

    Parameters

    • uiElementArguments: UIElementArguments

      { selector: string; address: string;} You can get an element's selector by inspecting the element -> right click the HTML tag -> copy -> copy selector. Address is the pre-defined website address to perform listenUIElement

    • callback: (details: UIElementDetails) => void

      The callback function called when a click event happens in a pre-defined website.

    Returns Promise<Cancellable>

  • Opens a tab in the browser running the Olive Helps extension.

    Parameters

    • address: string

      The address to navigate to in the tab.

    • Optional configuration: OpenConfiguration

      An optional configuration object that determines how the function behaves

    Returns Promise<number> | Promise<PageDetails>

    The tab ID of the new tab or a PageDetails object with both the id and source if the configuration object specifies to include the source

  • Opens a window in the browser running the Olive Helps extension.

    Parameters

    • address: string

      The address to navigate to in the new window.

    • Optional configuration: OpenConfiguration

      An optional configuration object that determines how the function behaves

    Returns Promise<number> | Promise<PageDetails>

    The window ID of the new window or a PageDetails object with both the id and source if the configuration object specifies to include the source

  • Retrieves the source for the specified url

    Parameters

    • address: string

      The address to retrieve the source for

    Returns Promise<PageDetails>

    An object containing the id of the tab or window and the html source

Generated using TypeDoc