MAIDR JavaScript API
    Preparing search index...

    Class HostGuardService

    Keeps the shortcuts of the page off one chart while it has the focus.

    Built with the chart's controller, so it exists exactly while a reader is in the chart. It installs the page-level guards again, for a host built after load, guards the cards around this chart, and listens for the few keys no host asks about first.

    Like FrameFocusService, it writes to the host page, which rules/service.md otherwise reserves for services that own their output. The rule's remedy -- fire an event and let a ViewModel render the result -- cannot apply: every object written to belongs to the page around the chart, which no ViewModel renders. Wrapping the page's own handlers is the whole operation.

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Guards the page's hosts, the cards around the chart, and starts listening.

      Parameters

      • plot: HTMLElement

        The chart's focusable plot element

      • isBound: (event: KeyboardEvent) => boolean

        Whether the reader's keymap, in the scope they are in, binds the key an event carries

      Returns HostGuardService

    Methods