MCPcopy Create free account
hub / github.com/flyfloor/react-component / removeClass

Function removeClass

component/util/dom.js:11–23  ·  view source on GitHub ↗
(el, className)

Source from the content-addressed store, hash-verified

9}
10
11export function removeClass(el, className){
12 if (!el || !className) return;
13 if (el instanceof NodeList) {
14 const length = el.length;
15 for (let i = 0; i < length; i++) {
16 _removeClass(el[i], className);
17 }
18 return;
19 }
20 if (el instanceof Node) {
21 _removeClass(el, className);
22 }
23}
24
25function _removeClass(el, className){
26 const clist = getClassList(el);

Callers 2

closeSubMenuFunction · 0.50
toggleSubMenuFunction · 0.50

Calls 1

_removeClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…