BrainMinder/assets/static/js/htmx/ext/debug.js
2024-08-22 10:13:16 +02:00

12 lines
289 B
JavaScript

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"
}
}
});