MCPcopy Index your code
hub / github.com/csev/py4e / updateLineBackground

Function updateLineBackground

tools/pythonauto/static/codemirrorepl/codemirror.js:779–789  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

777 }
778
779 function updateLineBackground(lineView) {
780 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
781 if (cls) cls += " CodeMirror-linebackground";
782 if (lineView.background) {
783 if (cls) lineView.background.className = cls;
784 else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
785 } else if (cls) {
786 var wrap = ensureLineWrapped(lineView);
787 lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
788 }
789 }
790
791 // Wrapper around buildLineContent which will reuse the structure
792 // in display.externalMeasured when possible.

Callers 1

updateLineClassesFunction · 0.85

Calls 4

ensureLineWrappedFunction · 0.85
eltFunction · 0.70
removeChildMethod · 0.45
insertBeforeMethod · 0.45

Tested by

no test coverage detected