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.
A function that stops watching. Charts already bound stay bound.
Example
<scriptsrc="https://cdn.jsdelivr.net/npm/maidr/dist/maidr.js"></script> <scriptsrc="https://cdn.jsdelivr.net/npm/maidr/dist/observable.js"></script> <!-- every {ojs} cell that draws with Plot is now navigable -->
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.