roadmap/js/router.9d4974281069e9ebb189...

1 line
358 B
JavaScript
Raw Normal View History

2022-09-07 19:37:39 +00:00
import{apply,navigate,prefetch,router,}from"https://unpkg.com/million@1.11.5/dist/router.mjs";export const attachSPARouting=(a,c)=>{window.Million={apply,navigate,prefetch,router};const b=()=>requestAnimationFrame(c);window.addEventListener("DOMContentLoaded",()=>{apply(b=>a(b)),a(),router(".singlePage"),b()}),window.addEventListener("million:navigate",b)}