about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/html/dom.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 4bc76a0a..600639ee 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2002,6 +2002,23 @@ proc log*(console: console, ss: varargs[string]) {.jsfunc.} =
   console.err.write('\n')
   console.err.flush()
 
+proc clear*(console: console) {.jsfunc.} =
+  # Do nothing. By design, we do not allow buffers to clear the console.
+  discard
+
+# For now, these are the same as log().
+proc debug*(console: console, ss: varargs[string]) {.jsfunc.} =
+  console.log(ss)
+
+proc error*(console: console, ss: varargs[string]) {.jsfunc.} =
+  console.log(ss)
+
+proc info*(console: console, ss: varargs[string]) {.jsfunc.} =
+  console.log(ss)
+
+proc warn*(console: console, ss: varargs[string]) {.jsfunc.} =
+  console.log(ss)
+
 proc execute*(element: HTMLScriptElement) =
   let document = element.document
   if document != element.preparationTimeDocument: