(handler, type, output)
| 243 | }; |
| 244 | |
| 245 | const makeBoxDiv = (handler, type, output) => { |
| 246 | const boxDiv = document.createElement("div"); |
| 247 | boxDiv.className = `${type}-editor-box`; |
| 248 | |
| 249 | const editorDiv = makeEditorDiv(handler, type); |
| 250 | // allow specifying an existing output div by id |
| 251 | const outDiv = output ? document.getElementById(output) : makeOutDiv(type); |
| 252 | if (output) outDiv.classList.add(`${type}-editor-output`); |
| 253 | boxDiv.append(editorDiv, outDiv); |
| 254 | |
| 255 | return [boxDiv, outDiv, editorDiv.querySelector("button")]; |
| 256 | }; |
| 257 | |
| 258 | const init = async (script, type, interpreter) => { |
| 259 | const [ |
no test coverage detected