gespenst API - v0.1.0
    Preparing search index...

    Interface ILinkHandler

    A link handler for OSC 8 hyperlinks.

    interface ILinkHandler {
        allowNonHttpProtocols?: boolean;
        activate(event: MouseEvent, text: string, range: IBufferRange): void;
        hover?(event: MouseEvent, text: string, range: IBufferRange): void;
        leave?(event: MouseEvent, text: string, range: IBufferRange): void;
    }
    Index
    allowNonHttpProtocols?: boolean

    Whether to receive non-HTTP URLs from LinkProvider. When false, any usage of non-HTTP URLs will be ignored. Enabling this option without proper protection in activate function may cause security issues such as XSS.

    • Calls when the link is activated.

      Parameters

      • event: MouseEvent

        The mouse event triggering the callback.

      • text: string

        The text of the link.

      • range: IBufferRange

        The buffer range of the link.

      Returns void

    • Called when the mouse hovers the link. To use this to create a DOM-based hover tooltip, create the hover element within Terminal.element and add the xterm-hover class to it, that will cause mouse events to not fall through and activate other links.

      Parameters

      • event: MouseEvent

        The mouse event triggering the callback.

      • text: string

        The text of the link.

      • range: IBufferRange

        The buffer range of the link.

      Returns void

    • Called when the mouse leaves the link.

      Parameters

      • event: MouseEvent

        The mouse event triggering the callback.

      • text: string

        The text of the link.

      • range: IBufferRange

        The buffer range of the link.

      Returns void