UNPKG

pop

Version:

Pop is a [Hyperapp](https://github.com/hyperapp/hyperapp) / [Ultradom](https://github.com/ultradom/ultradom) spin-off project — yet another micro-framework for creating graphical user interfaces. This is not the final title, but let's go with that for now

14 lines (12 loc) 322 B
export function removeChildren(element, node) { var attributes = node.attributes if (attributes) { for (var i = 0; i < node.children.length; i++) { removeChildren(element.childNodes[i], node.children[i]) } if (attributes.ondestroy) { attributes.ondestroy(element) } } return element }