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

Function openBuffer

wasm/notebook/src/editor.js:70–80  ·  view source on GitHub ↗
(buffers, name, text, mode, buffersDropDown, buffersList)

Source from the content-addressed store, hash-verified

68}
69
70function openBuffer(buffers, name, text, mode, buffersDropDown, buffersList) {
71 buffers[name] = CodeMirror.Doc(text, mode);
72 let opt = document.createElement('option');
73 opt.appendChild(document.createTextNode(name));
74 buffersDropDown.appendChild(opt);
75
76 let li = document.createElement('li');
77 li.appendChild(document.createTextNode(name));
78 li.dataset.language = name;
79 buffersList.appendChild(li);
80}
81
82function newBuf(buffers, buffersDropDown, buffersList, primaryEditor) {
83 let name = prompt('Name your tab', '*scratch*');

Callers 2

index.jsFile · 0.90
newBufFunction · 0.85

Calls 3

createElementMethod · 0.80
createTextNodeMethod · 0.80
appendChildMethod · 0.45

Tested by

no test coverage detected