Changeset 9b3e12c in Klonkt
- Timestamp:
- 06/19/2026 07:28:25 AM (3 months ago)
- Branches:
- main
- Children:
- 70679063
- Parents:
- e9cfa3c
- File:
-
- 1 edited
-
src/views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/shell.ejs
re9cfa3c r9b3e12c 503 503 // Doe daarom de adresbalk-update hier zelf zodra htmx swapt. Programmatische 504 504 // htmx.ajax-calls (boost/popstate) hebben geen elt met hx-push-url → geen dubbel. 505 document.body.addEventListener('htmx:before Swap', function (evt) {505 document.body.addEventListener('htmx:beforeRequest', function (evt) { 506 506 try { 507 var elt = evt.detail && evt.detail.elt; 508 if (!elt || !elt.getAttribute) return; 509 var u = elt.getAttribute('hx-push-url'); 507 var elt = evt.detail && evt.detail.elt; // het TRIGGERENDE element (de link) 508 if (!elt || !elt.closest) return; 509 var node = elt.closest('[hx-push-url]'); 510 if (!node) return; 511 var u = node.getAttribute('hx-push-url'); 510 512 if (!u || u === 'false') return; 511 if (u !== lastPath) history.pushState({ b: 1 }, '', u);513 if (u !== (location.pathname + location.search)) history.pushState({ b: 1 }, '', u); 512 514 lastPath = u; 513 515 } catch (_) {}
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)