summaryrefslogtreecommitdiffstatshomepage
path: root/www/test/0.1.1/src/ext/debug.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/test/0.1.1/src/ext/debug.js')
-rw-r--r--www/test/0.1.1/src/ext/debug.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/www/test/0.1.1/src/ext/debug.js b/www/test/0.1.1/src/ext/debug.js
new file mode 100644
index 00000000..861ee743
--- /dev/null
+++ b/www/test/0.1.1/src/ext/debug.js
@@ -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"
+ }
+ }
+});