Add: htmx debug extension

This commit is contained in:
Aroy-Art 2024-06-16 20:43:16 +02:00
parent aa7bb0b2b0
commit 787ba6d50f
Signed by: Aroy
GPG key ID: DB9689E9391DD156
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,11 @@
htmx.defineExtension('debug', {
onEvent: function (name, evt) {
if (console.debug) {
console.debug(name, evt);
} else if (console) {
console.log("DEBUG:", name, evt);
} else {
throw "NO CONSOLE SUPPORTED"
}
}
});