Skip to content

Commit

Permalink
load async
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyamamoto committed Oct 21, 2023
1 parent b303afe commit bbde6ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions alonzo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h3>Herramientas:</h3>
</ul>
</section>

<script language="javascript" src="/interpreters.js" defer></script>
<script type="module" src="/main.js"></script>
<script language="javascript" src="/interpreters.js"></script>
<script type="module" src="/main.js" async defer></script>
</body>
</html>
10 changes: 9 additions & 1 deletion alonzo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
});
Expand Down

0 comments on commit bbde6ca

Please sign in to comment.