A Message Sequence Charts extension for odoc
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add odoc-spa-loaded event for extension SPA support

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>

+1
+1
src/msc_extension.ml
··· 67 67 function observe() { 68 68 new MutationObserver(function() { renderAll(); }) 69 69 .observe(document.body, { childList: true, subtree: true }); 70 + document.addEventListener('odoc-spa-loaded', function() { renderAll(); }); 70 71 } 71 72 })(); 72 73 |} mscgen_js_url