import std/streams import js/javascript type Console* = ref object err*: Stream clearFun: proc() showFun: proc() hideFun: proc() jsDestructor(Console) proc newConsole*(err: Stream; clearFun: proc() = nil; showFun: proc() = nil; hideFun: proc() = nil): Console = return Console( err: err, clearFun: clearFun, showFun: showFun, hideFun: hideFun ) proc log*(console: Console, ss: varargs[string]) {.jsfunc.} = for i in 0..