@nospamproxy/core
    Preparing search index...

    A generic overlay that uses a custom position on the screen and captures the keyboard focus when visible.

    Note, that the overlay content element is moved to the document body when attached, so that absolute positioning works correctly. When testing, use getDetachedContainerForAnchor to get the content element:

    import { getDetachedContainerForAnchor } from "@nospamproxy/core";

    const overlay: HTMLElement = ...;
    const content = getDetachedContainerForAnchor(overlay);
    <generic-overlay visible-class.bind="styles.visible" invisible-class.bind="styles.invisible">
    Hello World!
    </generic-overlay>
    .visible {
    }

    Implements

    • ICustomElementViewModel
    Index

    Constructors

    Properties

    entirelyInvisibleDelay: number = 500

    If a transition is used when hiding this overlay, this should be set to the number of milliseconds until the overlay is fully invisible.

    foreignEvent: ((overlay: GenericOverlay, event: Event) => void) | null = null
    invisibleClass: string = ''
    stateChanged: ((overlay: GenericOverlay) => void) | null = null
    visibleClass: string = ''

    Accessors

    • get isVisible(): boolean

      Check if the overlay is visible.

      Returns boolean

    Methods

    • Returns void

    • Parameters

      • _initiator: IHydratedController
      • _parent: IHydratedController | null

      Returns void

    • Hide the overlay.

      Returns void

    • Show the overlay.

      Returns void

    • Convenience function for showing or hiding the overlay.

      Parameters

      • show: boolean = ...

      Returns void

    • Returns void