MCPcopy Index your code
hub / github.com/DHTMLX/gantt / rmClass

Function rmClass

samples/common/codehighlight/codemirror.js:52–59  ·  view source on GitHub ↗
(node, cls)

Source from the content-addressed store, hash-verified

50 function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
51
52 var rmClass = function(node, cls) {
53 var current = node.className;
54 var match = classTest(cls).exec(current);
55 if (match) {
56 var after = current.slice(match.index + match[0].length);
57 node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
58 }
59 };
60
61 function removeChildren(e) {
62 for (var count = e.childNodes.length; count > 0; --count)

Callers 5

onBlurFunction · 0.85
initScrollbarsFunction · 0.85
upFunction · 0.85
wrappingChangedFunction · 0.85
addEditorMethodsFunction · 0.85

Calls 1

classTestFunction · 0.85

Tested by

no test coverage detected