MCPcopy Index your code
hub / github.com/csev/py4e / rmClass

Function rmClass

tools/pythonauto/static/codemirrorepl/codemirror.js:7069–7072  ·  view source on GitHub ↗
(node, cls)

Source from the content-addressed store, hash-verified

7067
7068 function classTest(cls) { return new RegExp("\\b" + cls + "\\b\\s*"); }
7069 function rmClass(node, cls) {
7070 var test = classTest(cls);
7071 if (test.test(node.className)) node.className = node.className.replace(test, "");
7072 }
7073 function addClass(node, cls) {
7074 if (!classTest(cls).test(node.className)) node.className += " " + cls;
7075 }

Callers 4

wrappingChangedFunction · 0.85
upFunction · 0.85
onBlurFunction · 0.85
codemirror.jsFile · 0.85

Calls 1

classTestFunction · 0.85

Tested by

no test coverage detected