BrainMinder/assets/static/js/htmx/ext/debug.js

12 lines
289 B
JavaScript
Raw Normal View History

2024-08-22 10:13:16 +02:00
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"
}
}
});