Rust library to generate static websites

fix(prefetch): Wait for DOMContentLoaded before prefetching in viewport

+1 -2
+1 -2
crates/maudit/js/prefetch/viewport.ts
··· 68 68 } 69 69 } 70 70 71 - // This is always in a type="module" script, so, it'll always run after the DOM is ready 72 - observeAnchors(); 71 + document.addEventListener("DOMContentLoaded", observeAnchors); 73 72 74 73 if (observeMutations) { 75 74 // Watch for dynamically added anchors