MCPcopy Create free account
hub / github.com/sql-js/sql.js / updateLineBackground

Function updateLineBackground

GUI/codemirror/lib/codemirror.js:794–804  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

792 }
793
794 function updateLineBackground(lineView) {
795 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
796 if (cls) cls += " CodeMirror-linebackground";
797 if (lineView.background) {
798 if (cls) lineView.background.className = cls;
799 else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
800 } else if (cls) {
801 var wrap = ensureLineWrapped(lineView);
802 lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
803 }
804 }
805
806 // Wrapper around buildLineContent which will reuse the structure
807 // in display.externalMeasured when possible.

Callers 1

updateLineClassesFunction · 0.85

Calls 2

ensureLineWrappedFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…