Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
The SPA shell now dispatches a 'odoc-spa-loaded' custom event on
document after all external scripts from the fetched page have
loaded and inline scripts have executed. Extensions listen for
this event instead of polling for CDN library availability.
This replaces the unreliable polling approach — the MutationObserver
fires before CDN scripts load, and no further mutations occur to
trigger re-rendering. The custom event fires at exactly the right
moment: after content is swapped AND all scripts are ready.
Updated mermaid, dot, and msc extensions to use the new event.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace Js_inline loader script with Js_url support file using
MutationObserver pattern. When new MSC diagram elements appear
(via SPA content swap), re-load the mscgenjs-inpage script which
scans and renders script[type="text/x-mscgen"] elements.
mscgenjs-inpage has no public API — it only scans on load — so
re-loading is the only way to trigger rendering for new elements.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>