eremento
v2.0.0
Published
Simple JavaScript HTMLElement Generator
Downloads
7
Readme
Eremento is a tool for building HTML Elements based on objects or properties, you can create HTML element objects and also create raw HTML structures easily with Eremento.
Features
- Arrangement Builds the raw HTML structure from the object as well as from the HTML instance itself.
- Object Builds html elements from objects.
- Multiple You can construct one element or even more than one html element.
Initialize
Through UNPKG
<script type="text/javascript" src="https://unpkg.com/eremento/dist/js/eremento.js"></script>
Examples
Build raw HTML structure.
/** For Multiple Elements **/
Eremento.arrange([]);
/** For Single Element **/
Eremento.arrange({
name: "input",
attributes: {
type: "text",
value: null
}
});
/** Results **/
/** <input type="text" value="" /> */
Building an HTML Element Instance.
Eremento.create({
name: "button",
attributes: {
dataset: {
id: 0
},
click: e => console.log( e.target.dataset.id )
}
});
License
All source code license under MIT license. Please see the MIT documentation for details.