Added key detection
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user