MCPcopy
hub / github.com/csev/py4e / elt

Function elt

tools/pythonauto/static/codemirrorepl/codemirror.js:7018–7025  ·  view source on GitHub ↗
(tag, content, className, style)

Source from the content-addressed store, hash-verified

7016 // DOM UTILITIES
7017
7018 function elt(tag, content, className, style) {
7019 var e = document.createElement(tag);
7020 if (className) e.className = className;
7021 if (style) e.style.cssText = style;
7022 if (typeof content == "string") e.appendChild(document.createTextNode(content));
7023 else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
7024 return e;
7025 }
7026
7027 var range;
7028 if (document.createRange) range = function(node, start, end) {

Callers 15

DisplayFunction · 0.70
updateGuttersFunction · 0.70
ensureLineWrappedFunction · 0.70
updateLineBackgroundFunction · 0.70
updateLineGutterFunction · 0.70
insertLineWidgetsForFunction · 0.70
drawSelectionCursorFunction · 0.70
addFunction · 0.70
paddingHFunction · 0.70
textHeightFunction · 0.70
charWidthFunction · 0.70

Calls 1

appendChildMethod · 0.45

Tested by

no test coverage detected