Theia API Documentation v1.76.0
    Preparing search index...
    Index

    Constructors

    Properties

    _hoverHost: undefined | HTMLElement
    disposeOnHide: DisposableCollection = ...
    hoverTarget: undefined | HTMLElement
    lastHidHover: number = ...
    markdownRenderer: MarkdownRenderer

    Inject CoreMarkdownRenderer rather than the MarkdownRenderer symbol, which is rebound by Monaco to a renderer that strips code block content.

    openerService: OpenerService
    pendingTimeout: undefined | Disposable
    preferences: PreferenceService
    renderSequence: number = 0

    Identifies the latest render so that superseded renders can detect they are stale.

    hostClassName: string = 'theia-hover'
    styleSheetId: string = 'theia-hover-style'

    Accessors

    • get hoverHost(): HTMLElement

      The host of the current hover, which may live in a secondary window's document. Resolving against the main document here instead would silently replace the host whenever the current hover lives in another document, detaching the dismissal listeners and unRenderHover from the host that is actually rendered.

      Returns HTMLElement

    Methods

    • Returns the host element to render hovers into for the given document, creating it if the current one belongs to a different document. A host is always created in the document it is shown in: adopting a host into another document would let it outlive its window, and touching it after that window was closed breaks (and in Electron crashes) the application.

      Parameters

      • targetDocument: Document

      Returns HTMLElement

    • Waits for an animation frame in the window hosting the given target element, which may be a secondary window whose rendering is independent of the main window's.

      Parameters

      • target: HTMLElement

      Returns Promise<void>

    • Listen for mouse click (mousedown) events and handle them based on hover interactivity. For non-interactive hovers, any mousedown cancels the hover immediately. For interactive hovers, the hover remains visible to allow interaction with its elements.

      Parameters

      Returns void

    • Cancels the hover when the window hosting the target element goes away, e.g. when the secondary window containing the target is closed: neither the hover host nor any listeners may outlive the document they belong to.

      Parameters

      • target: HTMLElement

      Returns void