MCPcopy Index your code
hub / github.com/KilledByAPixel/LittleJS / codeInput

Function codeInput

examples/shorts.js:345–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343// setting code
344
345function codeInput()
346{
347 if (!checkboxLiveEdit.checked)
348 return;
349
350 // debounce input - get content from code mirror if available, otherwise from textarea
351 clearTimeout(inputTimeout);
352 const code = codeMirror ? codeMirror.getValue() : textareaCode.value;
353 inputTimeout = setTimeout(()=> setCode(code), 500);
354}
355
356function restartCode()
357{

Callers

nothing calls this directly

Calls 2

setCodeFunction · 0.85
getValueMethod · 0.80

Tested by

no test coverage detected