12 lines
193 B
JavaScript
12 lines
193 B
JavaScript
|
export const clearDomElement = el => {
|
||
|
if (!el || !el.firstChild) return;
|
||
|
|
||
|
while (el.firstChild) {
|
||
|
el.removeChild(el.firstChild);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default () => ({
|
||
|
clearDomElement,
|
||
|
});
|