sc

set-children

reorder/replace DOM element children easily

Showing:

Popularity

Downloads/wk

2

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

ISC

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

setChildren

reorder/replace DOM element children easily

installation

npm install set-children

usage (ES2015)

import setChildren from 'set-children';

var h1 = document.createElement('h1');
var p = document.createElement('p');

h1.textContent = 'Hello world!';
p.textContent = 'Lorem ipsum';

setChildren(document.body, [
  h1, p
]);

usage (CommonJS)

var setChildren = require('set-children');

var h1 = document.createElement('h1');
var p = document.createElement('p');

h1.textContent = 'Hello world!';
p.textContent = 'Lorem ipsum';

setChildren(document.body, [
  h1, p
]);

usage (oldskool)

<script src="set-children.min.js"></script>
<script>
  var h1 = document.createElement('h1');
  var p = document.createElement('p');
  
  h1.textContent = 'Hello world!';
  p.textContent = 'Lorem ipsum';
  
  setChildren(document.body, [
    h1, p
  ]);
</script>

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100