Gazebo_simulation-Frontend/node_modules/dom-helpers/esm/hasClass.js
2020-12-21 10:29:31 -05:00

4 lines
253 B
JavaScript

export default function hasClass(element, className) {
if (element.classList) return !!className && element.classList.contains(className);
return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
}