()
| 150 | } |
| 151 | |
| 152 | function onReady() { |
| 153 | snippets.addEventListener('change', updateSnippetAndRun); |
| 154 | document |
| 155 | .getElementById('run-btn') |
| 156 | .addEventListener('click', runCodeFromTextarea); |
| 157 | // Run once for demo |
| 158 | runCodeFromTextarea(); |
| 159 | |
| 160 | terminalVM = rp.vmStore.init('term_vm'); |
| 161 | terminalVM.setStdout((data) => readline.print(data)); |
| 162 | readPrompts().catch((err) => console.error(err)); |
| 163 | |
| 164 | // so that the test knows that we're ready |
| 165 | const readyElement = document.createElement('div'); |
| 166 | readyElement.id = 'rp_loaded'; |
| 167 | document.head.appendChild(readyElement); |
| 168 | } |
no test coverage detected