summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/new-program-web-editor.folk8
-rw-r--r--virtual-programs/web-editor.folk9
2 files changed, 10 insertions, 7 deletions
diff --git a/virtual-programs/new-program-web-editor.folk b/virtual-programs/new-program-web-editor.folk
index a7c176cc..f972cfc7 100644
--- a/virtual-programs/new-program-web-editor.folk
+++ b/virtual-programs/new-program-web-editor.folk
@@ -152,12 +152,14 @@ Wish the web server handles route "/new" with handler {
Assert web claims {${program}} has program code {${code}}
if {$::isLaptop} { Step }
`);
- setTimeout(() => {
- send(`
+ [500, 1000, 3000].forEach(timeout => {
+ setTimeout(() => {
+ send(`
set errors [Statements::findMatches [list {${program}} has error /err/ with info /errorInfo/]]
::websocket::send $chan text [join [list "Error:" {*}[lmap e $errors {dict get $e errorInfo}]] "\n"]
`);
- }, 500);
+ }, timeout);
+ });
}
let jobid;
function handlePrint() {
diff --git a/virtual-programs/web-editor.folk b/virtual-programs/web-editor.folk
index 245b6043..fb899560 100644
--- a/virtual-programs/web-editor.folk
+++ b/virtual-programs/web-editor.folk
@@ -96,13 +96,14 @@ Wish the web server handles route {/page/(.*)$} with handler {
send(`EditVirtualProgram file_name {${code}}`)
}
-
- setTimeout(() => {
- send(`
+ [500, 1000, 3000].forEach(timeout => {
+ setTimeout(() => {
+ send(`
set errors [Statements::findMatches [list program_id has error /err/ with info /errorInfo/]]
::websocket::send $chan text [join [list "Error:" {*}[lmap e $errors {dict get $e errorInfo}]] "\n"]
`);
- }, 500);
+ }, 500);
+ });
}
let jobid;