added two apps, and better implementation

This commit is contained in:
David Meincke
2022-03-22 18:20:26 +01:00
parent bb44e0e92d
commit 33b3f2e5cc
47 changed files with 486 additions and 151 deletions
+22
View File
@@ -0,0 +1,22 @@
import './app.less';
import bootHtml from './app.html';
import { watchConsole } from './injects/watch-console';
import { setOnErrorListener } from './injects/on-error';
import { createScript } from '../shared/create-script';
import { messageListener } from '../shared/message-listener';
import { postMessage, postResponseMessage } from '../shared/post-message';
document.body.innerHTML += bootHtml;
watchConsole((type, value) => {
postMessage(parent, type, value);
});
messageListener((type, value, id) => {
if (type == "script") {
createScript(value);
postResponseMessage(parent, id, value);
}
});
setOnErrorListener((type, value) => {
postMessage(parent, type, value);
});