owldom

1.0.3 • Public • Published

Logo

OWLDOM

Do not mess with DOM/Markups (WORK IN PROGRESS.)


Usage :

<script src="owldom.js" />

<script>

var domBoy = new OwlDOM();

/// prototype of `grabElement()`
.grabElement(__TAG_NAME__, __ID__, __CLASS_LIST__)

// below all are optionals, only one can give as expected
// __TAG_NAME__: h1, h3, div, etc.
// __ID__: id attribute of any element like foo, bar etc
// __CLASS_LIST__: [] classNames in array

// to get all elements as a array even childs
console.log(domBoy.grabElement('*'));

// to get h1 + element with specified Id + elements array with specified classNames
console.log(domBoy.grabElement('h1', 'unique-h2'), ['class1', 'class2']);
</script>

Package Sidebar

Install

npm i owldom

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

22.6 kB

Total Files

5

Last publish

Collaborators

  • ashusharmadev