MAIDR JavaScript API
    Preparing search index...

    What differs between the Embedding and the Extensions surface.

    Deliberately four members and no more: every one of them is something the two surfaces genuinely do differently, and anything they do alike belongs in the session rather than behind this seam.

    interface TableauHost {
        discover: () => DiscoveredSheet;
        mount: (wrapper: HTMLElement) => boolean;
        listen: (listeners: TableauHostListeners) => () => void;
        focusIsInView: () => boolean;
    }
    Index

    Properties

    discover: () => DiscoveredSheet

    The worksheets MAIDR should describe, and where each one sits.

    Called once before anything is mounted and again on every refresh, since a tab switch can change the answer. Must not throw; an empty list is "nothing to read", and the host is expected to have said why.

    mount: (wrapper: HTMLElement) => boolean

    Put the figure's wrapper on the page.

    Type Declaration

      • (wrapper: HTMLElement): boolean
      • Parameters

        • wrapper: HTMLElement

          The element the figure renders into.

        Returns boolean

        false when there is nowhere to put it, after warning why; the session then leaves the page exactly as it was.

    listen: (listeners: TableauHostListeners) => () => void

    Start delivering change and mark-selection notifications.

    Type Declaration

    focusIsInView: () => boolean

    Whether focus, having left the figure, went into the Tableau view — where a click may be selecting a mark the reader is about to follow — rather than somewhere that ends the session outright.