Split the output so I can have a tree.

This commit is contained in:
Tom Alexander 2023-08-18 17:40:19 -04:00
parent 4fb203c1db
commit 27a2bea705
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,4 @@
<!doctype html>
<html> <html>
<head> <head>
<link rel="stylesheet" href="reset.css"> <link rel="stylesheet" href="reset.css">
@ -8,6 +9,13 @@
<h2>Input org-mode source:</h2> <h2>Input org-mode source:</h2>
<textarea id="org-input" rows="24" cols="80"></textarea> <textarea id="org-input" rows="24" cols="80"></textarea>
<hr/> <hr/>
<div id="parse-output" class="code_block" style="counter-set: code_line_number 0;"></div> <div class="output_container">
<div>
<div id="parse-output" class="code_block" style="counter-set: code_line_number 0;"></div>
</div>
<div>
tree goes here
</div>
</div>
</body> </body>
</html> </html>

View File

@ -43,7 +43,13 @@ inputElement.addEventListener("input", async () => {
}); });
inFlightRequest = newRequest; inFlightRequest = newRequest;
let response = await inFlightRequest.ready; let response = null;
try {
response = await inFlightRequest.ready;
}
catch (err) {
if (err.name === "AbortError") return;
}
renderParseResponse(await response.json()); renderParseResponse(await response.json());
}); });

View File

@ -53,3 +53,12 @@ h7 {
.code_block > code.highlighted::before { .code_block > code.highlighted::before {
background: #307351ff; background: #307351ff;
} }
.output_container {
display: flex;
flex-direction: row;
}
.output_container > * {
flex: 1 0;
}