this repo has no description
0
fork

Configure Feed

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

Add odoc-spa-loaded event to docsite shell and scrollycode

- docsite shell: dispatch odoc-spa-loaded after SPA script loading,
matching the jon-shell implementation
- scrollycode: listen for odoc-spa-loaded to reinit after SPA nav

Plugins checked:
- mermaid: uses odoc-spa-loaded ✓
- dot: uses odoc-spa-loaded ✓
- msc: uses odoc-spa-loaded ✓
- scrollycode: uses odoc-spa-loaded ✓ (updated)
- admonition: CSS only, no JS needed ✓
- rfc: CSS only, no JS needed ✓
- interactive (x-ocaml): own universe reinit mechanism ✓

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+7 -5
+7 -5
src/scrollycode_extension.ml
··· 548 548 } 549 549 550 550 // Run now if DOM is ready, otherwise wait. 551 + function observe() { 552 + new MutationObserver(function() { initAll(); }) 553 + .observe(document.body, { childList: true, subtree: true }); 554 + document.addEventListener('odoc-spa-loaded', function() { initAll(); }); 555 + } 551 556 if (document.readyState === 'loading') { 552 557 document.addEventListener('DOMContentLoaded', function() { 553 558 initAll(); 554 - // Watch for new containers added by SPA navigation. 555 - new MutationObserver(function() { initAll(); }) 556 - .observe(document.body, { childList: true, subtree: true }); 559 + observe(); 557 560 }); 558 561 } else { 559 562 initAll(); 560 - new MutationObserver(function() { initAll(); }) 561 - .observe(document.body, { childList: true, subtree: true }); 563 + observe(); 562 564 } 563 565 })(); 564 566 |}