2023-07-02 06:42:43 +00:00
|
|
|
import * as kernel from "@lumeweb/libkernel";
|
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);
|
|
|
|
}
|
|
|
|
});
|