Live-update preview on type
This commit is contained in:
parent
710106af8b
commit
63f40309c7
11
TODO
11
TODO
|
@ -1,9 +1,5 @@
|
||||||
- arithmatic
|
- finish event listener:
|
||||||
|
|
||||||
- path to event listener:
|
|
||||||
|
|
||||||
- rerender w/ a signal to branch into handler
|
|
||||||
- capture correct position information in script blocks
|
|
||||||
- card fields (vars maybe not needed yet?)
|
- card fields (vars maybe not needed yet?)
|
||||||
- set field command
|
- set field command
|
||||||
- buffer output/side-effects in VM
|
- buffer output/side-effects in VM
|
||||||
|
@ -11,6 +7,11 @@
|
||||||
- unit test
|
- unit test
|
||||||
- command
|
- command
|
||||||
- set field inline instead of separate data???
|
- set field inline instead of separate data???
|
||||||
|
- capture correct position information in script blocks
|
||||||
|
|
||||||
|
- arithmatic
|
||||||
|
|
||||||
|
- if blocks
|
||||||
|
|
||||||
- impl vars
|
- impl vars
|
||||||
|
|
||||||
|
|
17
src/3x5.ts
17
src/3x5.ts
|
@ -50,7 +50,9 @@ fieldInput.value = String.raw`
|
||||||
title "Hello, World!"
|
title "Hello, World!"
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|
||||||
const codeInput = document.createElement("textarea");
|
const codeInput = Object.assign(document.createElement("textarea"), {
|
||||||
|
oninput: render,
|
||||||
|
});
|
||||||
Object.assign(codeInput.style, TEXTAREA_STYLE, { height: "20em" });
|
Object.assign(codeInput.style, TEXTAREA_STYLE, { height: "20em" });
|
||||||
codeInput.value = String.raw`
|
codeInput.value = String.raw`
|
||||||
h1 [get title]
|
h1 [get title]
|
||||||
|
@ -99,10 +101,6 @@ para {
|
||||||
}
|
}
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|
||||||
const rerender = Object.assign(document.createElement("button"), {
|
|
||||||
onclick: () => render(),
|
|
||||||
textContent: "Render",
|
|
||||||
});
|
|
||||||
const state = document.createElement("pre");
|
const state = document.createElement("pre");
|
||||||
const display = document.createElement("blockquote");
|
const display = document.createElement("blockquote");
|
||||||
const debugDisplay = document.createElement("pre");
|
const debugDisplay = document.createElement("pre");
|
||||||
|
@ -164,14 +162,7 @@ function triggerEvent(handlerPos: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
render();
|
render();
|
||||||
document.body.append(
|
document.body.append(fieldInput, codeInput, display, state, debugDisplay);
|
||||||
fieldInput,
|
|
||||||
codeInput,
|
|
||||||
rerender,
|
|
||||||
display,
|
|
||||||
state,
|
|
||||||
debugDisplay
|
|
||||||
);
|
|
||||||
|
|
||||||
RegisterJumpHere(codeInput);
|
RegisterJumpHere(codeInput);
|
||||||
RegisterButtonOnClick(triggerEvent);
|
RegisterButtonOnClick(triggerEvent);
|
||||||
|
|
Loading…
Reference in New Issue