1.5.0 • Published 6 years ago

element-factory v1.5.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Element Factory

What is this?

lightweight element dom element creation tool.

Why?

I wanted to learn how to make a templating system

How do i use this?

The bellow creates a div with the class "red" with a nested span containing "some cool text"

var testEl = elementFactory('div' , {class: 'red'},
    elementFactory('div',null,
        elementFactory('div',null,
            elementFactory('span',{text:'some cool text'})
        )
    ),
);

This is the HTML output

<div class="red">
  <div>
    <div>
      <span>some cool text</span>
    </div>
  </div>
</div>
1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.1.0

7 years ago

1.0.0

7 years ago