empty-element
v1.0.0
Published
Empty a DOM element.
Downloads
52
Readme
empty-element
Empty a DOM element.
Usage
var empty = require('empty-element')
var list = document.querySelector('ul')
empty(list)
The empty
function returns the element, so you can quickly set element
contents by doing something like:
empty(list).appendChild(makeLiElement('content'))