dom-collection

Index based collection manipulation methods for DOM element child nodes.

Usage no npm install needed!

<script type="module">
  import domCollection from 'https://cdn.skypack.dev/dom-collection';
</script>

README

dom-collection

Build Status

Index based collection manipulation methods for DOM element child nodes.

API

insertAt(element, index, parent)

Inserts an DOM element at a specific index.

moveAt(element, index, parent)

Moves a DOM element to a specific index.

replaceAt(element, index, parent)

Replaces a DOM element at a specific index.

removeAt(element, index, parent)

Removes a DOM element at a specific index.