Interface: ILink

A link within the terminal.

Hierarchy

  • ILink

Index

Properties

Methods

Properties

Optional decorations

decorations? : ILinkDecorations

Defined in xterm.d.ts:1155

What link decorations to show when hovering the link, this property is tracked and changes made after the link is provided will trigger changes. If not set, all decroations will be enabled.


range

range: IBufferRange

Defined in xterm.d.ts:1143

The buffer range of the link.


text

text: string

Defined in xterm.d.ts:1148

The text of the link.

Methods

activate

activate(event: MouseEvent, text: string): void

Defined in xterm.d.ts:1162

Calls when the link is activated.

Parameters:

Name Type Description
event MouseEvent The mouse event triggering the callback.
text string The text of the link.

Returns: void


Optional dispose

dispose(): void

Defined in xterm.d.ts:1183

Called when the link is released and no longer used by xterm.js.

Returns: void


Optional hover

hover(event: MouseEvent, text: string): void

Defined in xterm.d.ts:1171

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:

Name Type Description
event MouseEvent The mouse event triggering the callback.
text string The text of the link.

Returns: void


Optional leave

leave(event: MouseEvent, text: string): void

Defined in xterm.d.ts:1178

Called when the mouse leaves the link.

Parameters:

Name Type Description
event MouseEvent The mouse event triggering the callback.
text string The text of the link.

Returns: void