XSLT examlpe

This commit is contained in:
Simon Martens
2024-12-28 08:15:55 +01:00
parent 60649ca2f4
commit 58df7cc1cb
25 changed files with 3049 additions and 48 deletions

View File

@@ -0,0 +1,11 @@
htmx.defineExtension('path-params', {
onEvent: function(name, evt) {
if (name === 'htmx:configRequest') {
evt.detail.path = evt.detail.path.replace(/{([^}]+)}/g, function(_, param) {
var val = evt.detail.parameters[param]
delete evt.detail.parameters[param]
return val === undefined ? '{' + param + '}' : encodeURIComponent(val)
})
}
}
})