MCPcopy Index your code
hub / github.com/bugy/script-server / hasClass

Function hasClass

web-src/src/common/utils/common.js:73–79  ·  view source on GitHub ↗
(element, clazz)

Source from the content-addressed store, hash-verified

71}
72
73export function hasClass(element, clazz) {
74 if (isNull(element.classList)) {
75 return false;
76 }
77
78 return element.classList.contains(clazz);
79}
80
81export function removeClass(element, clazz) {
82 element.classList.remove(clazz);

Callers 6

findActiveFileElementFunction · 0.90
getTopLevelItemsFunction · 0.90
assertOpenFunction · 0.90
assertClosedFunction · 0.90
addClassFunction · 0.85
closestByClassFunction · 0.85

Calls 1

isNullFunction · 0.85

Tested by

no test coverage detected