MCPcopy Index your code
hub / github.com/RustPython/RustPython / onReady

Function onReady

wasm/demo/src/index.js:152–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152function 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}

Callers 1

index.jsFile · 0.70

Calls 9

runCodeFromTextareaFunction · 0.85
readPromptsFunction · 0.85
getElementByIdMethod · 0.80
catchMethod · 0.80
createElementMethod · 0.80
initMethod · 0.45
printMethod · 0.45
errorMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected