MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / attachDoc

Function attachDoc

static/js/codemirror/codemirror.js:4546–4555  ·  view source on GitHub ↗
(cm, doc)

Source from the content-addressed store, hash-verified

4544 }
4545
4546 function attachDoc(cm, doc) {
4547 if (doc.cm) throw new Error("This document is already in use.");
4548 cm.doc = doc;
4549 doc.cm = cm;
4550 estimateLineHeights(cm);
4551 loadMode(cm);
4552 if (!cm.options.lineWrapping) computeMaxLength(cm);
4553 cm.options.mode = doc.modeOption;
4554 regChange(cm);
4555 }
4556
4557 // LINE UTILITIES
4558

Callers 1

codemirror.jsFile · 0.85

Calls 4

estimateLineHeightsFunction · 0.85
loadModeFunction · 0.85
computeMaxLengthFunction · 0.85
regChangeFunction · 0.85

Tested by

no test coverage detected