1.2.1 • Published 7 years ago

nodeelement v1.2.1

Weekly downloads
1
License
MIT License
Repository
-
Last release
7 years ago

NodeElement

Simple mini-library which is provide emulation of some behaviors of the HTMLElement object

Examples

Append new child:

var root = new NodeElement();
root.appendChild(new NodeElement());
root.appendChild(new NodeElement());
/* And so on... */

Remove child:

var root = new NodeElement();
var node = new NodeElement();

root.appendChild(node);
/* ... */
// root.removeChild(node);
// or
// node.parentNode.removeChild(node);

Deep cloning:

var root = new NodeElement();
root.appendChild(new NodeElement());
root.appendChild(new NodeElement());

var clonedRoot = root.cloneNode(true); // full copy of the root variable.

Browser Capability

Should work well on all modern browsers, e.g. IE11 >=

Dependencies

No exernal dependencies / third-party libs at all!

Feedback

For any questions/propositions/e.t.c you can contact me at kurzgame@gmail.com