UNPKG

@antv/l7plot-component

Version:
15 lines 488 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasClass = hasClass; exports.clearDom = clearDom; function hasClass(elements, cName) { return !!elements.className.match(new RegExp(`(\\s|^)${cName}(\\s|$)`)); } function clearDom(container) { const children = container.childNodes; const length = children.length; for (let i = length - 1; i >= 0; i--) { container.removeChild(children[i]); } } //# sourceMappingURL=dom.js.map