kernel-sandbox/src/tester.ts

15 lines
337 B
TypeScript
Raw Normal View History

2023-07-20 20:13:36 +00:00
import * as kernel from "@lumeweb/libkernel/kernel";
2022-06-30 20:12:43 +00:00
// @ts-ignore
2022-07-20 18:05:20 +00:00
window.kernel = kernel;
2023-03-31 19:42:33 +00:00
window.addEventListener("message", (event) => {
const data = event.data?.data;
if (event.data.method === "log") {
if (data?.isErr === false) {
console.log(data.message);
return;
}
console.error(data.message);
}
});