From bbde6ca8518d95b818d8231772218964da2fff74 Mon Sep 17 00:00:00 2001 From: Juan Pablo Yamamoto Date: Fri, 20 Oct 2023 23:20:10 -0600 Subject: [PATCH] load async --- alonzo/index.html | 4 ++-- alonzo/main.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/alonzo/index.html b/alonzo/index.html index 48f5067..2648342 100644 --- a/alonzo/index.html +++ b/alonzo/index.html @@ -149,7 +149,7 @@

Herramientas:

- - + + diff --git a/alonzo/main.js b/alonzo/main.js index 9fad309..b2c736a 100644 --- a/alonzo/main.js +++ b/alonzo/main.js @@ -180,12 +180,20 @@ window.addEventListener('load', () => { const outputArea = outputSection.getElementsByTagName('code')[0]; const exampleButton = document.getElementById('example'); - const INTERPRETERS = { + let INTERPRETERS = { 'untyped': window.untyped, 'typed': window.typed, 'systemf': window.systemF, }; + setTimeout(function() { + INTERPRETERS = { + 'untyped': window.untyped, + 'typed': window.typed, + 'systemf': window.systemF, + }; + }, 1000); + document.getElementById('reset').addEventListener('click', () => { flask.updateCode(''); });