Files
2026-07-27 17:21:02 +01:00

27 lines
606 B
JavaScript

class ConsoleApi {
constructor(mem) {
this.mem = mem;
}
trace = (str_ptr, str_len) => {
console.trace(this.mem.loadString(str_ptr, str_len));
};
debug = (str_ptr, str_len) => {
console.debug(this.mem.loadString(str_ptr, str_len));
};
info = (str_ptr, str_len) => {
console.info(this.mem.loadString(str_ptr, str_len));
};
warn = function(str_ptr, str_len) {
console.warn(this.mem.loadString(str_ptr, str_len));
};
error = (str_ptr, str_len) => {
console.error(this.mem.loadString(str_ptr, str_len));
};
}