html-it
v0.1.0
Published
A cool and uncluttered way to generate html right from JS.
Downloads
1
Readme
HTML It
A cool and uncluttered way to generate html right from JS.
Example
// Excpet for the first argument, all arguments can be in whatever order.
var myButton = h(
'input', // Tag name is always the first argument.
'#myId', // Id begins with #
'.class1', // Classes begin with .
'.class2', // Classes begin with .
'@disabled', // Boolean attributes begin with @
'@readonly', // Boolean attributes begin with @
':title=Press to press', // Attributes begin with :
':type=text', // Attributes begin with :
'Click Here!', // Regular inner text.
[ document.createElement('span') ] // Array of DOM elements to bi children.
);
For Browser
Use the file at /dist
.