My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

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

Revert "Force full page load when x-ocaml universe changes during SPA nav"

This reverts commit 93472893dd565aaaf6170682af6c6ac39fd0c255.

-10
-10
odoc-jons-plugins/src/odoc_jons_plugins_js.ml
··· 181 181 var html = await response.text(); 182 182 var doc = parser.parseFromString(html, 'text/html'); 183 183 184 - // If the target page has a different x-ocaml universe, the worker 185 - // must be restarted. x-ocaml initializes once at script load, so 186 - // we fall back to a full page load to get a fresh environment. 187 - var curUniverse = (document.querySelector('meta[name="x-ocaml-universe"]') || {}).content || ''; 188 - var newUniverse = (doc.querySelector('meta[name="x-ocaml-universe"]') || {}).content || ''; 189 - if (curUniverse !== newUniverse) { 190 - window.location.href = ROOT_URL + url; 191 - return; 192 - } 193 - 194 184 // Swap content — use DOM node adoption instead of innerHTML so that 195 185 // custom elements (e.g. <x-ocaml>) get properly connected and their 196 186 // connectedCallback fires.