MCPcopy Index your code
hub / github.com/python/cpython / constructor

Method constructor

Doc/_static/profiling-sampling-visualization.js:226–243  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

224
225 class CodePanel {
226 constructor(source) {
227 this.source = source;
228 this.currentLine = null;
229
230 this.element = document.createElement("div");
231 this.element.id = "code-panel";
232
233 const title = document.createElement("div");
234 title.className = "code-panel-title";
235 title.textContent = "source code";
236 this.element.appendChild(title);
237
238 this.codeContainer = document.createElement("pre");
239 this.codeContainer.className = "code-container";
240 this.element.appendChild(this.codeContainer);
241
242 this._renderSource();
243 }
244
245 updateSource(source) {
246 this.source = source;

Callers

nothing calls this directly

Calls 3

_renderSourceMethod · 0.95
createElementMethod · 0.80
appendChildMethod · 0.45

Tested by

no test coverage detected