MAIDR Documentation - v4.4.0
    Preparing search index...

    Variable initQuartoObservableConst

    initQuartoObservable: (options?: ObservableWatchOptions) => () => void = initObservablePlots

    Type Declaration

      • (options?: ObservableWatchOptions): () => void
      • Watches a document for Observable Plot charts and binds each one.

        This is what makes a Quarto document work without touching its cells. It binds everything already on the page, then keeps watching: OJS fills its cells asynchronously and re-fills them whenever a reactive input changes, so charts arrive after load and arrive again on every interaction.

        Safe to call more than once — a chart already bound is skipped.

        Parameters

        Returns () => void

        A function that stops watching. Charts already bound stay bound.

        <script src="https://cdn.jsdelivr.net/npm/maidr/dist/maidr.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/maidr/dist/observable.js"></script>
        <!-- every {ojs} cell that draws with Plot is now navigable -->

    Renamed to initObservablePlots. The watcher never had anything to do with Quarto — it binds Plot charts wherever they appear, and the Quarto name said otherwise to everyone using it on an ordinary page. Kept so the released name goes on working; it will be removed in the next major.