11 lines
289 B
JavaScript
11 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"
|
|
}
|
|
}
|
|
});
|