empty-element
Empty a DOM element.
Last updated 5 years ago by goto-bus-stop .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install empty-element 
SYNC missed versions from official npm registry.

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'))

License

MIT

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |