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

    Interface ObservableWatchOptions

    Options for initObservablePlots.

    interface ObservableWatchOptions {
        root?: ParentNode;
        plot?: ObservablePlotOptions;
        onBind?: (result: ObservablePlotResult) => void;
        onError?: (error: unknown, element: Element) => void;
    }
    Index

    Properties

    root?: ParentNode

    Root to watch for plots. Defaults to document.body.

    Quarto puts every OJS cell's output in div[id^="ojs-cell-"], but those divs are filled asynchronously and re-filled whenever a reactive input changes, so the observer watches a stable ancestor rather than the cells.

    Options applied to every plot the observer binds.

    onBind?: (result: ObservablePlotResult) => void

    Called after each successful bind. Useful for logging, or for post-processing a schema the adapter inferred.

    onError?: (error: unknown, element: Element) => void

    Called when a plot fails to convert, instead of the console warning.