added html and css editors
This commit is contained in:
@@ -2,7 +2,7 @@ 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 { createCss, createHtml, createScript } from '../shared/create-script';
|
||||
import { messageListener } from '../shared/message-listener';
|
||||
import { postMessage, postResponseMessage } from '../shared/post-message';
|
||||
import { RenderCanvas } from './elements/render-canvas/render-canvas';
|
||||
@@ -17,10 +17,16 @@ watchConsole((type, value) => {
|
||||
postMessage(parent, type, value);
|
||||
});
|
||||
messageListener((type, value, id) => {
|
||||
if (type == "script") {
|
||||
if (type == "javascript") {
|
||||
createScript(value);
|
||||
postResponseMessage(parent, id, value);
|
||||
}
|
||||
else if (type == "html") {
|
||||
createHtml(value);
|
||||
}
|
||||
else if (type == "css") {
|
||||
createCss(value);
|
||||
}
|
||||
});
|
||||
setOnErrorListener((type, value) => {
|
||||
postMessage(parent, type, value);
|
||||
|
||||
Reference in New Issue
Block a user