MCPcopy Index your code
hub / github.com/pyscript/pyscript / makeEditorDiv

Function makeEditorDiv

core/src/plugins/py-editor.js:220–236  ·  view source on GitHub ↗
(handler, type)

Source from the content-addressed store, hash-verified

218};
219
220const makeEditorDiv = (handler, type) => {
221 const editorDiv = document.createElement("div");
222 editorDiv.className = `${type}-editor-input`;
223 editorDiv.setAttribute("aria-label", "Python Script Area");
224
225 const runButton = makeRunButton(handler, type);
226 const editorShadowContainer = document.createElement("div");
227
228 // avoid outer elements intercepting key events (reveal as example)
229 editorShadowContainer.addEventListener("keydown", (event) => {
230 event.stopPropagation();
231 });
232
233 editorDiv.append(runButton, editorShadowContainer);
234
235 return editorDiv;
236};
237
238const makeOutDiv = (type) => {
239 const outDiv = document.createElement("div");

Callers 1

makeBoxDivFunction · 0.85

Calls 2

makeRunButtonFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected