An object that handles links on a node.

interface ILinkHandler {
    handleLink(node: HTMLElement, path: string, id?: string): void;
    handlePath(
        node: HTMLElement,
        path: string,
        scope: "kernel" | "server",
        id?: string,
    ): void;
}

Methods

  • Add the link handler to the node.

    Parameters

    • node: HTMLElement

      the anchor node for which to handle the link.

    • path: string

      the path to open when the link is clicked.

    • Optionalid: string

      an optional element id to scroll to when the path is opened.

    Returns void

  • Add the path handler to the node.

    Parameters

    • node: HTMLElement

      the anchor node for which to handle the link.

    • path: string

      the path to open when the link is clicked.

    • scope: "kernel" | "server"

      the scope to which the path is bound.

    • Optionalid: string

      an optional element id to scroll to when the path is opened.

    Returns void