MCPcopy
hub / github.com/witheve/Eve / updateLineBackground

Function updateLineBackground

src/codemirror.js:920–930  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

918 }
919
920 function updateLineBackground(lineView) {
921 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
922 if (cls) cls += " CodeMirror-linebackground";
923 if (lineView.background) {
924 if (cls) lineView.background.className = cls;
925 else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
926 } else if (cls) {
927 var wrap = ensureLineWrapped(lineView);
928 lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
929 }
930 }
931
932 // Wrapper around buildLineContent which will reuse the structure
933 // in display.externalMeasured when possible.

Callers 1

updateLineClassesFunction · 0.85

Calls 2

ensureLineWrappedFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected